Re: mysql_get_client_version() in embedded library

2005-04-27 Thread Wolfgang Rohdewald
On Donnerstag 28 April 2005 07:39, Wolfgang Rohdewald wrote: > the manual states at > http://dev.mysql.com/doc/mysql/en/mysql-get-client-version.html > > that this function has been introduced in 4.0.16. > > But it seems that the embedded library does not yet have it as of 4.0.24. > 4.1.11 has i

mysql_get_client_version() in embedded library

2005-04-27 Thread Wolfgang Rohdewald
the manual states at http://dev.mysql.com/doc/mysql/en/mysql-get-client-version.html that this function has been introduced in 4.0.16. But it seems that the embedded library does not yet have it as of 4.0.24. 4.1.11 has it. Does anybody know when exactly it has been added to the embedded librar

Re: connecting with PHP from remote server - security breach?

2005-04-27 Thread Chris
Nikola Skoric wrote: Hello, I'm wondering whether there is a way to hack into my database if I'm connecting with PHP from remote web server to my MySQL server with unencrypted connection? I'm using phpBB forums (residing on one server and using the database on other server) which do not suport S

Resetting lsn/trx for an .ibd file

2005-04-27 Thread Sam Sgro
It's pretty clear that although you cannot currently move .ibd files between MySQL installations, it's technically possible - it would simply be a matter of resetting the lsn/trx id's of a clean .ibd file. http://lists.mysql.com/mysql/159206 http://dev.mysql.com/doc/mysql/en/multiple-tablespaces

purge log fails

2005-04-27 Thread Marten Lehmann
Hello, the current 4.1.11 implementation of PURGE LOGS doesn't seem to work any more. I created a script running once each day doing the following statement: purge master logs before (select adddate(current_timestamp(), interval -4 day)) That way, all logs prior to today - 4 days will become d

RE: host info

2005-04-27 Thread mathias fatene
That's it:o) Best Regards Mathias FATENE Hope that helps *This not an official mysql support answer -Original Message- From: Stanton, Brian [mailto:[EMAIL PROTECTED] Sent: mercredi 27 avril 2005 23:12 To: 'mysql@lists.mysql.com' Subject: RE: host info Alon

RE: host info

2005-04-27 Thread Stanton, Brian
Along those lines, you could use "show variables like 'pid_file'" if the user needing to know the hostname has privileges for this. Thanks for the idea! Thanks, Brian Stanton -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 27, 2005 3:42 PM To:

Re: query question

2005-04-27 Thread Peter Brawley
JA, To have a SELECT statement generate a row for every day in the year, either your raindata table needs a row for every day in the year, or you need another table which has a row for every day of the year. Supposing you have such a table, call it 'calendar' with a date column named 'yearday',

RE: query question

2005-04-27 Thread mathias fatene
Hi, If i understand : select month(entryDate) as monthPart, if (amount is nul,'',day(entryDate) ) as dayPart, amount from raindata order by dayPart, monthPart Best Regards Mathias FATENE Hope that helps *This not an official mysql support answer -Original Messag

RE: host info

2005-04-27 Thread mfatene
Hi all, Mysql server knows the OS server as localhost. the hostname you see in status is the OS server from which you connect (the client one), since it's defined in the grant. The only method i can see is : ls /*.pid its hostname.pid You can do it also with *.err Mathias Selon "Stanton, Bria

query question

2005-04-27 Thread jabbott
I have a table that the important parts look something like: keynum int, entryDate datetime, amount varchar(10) What I want to do is a query that gets me every day of the year and just has null values for the days that don't have anything in the amount column. Is something like that possible w

Re: getting hours from two datetime columns

2005-04-27 Thread Peter Brawley
James, >Is there a way to get all of the hours between two datetime columns? >For example, if there is an entry that starts at 2005-4-1 3:00:00 and >the end is 2005-4-1 11:00:00 I would like to know that this enry was >used in hours 3 - 11, or for 8 hours. TIMEDIFF( '2005-4-1 11:00:00', '2005-4-1 3

connecting with PHP from remote server - security breach?

2005-04-27 Thread Nikola Skoric
Hello, I'm wondering whether there is a way to hack into my database if I'm connecting with PHP from remote web server to my MySQL server with unencrypted connection? I'm using phpBB forums (residing on one server and using the database on other server) which do not suport SSH connections, so I

Re: why NOT NULL in PRIMARY key??

2005-04-27 Thread Joerg Bruehe
Hi, let me fall in here. Jigal van Hemert wrote: From: "Peter Brawley" Peter, >[[...]] Your proposal would permit dupe primary keys. It's a question of preventing them. Sorry, but I disagree. If NULL handling is not done by the table engine but by the rest of MySQL then MySQL can compare two NULL

RE: host info

2005-04-27 Thread Stanton, Brian
The 'Connection' output from the 'status' command is actually what I was looking for. However, most likely it will be a jdbc connection to mysql, not the mysql client, so I'll have to see if it works that way or not. Thanks, Brian Stanton -Original Message- From: Eamon Daly [mailto:[EMAI

Re: host info

2005-04-27 Thread Eamon Daly
I don't know if it's possible in MySQL. That said, in the mysql client, you can type '\s' for 'status'. Look for 'Current user' in the output. Eamon Daly - Original Message - From: "Stanton, Brian" <[EMAIL PROTECTED]> To: Sent:

RE: java.lang.OutOfMemoryError

2005-04-27 Thread Duhaime Johanne
I had the same problem. I changed the memory settings for java: catalina.sh JAVA_OPTS='-Xms1024m -Xmx1024m' But still I had the problem By rebooting tomcat every week-end I do not have any more problem. Of course you might not be able to do that. Johanne -Message d'origine- De :

RE: host info

2005-04-27 Thread Berman, Mikhail
Brian, Would it be feasible for you to work around this problem by: 1. Executing from UNIX prompt of your first server - "ssh second_server" 2. Executing "mysql -u user -p database" 3. Executing "mysql> system /bin/hostname" Regards, Mikhail Berman -Original Message- From: Stanton,

Re: InnoDB memory usage clarification

2005-04-27 Thread David Griffiths
Mayuran, It depends on a bunch of things. What else is running on this server? Does the distro you use have the ability to take advantage of all 16 gig (ie if you have apache running, will it be stuck in the same 4 gig as MySQL, or can it use the memory above the 4 gig limit). How big is your d

re: getting hours from two datetime columns

2005-04-27 Thread James Black
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Is there a way to get all of the hours between two datetime columns? For example, if there is an entry that starts at 2005-4-1 3:00:00 and the end is 2005-4-1 11:00:00 I would like to know that this enry was used in hours 3 - 11, or for 8 hours. I h

RE: host info

2005-04-27 Thread Stanton, Brian
Using 4.0.18... connected from one unix box to another using mysql -h server -u user -p database Thanks, Brian Stanton -Original Message- From: Berman, Mikhail [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 27, 2005 12:30 PM To: [EMAIL PROTECTED]; mysql@lists.mysql.com Subject: RE: ho

Re: MySQL Group By partial string

2005-04-27 Thread Søren Ragsdale
On Apr 27, 2005, at 1:17 PM, Eric Jensen wrote: Trying to make some queries a little more efficient. I want to group HTTP referers together but not with the full URL. For example, just "www.google.com" instead of the full search string. I can't find a way to do this in MySQL. Is there a way t

Avoiding deadlock: beyond the basics

2005-04-27 Thread Søren Ragsdale
I've been getting the following error in my Python program which accesses InnoDB tables: OperationalError: 1213 Deadlock found when trying to get lock; try restarting transaction I've already tried all the basic steps that the documentation seems to recommend: - Set my TRANSACTION ISOLATIO

RE: host info

2005-04-27 Thread Berman, Mikhail
Brian, Have you initiated "mysql" command with "-h host-name" option or just "mysql" with other options but "-h"? Mikhail Berman -Original Message- From: Stanton, Brian [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 27, 2005 11:33 AM To: 'mysql@lists.mysql.com' Subject: RE: host inf

InnoDB memory usage clarification

2005-04-27 Thread Mayuran Yogarajah
The following are from the InnoDB configuration page: # Set buffer pool size to 50-80% of your computer's memory, # but make sure on Linux x86 total memory usage is < 2GB *Warning:* On 32-bit GNU/Linux x86, you must be careful not to set memory usage too high. | glibc| may allow the process heap t

MySQL Group By partial string

2005-04-27 Thread Eric Jensen
Trying to make some queries a little more efficient. I want to group HTTP referers together but not with the full URL. For example, just "www.google.com" instead of the full search string. I can't find a way to do this in MySQL. Is there a way to turn "http://search.msn.com/results.aspx?q=thing

how to use row total in aggregate query ?

2005-04-27 Thread Graham Anderson
I have a query: I am trying to get a percentage of the total for each city SELECT userLog.city,userLog.region, COUNT(*), /* Count(userLog.id) is always 1 was hoping to get the total row returned */ COUNT(*)/COUNT(userLog.id), media.name,artist.name FROM userLog,media,artist WHERE userLog.medi

Problems with character sets and Unicode in MySQL

2005-04-27 Thread Raul Mauri
I use the MyQSL Query Browser for a library database. I have come across a problem in MySQL: Using extended characters, as š, is not a problem, as long as they are present in the standard 256 characters of a font. Things become more difficult when I need other East Europe characters. Could anyon

time zones

2005-04-27 Thread Monty Harris
How does one cope with time zones? For example, if I want to timestamp a record it will timestanp using the local time of my server. I thought that, e.g if my server was in New York and my customer_location was the UK, I can just add 5 hours to the time and it would be correct. While that might

Re: java.lang.OutOfMemoryError

2005-04-27 Thread kernel
gerald_clark wrote: >huanggaofeng wrote: > > > >>I have too many databases,when i select it by client ,but it has error . >> >>the error message is : java.lang.OutOfMemoryError >> >>how i can to resolve it. >> >> >> >> >> >You might try a java list. > > > > Gerald, Check out the "java -X"

Re: why NOT NULL in PRIMARY key??

2005-04-27 Thread Peter Brawley
Jigal, I think MS-SQL and Oracle provide switches for treating NULLs as values, which is what your proposal amounts to. It seems to me that much of the performance advantage you are counting on from PKs would go away if PKs could have NULLs and if NULL were a value. IAC I hope MySQL doesn't go

re: Mysql 5.0.4 still broken for my stored procedures

2005-04-27 Thread James Black
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 About 3 wks ago I had sent some files to the list regarding my stored procedures, and they are still broken in 5.0.4. I get an error: Internal error when parsing callable statement metadata and it happens at: com.mysql.jdbc.DatabaseMetaData.getCallStm

Re: Get a Random Row on a HUGE db

2005-04-27 Thread Scott Gifford
<[EMAIL PROTECTED]> writes: [...] > So what I am trying is this. > > $last_row ="SELECT from firebase_content LAST_INSERT_ID()"; > $last_row_query = $dbi->query($last_row); > $last_row_result = $row->id; LAST_INSERT_ID() only works if you just inserted an element; it's maintained per-connection.

re: group by day of week and group by hour in day

2005-04-27 Thread SGreen
James Black <[EMAIL PROTECTED]> wrote on 04/27/2005 10:36:20 AM: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > I am curious if there is a simple way to do this. I was just asked to > give some data that requires me to group by day of week and also group > by hour in day (two different pag

RE: host info

2005-04-27 Thread Stanton, Brian
Unfortunately, that gives me the host of the machine I'm connecting from, not the server I'm connecting to. Thanks, Brian Stanton -Original Message- From: Berman, Mikhail [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 27, 2005 10:28 AM To: [EMAIL PROTECTED]; mysql@lists.mysql.com Subje

Re: why NOT NULL in PRIMARY key??

2005-04-27 Thread Frank Bax
At 11:07 AM 4/27/05, Jigal van Hemert wrote: So, if we would define that the key entry "0-NULL-Whatever" equals "0-NULL-Whatever" (which MySQL is capable of if you look at the definition of UNIQUE indexes with BDB tables) then allowing NULLs as part of a key entry would not permit duplicate entries

RE: host info

2005-04-27 Thread Berman, Mikhail
Brian, In UNIX from "mysql" prompt do: mysql> system /bin/hostname Mikhail -Original Message- From: Stanton, Brian [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 27, 2005 11:03 AM To: 'mysql@lists.mysql.com' Subject: host info Does anyone know a function that will return the hos

Re: Multi Table Delete in 3.23.47

2005-04-27 Thread zzapper
On Wed, 27 Apr 2005 09:51:41 -0400, wrote: My subject is a bit of a misnomer in fact the Where refers to multiple tables but the delete is just from one table, nevertheless my query worked super-dandy in 4.1 (on my test rig) and failed on the live server 3.23.47 . that's why I couldn't work out

Maximize mysql ini for 4gig big query win 2003 box

2005-04-27 Thread matt_lists
Anybody have any suggested settings for our my.ini ? 4 gig box, running windows 2003 peak memory usage for mysql is 1.4 gig currently using myisam files, lots of little index querys, and some very large queries at night 615 tables, 88.3 gb of myd, 45.2 gb of myi, 33 of the tables/indexes break

Re: why NOT NULL in PRIMARY key??

2005-04-27 Thread Jigal van Hemert
From: "Peter Brawley" Peter, > >Anyway, I gues it's just a question of following a standard and optimizing > >the engine according to that standard. > > Your proposal would permit dupe primary keys. It's a question of > preventing them. Sorry, but I disagree. If NULL handling is not done by th

host info

2005-04-27 Thread Stanton, Brian
Does anyone know a function that will return the hostname of the mysql server you are connecting to? Just as: mysql> select database(); returns the database you're connected to, I need to display the host I'm connected to. Similar to the oracle statement: select host_name from v$instance;

Empty select on Windows also

2005-04-27 Thread scheuer
To: mysql@lists.mysql.com Subject: [Empty select] Description: How-To-Repeat: DROP TABLE IF EXISTS ugo; CREATE TABLE ugo ( AKCE_1 char(1) default '', AUT_KOD char(10) default '', BONUS_CR char(1) default '', BR_BODOVA decimal(6,2) default '0.00', BR_BODOVA2 decimal(6,2) default

re: group by day of week and group by hour in day

2005-04-27 Thread James Black
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I am curious if there is a simple way to do this. I was just asked to give some data that requires me to group by day of week and also group by hour in day (two different pages). Thanx for any help. - -- "Love is mutual self-giving that ends in self-

Re: why NOT NULL in PRIMARY key??

2005-04-27 Thread Peter Brawley
Jigal >Anyway, I gues it's just a question of following a standard and optimizing >the engine according to that standard. Your proposal would permit dupe primary keys. It's a question of preventing them. PB - Jigal van Hemert wrote: From: "Mikhail Entaltsev" Mikhail, Bef

Re: Multi Table Delete in 3.23.47

2005-04-27 Thread Michael Stassen
zzapper wrote: > Hi, > Final whinge: I wish the mysql website made it a little clearer which > features are recent additions, I suggested color coding. Philippe Poelvoorde wrote: I reckon, it's a bit hidden in the middle : "Starting with MySQL 4.0.4, you can also perform UPDATE operations th

Re: Get a Random Row on a HUGE db

2005-04-27 Thread Dawid Kuroczko
On 4/26/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I am wanting to display a random page from my site, But I have over 12,000 > articles right now and we add over 150 per day. What I wound up doing was a > Virtual DOS attack on my own server because the 40 mb db was being loaded to > m

Re: Multi Table Delete in 3.23.47

2005-04-27 Thread Philippe Poelvoorde
zzapper wrote: On Wed, 27 Apr 2005 09:50:37 +0100, wrote: zzapper wrote: On Tue, 26 Apr 2005 23:22:46 +0100, wrote: Hi, The following query runs fine in recent versions of mysql 4.1x etc delete from t2 using tbl_User as t1,tbl_UserTopic as t2 where (t1.txtemail='[EMAIL PROTECTED]') and (t1.int

Re: java.lang.OutOfMemoryError

2005-04-27 Thread gerald_clark
huanggaofeng wrote: (B (B>I have too many databases,when i select it by client ,but it has error . (B> (B>the error message is : java.lang.OutOfMemoryError (B> (B>how i can to resolve it. (B> (B> (B> (BYou might try a java list. (B (B (B-- (BMySQL General Mailing List (BFor list a

Re: Multi Table Delete in 3.23.47

2005-04-27 Thread Jigal van Hemert
From: "zzapper" > Final whinge: I wish the mysql website made it a little clearer which features are recent > additions, I suggested color coding. 1) Someone from MySQL AB mentioned here recently that they are working on a new system to keep track of differences between versions for the documenta

Re: Efficient select/insert

2005-04-27 Thread SGreen
"Jonathan Mangin" <[EMAIL PROTECTED]> wrote on 04/26/2005 05:09:23 PM: > > - Original Message - > From: <[EMAIL PROTECTED]> > To: "Jonathan Mangin" <[EMAIL PROTECTED]> > Cc: > Sent: Tuesday, April 26, 2005 3:20 PM > Subject: Re: Efficient select/insert > > > > "Jonathan Mangin" <[EMA

java.lang.OutOfMemoryError

2005-04-27 Thread huanggaofeng
I have too many databases,when i select it by client ,but it has error . (B (Bthe error message is : java.lang.OutOfMemoryError (B (Bhow i can to resolve it.

Re: Multi Table Delete in 3.23.47

2005-04-27 Thread zzapper
Hi, Final whinge: I wish the mysql website made it a little clearer which features are recent additions, I suggested color coding. BTW regards multi table deletes there's something nasty there between 4.0 and 4.1 -- zzapper vim -c ":%s%s*%Cyrnfr)fcbafbe[Oenz(Zbbyranne%|:%s)[[()])-)Ig|norm Vg?"

Empty select

2005-04-27 Thread scheuer
From: root To: mysql@lists.mysql.com Subject: [Empty select] >Description: >How-To-Repeat: < DROP TABLE IF EXISTS ugo; CREATE TABLE ugo ( AKCE_1 char(1) default '', AUT_KOD char(10) default '', BONUS_CR char(1) default '', BR_BODOVA decimal(6,2) default '0.00', BR_BODOVA2 decima

Re: why NOT NULL in PRIMARY key??

2005-04-27 Thread Martijn Tonies
> > [snip] > > The same is true for any other value... Now that the columns have a NOT > > NULL > > constraint the records that previously contained NULL now hold '0'. > > > > x y > > x 0 > > x z > > x 0 > > > > Now, how do you uniquely identify the 2nd and 4th rows? > > [/snip] > > > > The data

Re: why NOT NULL in PRIMARY key??

2005-04-27 Thread Dawid Kuroczko
On 4/26/05, Jay Blanchard <[EMAIL PROTECTED]> wrote: > [snip] > The same is true for any other value... Now that the columns have a NOT > NULL > constraint the records that previously contained NULL now hold '0'. > > x y > x 0 > x z > x 0 > > Now, how do you uniquely identify the 2nd and 4th rows

Archive Mbox Files Needed

2005-04-27 Thread sksowe
Am analysing community participation in mailing lists. I have a python script that reads mbox files and parse the contents into Mysql database. Does anyone knows where i can get archived mbox files of the Mysql mailing lists? Thanks in advance -- Sulayman K. Sowe Aristotle University of Thessalo

Re: Multi Table Delete in 3.23.47

2005-04-27 Thread zzapper
On Wed, 27 Apr 2005 09:50:37 +0100, wrote: >zzapper wrote: >> On Tue, 26 Apr 2005 23:22:46 +0100, wrote: >> >> >>>Hi, >>> >>>The following query runs fine in recent versions of mysql 4.1x etc >>> >>>delete from t2 using tbl_User as t1,tbl_UserTopic as t2 where >>>(t1.txtemail='[EMAIL PROTECTE

Re: update and select question

2005-04-27 Thread Jigal van Hemert
From: "$B2+9bJv(B" (B (B> UPDATE (B> NGLDENHDT (B> SET (B> EDT_HUK_FLG = :EDT_HUK_FLG (B> WHERE (B> KAI_CDE = :KAI_CDE (B> AND EDT_NUM = (SELECT MAX(EDT_NUM) (B>FROM NGLDENHDT (B>WHERE KAI_CDE = :KAI_CDE_T1 (B>

Re: MySQL Client Hangs on QNX

2005-04-27 Thread Gleb Paharenko
Hello. Your version of MySQL is rather old. Does the problem remains after upgrading? "Stephen Rasku" <[EMAIL PROTECTED]> wrote: > I am using MySQL 4.0.17 on QNX 6.2.1b. > > I have noticed this in the last couple of days. There were two MySQL > clients running: one since 1:30 that

Re: Mysql Client Connection

2005-04-27 Thread Gleb Paharenko
Hello. Add user 'root'@'node1.example.com'. See: http://dev.mysql.com/doc/mysql/en/access-denied.html >Dear All, >I have mysql installed on top of redhat 3.0 machines and I have created >user called root and assigned a password. >I have tried connecting to database locally by using

Re: update and select question

2005-04-27 Thread Philippe Poelvoorde
$B2+9bJv(B wrote: (B> i use this mail first . (B> (B> i have a problem in under sql program: (B> (B> (B> UPDATE (B> NGLDENHDT (B> SET (B> EDT_HUK_FLG = :EDT_HUK_FLG (B> WHERE (B> KAI_CDE = :KAI_CDE (B> AND EDT_NUM = (SELECT MAX(EDT_NUM) (B>

Re: update and select question

2005-04-27 Thread mfatene
Hi, Look at select ... for update here : http://dev.mysql.com/doc/mysql/en/innodb-locking-reads.html Mathias Selon "$B2 9bJv(B" <[EMAIL PROTECTED]>: > > i use this mail first . > > i have a problem in under sql program: > > > UPDATE > NGLDENHDT > SET > EDT_HUK_FLG = :EDT_HUK_FLG > W

Re: Mysql Client Connection

2005-04-27 Thread mfatene
Hi, look at http://dev.mysql.com/doc/mysql/en/grant.html and apply grant to root@'node1.example.com'. Mathias Selon bala <[EMAIL PROTECTED]>: > Dear All, > I have mysql installed on top of redhat 3.0 machines and I have created user > called root and assigned a password. > I have tried connectin

RE: LOAD DATA INFILE and STR_TO_DATE

2005-04-27 Thread Michael Markstaller
thanks, that's what I feared already.. although ugly, will do it that way so far as I don't want to do any other pre-processing on the fixed CSV's I receive. moreover I just found out STR_TO_DATE isn't available in mysql 4.0 anyway.. Michael > -Original Message- > From: Jigal van Hemert

Re: Multi Table Delete in 3.23.47

2005-04-27 Thread Philippe Poelvoorde
zzapper wrote: On Tue, 26 Apr 2005 23:22:46 +0100, wrote: Hi, The following query runs fine in recent versions of mysql 4.1x etc delete from t2 using tbl_User as t1,tbl_UserTopic as t2 where (t1.txtemail='[EMAIL PROTECTED]') and (t1.intID = t2.intID); But not in 3.23.47 I can't find any referenc

Mysql Client Connection

2005-04-27 Thread bala
Dear All, I have mysql installed on top of redhat 3.0 machines and I have created user called root and assigned a password. I have tried connecting to database locally by using Mysql -h localhost -u root -p it connected When I tried using host name it is not connecting and giving an error Error

Re: Get a Random Row on a HUGE db

2005-04-27 Thread Christian Meisinger
> $last_row ="SELECT from firebase_content LAST_INSERT_ID()"; > $last_row_query = $dbi->query($last_row); > $last_row_result = $row->id; i think LAST_INSERT_ID will not work for what you wonna do. if you open a connection to MySQL and call LAST_INSERT_ID without a INSERT it will return 0. http://

Re: why NOT NULL in PRIMARY key??

2005-04-27 Thread Jigal van Hemert
From: "Mikhail Entaltsev" Mikhail, > Before inserting MySQL will try to find a record with the same values. > But since comparison with NULL value returns always FALSE > MySQL will think that there is no such record in the table. > After this point you will get 2 identical records in the table.