Re: Choosing a value in a query

2005-08-01 Thread Dobromir Velev
Hi, You should be able to do a join on both tables and use the IF function in the select. It would look something like select if(Table1.MemberName='', Table2.Member_GroupName, Table1.MemberName) as name from Table1 left join Table2 on ... I cannot guess how your tables are related to each

Show triggers before 5.0.9 ?

2005-08-01 Thread StuFF mc
before 5.0.9, how can we see the existing triggers ? In 5.0.10 there is SHOW TRIGGER, and 5.0.9 you can more *.TRG, but before ? I don't see any .TRG for tables where I have triggers. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: mysql and c

2005-08-01 Thread Philippe Poelvoorde
Christian Lee wrote: Hi all, is it possible to send from server to client a handle to MySQL connection. for example then i'm trying: server: Code: ... MYSQL mysql; mysql_init(mysql); mysql_real_connect(mysql,); ... send(socket,mysql, sizeof(MYSQL),0);

Warning - Virus detected in email

2005-08-01 Thread Postmaster
Our viruschecker detected a virus in your email sent to [SMTP:[EMAIL PROTECTED] The email was deleted. Please check your system for viruses. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Query - question

2005-08-01 Thread Eugene Kosov
Eddie wrote: How can I join two tables looking like this? Table 1: ++---+---+ | Id | Name | Score | ++---+---+ Table 2: ++---+---+---+ | Id | Name | Score | Info | ++---+---+---+ To get output table like this: Table 2:

Re: malloc troubles on 64-bit machine

2005-08-01 Thread Matthijs van der Klip
On Fri, 29 Jul 2005, Joerg Bruehe wrote: Now the only question that remains is why the Active memory goes close to zero when exiting fillmem and is not when ending a compile run. I asked Again IMHO, it shows an error in memory management. I do not know if it's an error or not. I do agree

Re: mysql command line execution

2005-08-01 Thread Nuno Pereira
Jason Pyeron wrote: sorry, reply to error here On Fri, 29 Jul 2005, Nuno Pereira wrote: Michael Stassen wrote: You can, but why are you reinventing the wheel? Option files have already been provided for this purpose. In what way is storing the batch user password in 'password_file'

Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='

2005-08-01 Thread Tulong!
Here's how the problem starts. 1. Entered Korean characters in a form. 2. Press submit and I receive that error. Programming Language: PHP 5.0.4 Database: MySQL 4.1.13 Operating System: Windows XP SP2 Charset for the page: UTF-8 Charset for the table: UTF-8 Charset for the database: UTF-8 So

Re: mysql command line execution

2005-08-01 Thread Eugene Kosov
Ehrwin Mina wrote: That isn't true. If you make a ps, you will see something like mysql -p x . As I said before, you can use something like: mysql -uUser --password=`cat password_file` db FYI, Nuno is correct you cannot see the password in the 'ps' and my scripts

Connect issues

2005-08-01 Thread Terry Spencer
I can connect on the command line, but have problems connecting using DBI/D on the same server. # ./bin/mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 4.1.0-alpha-standard Mysql is running # ps -ef | grep mysql root 10626

Re: counting question

2005-08-01 Thread Gleb Paharenko
Hello. What do you think about this: SELECT u.name, IFNULL(s.skill_name,'user doesn\'t have any skill') AS SKILL, ( SELECT COUNT(skill_id)

Re: Choosing a value in a query

2005-08-01 Thread Gleb Paharenko
Hello. Maybe this could help. SELECT t1.Users_Code, IF( t1.Affected_Member IS NULL, 'No entry in Table2', IFNULL( t2.Member_Surname, t2.Member_Groupname) ) AS NAME FROM Table1 t1 LEFT JOIN Table2 t2 ON t1.Affected_Member = t2.Member_Code;

Re: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='

2005-08-01 Thread Gleb Paharenko
Hello. Please, send the output of the following statements: show variables like '%char%'; show create table table1; Tulong! [EMAIL PROTECTED] wrote: Here's how the problem starts. 1. Entered Korean characters in a form. 2. Press submit and I receive that error.

Re: Replication stops on ALTER TABLE ; keep on getting duplicate column names

2005-08-01 Thread Gleb Paharenko
Hello. Check the structure of `bartran` table on the slave. You master is very old, upgrade to the latest release (4.1.13 or 4.0.25). Dear All, Here's our setup : Master : MySQL v4.0.16-max-log Slave : MySQL v4.1.10a-max-log Everytime I do an ALTER TABLE on the master

Re: How to do in one SELECT... and now for Performance

2005-08-01 Thread SGreen
René Fournier [EMAIL PROTECTED] wrote on 07/30/2005 02:10:02 AM: Thanks, this is very helpful. I'm finally starting to understand Joins. But now I have a serious performance problem. Using INNER JOIN... SELECT users.*, COUNT(history.user_id) as num_events FROM users INNER JOIN history ON

query unexpectedly took too long.

2005-08-01 Thread jpyeron
I have this query which gets executed often, but when I saw this today I panicked. Any suggestions to why this took so long? mysql SELECT t2.id, t2.bdate, t2.level FROM bvolset AS t1 JOIN bvolset AS t2 ON t2.bdatet1.bdate AND t2.levelt1.level WHERE t1.id=30 ORDER BY bdate DESC LIMIT 1;

RE: query unexpectedly took too long.

2005-08-01 Thread Jay Blanchard
[snip] I have this query which gets executed often, but when I saw this today I panicked. Any suggestions to why this took so long? mysql SELECT t2.id, t2.bdate, t2.level FROM bvolset AS t1 JOIN bvolset AS t2 ON t2.bdatet1.bdate AND t2.levelt1.level WHERE t1.id=30 ORDER BY bdate DESC LIMIT 1;

MAX BLOB can Hold UP?

2005-08-01 Thread Nguyen, Phong
Good morning All, ORACLE, BLOB (Binary Large Object) can hold up to 4 GB of data. How about Mysql? Thank you, Nguyen -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: MAX BLOB can Hold UP?

2005-08-01 Thread Jay Blanchard
[snip] ORACLE, BLOB (Binary Large Object) can hold up to 4 GB of data. How about Mysql? [/snip] Have a look here, the short answer is yes. http://dev.mysql.com/doc/mysql/en/blob.html -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

RE: mysql command line execution

2005-08-01 Thread Edwin Cruz
Mhm daemon2# uname -r -s FreeBSD 5.2.1-RELEASE daemon2# mysql --version mysql Ver 14.10 Distrib 5.0.6-beta, for unknown-freebsd5.2.1 (i386) using EditLine wrapper daemon2# mysql -utr8 -ptr8 daemon2# ps -ef | grep mysql 230 p0- IL 0:00.01 /bin/sh /usr/local/bin/mysqld_safe

Re: query unexpectedly took too long.

2005-08-01 Thread SGreen
[EMAIL PROTECTED] wrote on 08/01/2005 09:13:46 AM: I have this query which gets executed often, but when I saw this today I panicked. Any suggestions to why this took so long? mysql SELECT t2.id, t2.bdate, t2.level FROM bvolset AS t1 JOIN bvolset AS t2 ON t2.bdatet1.bdate AND

date comparison question

2005-08-01 Thread Kapoor, Nishikant
I am probably missing something very simple, but appreciate it if someone could point me to that. I am doing this query on following table to fetch recs for a month: SELECT fName, lName, acctOpenDate FROM test WHERE acctOpenDate = '2005-07-01' AND acctOpenDate = '2005-07-31'; I expect to see

RE: query unexpectedly took too long.

2005-08-01 Thread SGreen
Jay Blanchard [EMAIL PROTECTED] wrote on 08/01/2005 09:20:59 AM: [snip] I have this query which gets executed often, but when I saw this today I panicked. Any suggestions to why this took so long? mysql SELECT t2.id, t2.bdate, t2.level FROM bvolset AS t1 JOIN bvolset AS t2 ON

RE: query unexpectedly took too long.

2005-08-01 Thread Jay Blanchard
[snip] Proper indexing will solve your problem. Index bdate and level, that should speed things up considerably. From the looks of things, bdate and level are *already* indexed. Or, did you want him to create a multi-column index on bdate and level? You weren't very clear in your suggestion.

mysql bug 9670 OPTIMIZE TABLE crashes

2005-08-01 Thread Matthijs van der Klip
Hi, I am experiencing assertion failures described in the following bugreport: http://bugs.mysql.com/bug.php?id=9670 The bug has been closed, but I'm running the most current 4.0.25 version of MySQL. The report mentions downgrading to 4.0.23 or upgrading to 4.1. Is this really neccessary or

Re: malloc troubles on 64-bit machine

2005-08-01 Thread Joerg Bruehe
Hi Matthijs! Matthijs van der Klip wrote: On Fri, 29 Jul 2005, Joerg Bruehe wrote: Now the only question that remains is why the Active memory goes close to zero when exiting fillmem and is not when ending a compile run. I asked Again IMHO, it shows an error in memory management. I do

Re: mysql bug 9670 OPTIMIZE TABLE crashes

2005-08-01 Thread Mikhail Entaltsev
Matthijs, in the bug report Heikki Tuuri wrote: *** [13 Apr 20:59] Heikki Tuuri The bug was introduced in 4.0.24 and 4.1.10. The fix will be in 4.1.12 and 5.0.5. *** Best regards, Mikhail. - Original Message - From: Matthijs van der Klip [EMAIL PROTECTED] To: MySQL mailing list

Re: mysql bug 9670 OPTIMIZE TABLE crashes

2005-08-01 Thread Matthijs van der Klip
On Mon, 1 Aug 2005, Mikhail Entaltsev wrote: in the bug report Heikki Tuuri wrote: *** [13 Apr 20:59] Heikki Tuuri The bug was introduced in 4.0.24 and 4.1.10. The fix will be in 4.1.12 and 5.0.5. *** Hi Mikhail, Thank you for your quick response. I had noticed myself that the fix seemed

RE: query unexpectedly took too long.

2005-08-01 Thread Jason Pyeron
On Mon, 1 Aug 2005, Jay Blanchard wrote: CREATE TABLE bvolset ( id int(11) NOT NULL auto_increment, bdate datetime default NULL, level int(11) NOT NULL default '0', PRIMARY KEY (id), UNIQUE KEY bdate (bdate), KEY level (level) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; [/snip]

Re: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='

2005-08-01 Thread Mark Dacasco
SHOW VARIABLES LIKE ''%char%; character_set_client utf8 character_set_connection utf8 character_set_database utf8 character_set_results utf8 character_set_server latin1 character_set_system utf8 SHOW CREATE TABLE `table1`; CREATE TABLE `main_peeps` ( `id` int(11) unsigned NOT NULL

Re: mysql command line execution

2005-08-01 Thread Nuno Pereira
Hello Edwin, Ehrwin, $ mysql --version mysql Ver 14.7 Distrib 4.1.10a, for pc-linux-gnu (i686) I tried it several times, and the password always appears to me in like $ ps -ef | grep mysql mysql -u user -px xxx database When I write the password interactively, no replaced

Re: date comparison question

2005-08-01 Thread SGreen
Kapoor, Nishikant [EMAIL PROTECTED] wrote on 08/01/2005 09:55:21 AM: I am probably missing something very simple, but appreciate it if someone could point me to that. I am doing this query on following table to fetch recs for a month: SELECT fName, lName, acctOpenDate FROM test WHERE

Re: mysql bug 9670 OPTIMIZE TABLE crashes

2005-08-01 Thread Heikki Tuuri
Matthis, unfortunately, the bug fix was never made to 4.0. It is only in 4.1.12 and later. Regards, Heikki - Alkuperäinen viesti - Lähettäjä: Matthijs van der Klip [EMAIL PROTECTED] Vastaanottaja: MySQL mailing list mysql@lists.mysql.com Kopio: [EMAIL PROTECTED]; [EMAIL PROTECTED]

Re: counting question

2005-08-01 Thread Dean Karres
Thanks to all that responded about my counting question. Gleb Paharenko's solution using the sub-select and the LEFT JOINS was the closest to what I needed. All the best, Dean...K... -- Dean Karres / karres at itg dot uiuc dot edu / www.itg.uiuc.edu Imaging

is there an active mysql developers list?

2005-08-01 Thread Jason Pyeron
we need help with configure time options ./configure --without-unix-socket-path --without-server [EMAIL PROTECTED] client]$ ./mysql -u root ERROR 2002 (HY000): Can't connect to local MySQL server through socket 'no' (2) trying to disable unix sockets altogether --

Re: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='

2005-08-01 Thread Bastian Balthazar Bux
Mark Dacasco wrote: SHOW VARIABLES LIKE ''%char%; character_set_client utf8 character_set_connection utf8 character_set_database utf8 character_set_results utf8 character_set_server latin1 character_set_system utf8 SHOW CREATE TABLE `table1`; CREATE TABLE `main_peeps` ( `id` int(11)

Re: is there an active mysql developers list?

2005-08-01 Thread Enrique Sanchez Vela
--- Jason Pyeron [EMAIL PROTECTED] wrote: we need help with configure time options ./configure --without-unix-socket-path --without-server [EMAIL PROTECTED] client]$ ./mysql -u root ERROR 2002 (HY000): Can't connect to local MySQL server through socket 'no' (2) trying to disable

RE: possible mysql/sql error...

2005-08-01 Thread bruce
to recreate the error... make sure you have a test database/etc setup... create the following test sql file sample.sql -- -- test comments -- /* system of the semester information. This gets updated for each */ import/run the sample.sql mysql -ufoo -p dbname

Question about BLOB

2005-08-01 Thread Gelu Gogancea
Hi, I have a table with a MEDIUMBLOB field and i wish to store a picture(.BMP) which the size is 10622 bytes.But when i look into the table i see only 9582 bytes. Please, i wish to know for what reason on the table are few bytes than original. I use MySQL 5.0 - Fedora Core 3 Thanks,

Re: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='

2005-08-01 Thread Mark
I didn't find any option for character-set-server so I add it under mysqld as you've stated. I also found default-character-set so I also set its value to utf8. It didn't work. I tried adding a dash (utf-8) to it. It didn't work also. Yes, I did restart MySQL after saving the configuration.

RE: Question about BLOB

2005-08-01 Thread Jay Blanchard
[snip] I have a table with a MEDIUMBLOB field and i wish to store a picture(.BMP) which the size is 10622 bytes.But when i look into the table i see only 9582 bytes. Please, i wish to know for what reason on the table are few bytes than original. I use MySQL 5.0 - Fedora Core 3 [/snip] Have a

Re: is there an active mysql developers list?

2005-08-01 Thread Jason Pyeron
On Mon, 1 Aug 2005, Enrique Sanchez Vela wrote: Most likely you would need to specify the database server hostname with the -h option. yes I am aware of this. When you use the native windows mysql.exe it will default to localhost, using named pipes (i think, but maybe tcp). so then there

compat RPM for MySQL 4.x on RHEL3 [PRESS RELEASE]

2005-08-01 Thread Ning Li
PD Inc. http://www.pdinc.us 156 Briarvista Way North East Atlanta, Georgia 30329-3615 +1(443)269-1555 EIN:52-2351863 August 1, 2005 Document#20050801P00 References#--- PRESS RELEASE: For immediate release. Contact:Ning Li [EMAIL PROTECTED] (443) 921-0381 PD Inc. has

Speeding UNION with merging indexes

2005-08-01 Thread Eli Hen
Hello, MySQL implemented index_merge in version 5... Does MySQL supports something like index_merge to speed up UNION queries? If yes, for which version (assumed release time)? Does anyone know of other DBs systems that can speed up UNION queries? This issue is quite critical for our system..

Re: is there an active mysql developers list?

2005-08-01 Thread Jeff Smelser
On Monday 01 August 2005 12:43 pm, Jason Pyeron wrote: On Mon, 1 Aug 2005, Enrique Sanchez Vela wrote: Most likely you would need to specify the database server hostname with the -h option. yes I am aware of this. When you use the native windows mysql.exe it will default to localhost,

Re: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='

2005-08-01 Thread Bastian Balthazar Bux
useful links: http://dev.mysql.com/doc/mysql/en/charset-collation-charset.html http://dev.mysql.com/doc/mysql/en/Charset-server.html http://dev.mysql.com/doc/mysql/en/Charset-map.html http://dev.mysql.com/doc/mysql/en/Option_files.html http://bugs.mysql.com/bug.php?id=3611 I've found this in my

RE: Complete server lock

2005-08-01 Thread Daniel
MySQL and DNS can be such a fun issue because it comes suddenly and leaves just as suddenly with --skip-name-resolve. For in-depth info on how MySQL uses DNS, and info about this potential DNS-related bug: http://codenode.com/mysql/dns -Daniel -Original Message- From: Ben Clewett

Re: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '=' (SOLVED)

2005-08-01 Thread Mark
You're right. It is not related. The same output are shown as before. However, the links you gave me was quite useful. I re-read and re-read them over and over until this little query solved my dilemma, sort of: SET NAMES 'utf8'; Thanks for the help! ^_^ useful links:

Re: MySQL vs XML

2005-08-01 Thread David Blomstrom
Thanks for all the tips. That makes it much clearer. I think I'll stick with PHP and MySQL and gradually introduce a little XML if it fits in. I just downloaded a content management system called Plone, which is supposed to be a good choice for hierarchical databases.

export data as sql inserts

2005-08-01 Thread Rob Agar
hi list I was just wondering - does anyone have or know of a sql or php script for exporting a table's data as a whole bunch of INSERT statements? cheers Rob -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL

Re: export data as sql inserts

2005-08-01 Thread ManojW
mysqldump is your friend. Manoj - Original Message - From: Rob Agar [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Tuesday, August 02, 2005 8:53 AM Subject: export data as sql inserts hi list I was just wondering - does anyone have or know of a sql or php script for exporting

RE: export data as sql inserts

2005-08-01 Thread Rob Agar
perfect! thanks Manoj -Original Message- From: ManojW [mailto:[EMAIL PROTECTED] Sent: Tuesday, 2 August 2005 10:01 AM To: Rob Agar; mysql@lists.mysql.com Subject: Re: export data as sql inserts mysqldump is your friend. Manoj - Original Message - From: Rob Agar

Re: is there an active mysql developers list?

2005-08-01 Thread Enrique Sanchez Vela
--- Jeff Smelser [EMAIL PROTECTED] wrote: On Monday 01 August 2005 12:43 pm, Jason Pyeron wrote: On Mon, 1 Aug 2005, Enrique Sanchez Vela wrote: Most likely you would need to specify the database server hostname with the -h option. yes I am aware of this. When you use the native

Re: export data as sql inserts

2005-08-01 Thread Peter Brawley
I was just wondering - does anyone have or know of a sql or php script for exporting a table's data as a whole bunch of INSERT statements? phpMyAdmin will generate that script for you. PB -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus

RE: possible mysql/sql error...

2005-08-01 Thread Enrique Sanchez Vela
Bruce, the shell is catching system and tries to execute whatever follows it, MySQL ignores it 100%. try using 'system' intead of the bare word and see. regards, esv. --- bruce [EMAIL PROTECTED] wrote: to recreate the error... make sure you have a test database/etc setup... create the