Re: MySQL can't tell the difference between two databases???
On Tue, 15 Jan 2002, Nuno Gonçalves wrote: The only way I seem to be able to access the data on database B is to remove the other database from MySQL. From my tests it seems that MySQL only uses the table name to access the data (not using also the database name). The sql queries you are using on your database would help. We are not mind-readers (well, I'm not!). - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL can't tell the difference between two databases???
It's something like this: mysql use db1 mysql select * from products; ++-+-+--+--+ | Id | Ref | Version | Type | Name | ++-+-+--+--+ | 1 | XXX | 1 |1 | XXX | ++-+-+--+--+ 1 row in set (0.27 sec) mysql use db2 mysql select * from products; ++-+-+--+--+ | Id | Ref | Version | Type | Name | ++-+-+--+--+ | 1 | XXX | 1 |1 | XXX | ++-+-+--+--+ 1 row in set (0.16 sec) I'm sure the table products on database db2 is empty, because of the results I get when I remove db1 from the system. The same select returns empty. Hope that helps. Thanks. Nuno A. S. Gonçalves [EMAIL PROTECTED] - Original Message - From: Duncan Hill [EMAIL PROTECTED] To: Nuno Gonçalves [EMAIL PROTECTED] Cc: Mailing list MySql [EMAIL PROTECTED] Sent: Tuesday, January 15, 2002 12:13 PM Subject: Re: MySQL can't tell the difference between two databases??? On Tue, 15 Jan 2002, Nuno Gonçalves wrote: The only way I seem to be able to access the data on database B is to remove the other database from MySQL. From my tests it seems that MySQL only uses the table name to access the data (not using also the database name). The sql queries you are using on your database would help. We are not mind-readers (well, I'm not!). - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: MySQL can't tell the difference between two databases???
What happens if you try select * from db1.products and select * from db2.products;??? Doing that does the same? -Mensaje original- De: Nuno Gonçalves [mailto:[EMAIL PROTECTED]] Enviado el: martes, 15 de enero de 2002 13:24 Para: Mailing list MySql Asunto: Re: MySQL can't tell the difference between two databases??? It's something like this: mysql use db1 mysql select * from products; ++-+-+--+--+ | Id | Ref | Version | Type | Name | ++-+-+--+--+ | 1 | XXX | 1 |1 | XXX | ++-+-+--+--+ 1 row in set (0.27 sec) mysql use db2 mysql select * from products; ++-+-+--+--+ | Id | Ref | Version | Type | Name | ++-+-+--+--+ | 1 | XXX | 1 |1 | XXX | ++-+-+--+--+ 1 row in set (0.16 sec) I'm sure the table products on database db2 is empty, because of the results I get when I remove db1 from the system. The same select returns empty. Hope that helps. Thanks. Nuno A. S. Gonçalves [EMAIL PROTECTED] - Original Message - From: Duncan Hill [EMAIL PROTECTED] To: Nuno Gonçalves [EMAIL PROTECTED] Cc: Mailing list MySql [EMAIL PROTECTED] Sent: Tuesday, January 15, 2002 12:13 PM Subject: Re: MySQL can't tell the difference between two databases??? On Tue, 15 Jan 2002, Nuno Gonçalves wrote: The only way I seem to be able to access the data on database B is to remove the other database from MySQL. From my tests it seems that MySQL only uses the table name to access the data (not using also the database name). The sql queries you are using on your database would help. We are not mind-readers (well, I'm not!). - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL can't tell the difference between two databases???
- Original Message - From: Javier Armendáriz [EMAIL PROTECTED] To: Mailing list MySql [EMAIL PROTECTED] Sent: Tuesday, January 15, 2002 12:49 PM Subject: RE: MySQL can't tell the difference between two databases??? What happens if you try select * from db1.products and select * from db2.products;??? Doing that does the same? Yes, it's exactly the same results. -Mensaje original- De: Nuno Gonçalves [mailto:[EMAIL PROTECTED]] Enviado el: martes, 15 de enero de 2002 13:24 Para: Mailing list MySql Asunto: Re: MySQL can't tell the difference between two databases??? It's something like this: mysql use db1 mysql select * from products; ++-+-+--+--+ | Id | Ref | Version | Type | Name | ++-+-+--+--+ | 1 | XXX | 1 |1 | XXX | ++-+-+--+--+ 1 row in set (0.27 sec) mysql use db2 mysql select * from products; ++-+-+--+--+ | Id | Ref | Version | Type | Name | ++-+-+--+--+ | 1 | XXX | 1 |1 | XXX | ++-+-+--+--+ 1 row in set (0.16 sec) I'm sure the table products on database db2 is empty, because of the results I get when I remove db1 from the system. The same select returns empty. Hope that helps. Thanks. Nuno A. S. Gonçalves [EMAIL PROTECTED] - Original Message - From: Duncan Hill [EMAIL PROTECTED] To: Nuno Gonçalves [EMAIL PROTECTED] Cc: Mailing list MySql [EMAIL PROTECTED] Sent: Tuesday, January 15, 2002 12:13 PM Subject: Re: MySQL can't tell the difference between two databases??? On Tue, 15 Jan 2002, Nuno Gonçalves wrote: The only way I seem to be able to access the data on database B is to remove the other database from MySQL. From my tests it seems that MySQL only uses the table name to access the data (not using also the database name). The sql queries you are using on your database would help. We are not mind-readers (well, I'm not!). - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL can't tell the difference between two databases???
Is db2 a symlink to db1? Nuno Gonçalves wrote: Hi! I've got two mysql databases that have exactly the same structure (same tables using BDB, columns, etc.) and different data. When I try to do a select on a table from database A, I get the right results, but when I try the same select on the same table from database B, I get the results from the database A. The only way I seem to be able to access the data on database B is to remove the other database from MySQL. From my tests it seems that MySQL only uses the table name to access the data (not using also the database name). Anyone has an idea, of why this happens. Nuno A. S. Gonçalves [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL can't tell the difference between two databases???
- Original Message - From: Gerald Clark [EMAIL PROTECTED] To: Nuno Gonçalves [EMAIL PROTECTED] Cc: Mailing list MySql [EMAIL PROTECTED] Sent: Tuesday, January 15, 2002 2:35 PM Subject: Re: MySQL can't tell the difference between two databases??? Is db2 a symlink to db1? db2 is a symlink, but not to db1. I'm sure of that. I've done some more tests. It appears that if you change something on one of the tables (adding a new column on the table products of db1), mysql decides that both tables on the two databases are different, and it starts to give the correct results. I've also tested with INSERT and the same thing happens: use db1 INSERT INTO products ...; use db2 INSERT INTO products ...; The first insert ends up in both databases, and the second only appears in the first database. Well, if this isn't a bug I don't know what it is. Nuno Gonçalves wrote: Hi! I've got two mysql databases that have exactly the same structure (same tables using BDB, columns, etc.) and different data. When I try to do a select on a table from database A, I get the right results, but when I try the same select on the same table from database B, I get the results from the database A. The only way I seem to be able to access the data on database B is to remove the other database from MySQL. From my tests it seems that MySQL only uses the table name to access the data (not using also the database name). Anyone has an idea, of why this happens. Nuno A. S. Gonçalves [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL can't tell the difference between two databases???
Nuno Gonçalves writes: - Original Message - From: Gerald Clark [EMAIL PROTECTED] To: Nuno Gonçalves [EMAIL PROTECTED] Cc: Mailing list MySql [EMAIL PROTECTED] Sent: Tuesday, January 15, 2002 2:35 PM Subject: Re: MySQL can't tell the difference between two databases??? Is db2 a symlink to db1? db2 is a symlink, but not to db1. I'm sure of that. I've done some more tests. It appears that if you change something on one of the tables (adding a new column on the table products of db1), mysql decides that both tables on the two databases are different, and it starts to give the correct results. I've also tested with INSERT and the same thing happens: use db1 INSERT INTO products ...; use db2 INSERT INTO products ...; The first insert ends up in both databases, and the second only appears in the first database. Well, if this isn't a bug I don't know what it is. Hi! I must admit that this sounds very strange. Can you please make a test case, so that we can investigate a matter. Please follow instructions from the following chapter in our manual : How to Report Bugs or Problems .. -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: MySQL can't tell the difference between two databases???
I really don´t undarstand My Linux is working fine in a situation like yours. I´ve simulated your situation mysql use db2; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql select * from tab1; +++ | id | name | +++ | 1 | javier | +++ 1 row in set (0.00 sec) mysql use db1; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql select * from tab1; Empty set (0.00 sec) My database and table description: ysql use db1; Database changed mysql show tables; +---+ | Tables_in_db1 | +---+ | tab1 | +---+ 1 row in set (0.01 sec) mysql describe tab1; +---+-+--+-+-++ | Field | Type| Null | Key | Default | Extra | +---+-+--+-+-++ | id| int(11) | | PRI | NULL| auto_increment | | name | varchar(10) | YES | | NULL|| +---+-+--+-+-++ 2 rows in set (0.00 sec) mysql select * from tab1; Empty set (0.01 sec) mysql use db2 Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql show tables; +---+ | Tables_in_db2 | +---+ | tab1 | +---+ 1 row in set (0.00 sec) mysql describe tab1; +---+-+--+-+-++ | Field | Type| Null | Key | Default | Extra | +---+-+--+-+-++ | id| int(11) | | PRI | NULL| auto_increment | | name | varchar(10) | YES | | NULL|| +---+-+--+-+-++ 2 rows in set (0.00 sec) mysql select * from tab1; +++ | id | name | +++ | 1 | javier | +++ 1 row in set (0.01 sec) And finally my server and sistem data: mysql status; -- mysql Ver 11.15 Distrib 3.23.44, for pc-linux-gnu (i686) Connection id: 6 Current database: db1 Current user: [EMAIL PROTECTED] Current pager: stdout Using outfile: '' Server version: 3.23.44 Protocol version: 10 Connection: linux2 via TCP/IP Client characterset:latin1 Server characterset:latin1 TCP port: 3306 Uptime: 7 hours 27 min 52 sec Red Hat Linux release 7.0 (Guinness) Kernel 2.2.16-22 on an i586 -Mensaje original- De: Gerald Clark [mailto:[EMAIL PROTECTED]] Enviado el: martes, 15 de enero de 2002 15:35 Para: Nuno Gonçalves CC: Mailing list MySql Asunto: Re: MySQL can't tell the difference between two databases??? Is db2 a symlink to db1? If it was deleting one database or table must delete de another one. Javier Armendáriz [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL can't tell the difference between two databases???
Maybe it has something to do with the MySql version and OS i'm using: I'm running 3.23.42-max-nt on a Win2000 system, using BDB tables. Nuno A. S. Gonçalves [EMAIL PROTECTED] - Original Message - From: Javier Armendáriz [EMAIL PROTECTED] To: Mailing list MySql [EMAIL PROTECTED] Sent: Tuesday, January 15, 2002 3:28 PM Subject: RE: MySQL can't tell the difference between two databases??? I really don´t undarstand My Linux is working fine in a situation like yours. I´ve simulated your situation mysql use db2; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql select * from tab1; +++ | id | name | +++ | 1 | javier | +++ 1 row in set (0.00 sec) mysql use db1; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql select * from tab1; Empty set (0.00 sec) My database and table description: ysql use db1; Database changed mysql show tables; +---+ | Tables_in_db1 | +---+ | tab1 | +---+ 1 row in set (0.01 sec) mysql describe tab1; +---+-+--+-+-++ | Field | Type| Null | Key | Default | Extra | +---+-+--+-+-++ | id| int(11) | | PRI | NULL| auto_increment | | name | varchar(10) | YES | | NULL|| +---+-+--+-+-++ 2 rows in set (0.00 sec) mysql select * from tab1; Empty set (0.01 sec) mysql use db2 Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql show tables; +---+ | Tables_in_db2 | +---+ | tab1 | +---+ 1 row in set (0.00 sec) mysql describe tab1; +---+-+--+-+-++ | Field | Type| Null | Key | Default | Extra | +---+-+--+-+-++ | id| int(11) | | PRI | NULL| auto_increment | | name | varchar(10) | YES | | NULL|| +---+-+--+-+-++ 2 rows in set (0.00 sec) mysql select * from tab1; +++ | id | name | +++ | 1 | javier | +++ 1 row in set (0.01 sec) And finally my server and sistem data: mysql status; -- mysql Ver 11.15 Distrib 3.23.44, for pc-linux-gnu (i686) Connection id: 6 Current database: db1 Current user: [EMAIL PROTECTED] Current pager: stdout Using outfile: '' Server version: 3.23.44 Protocol version: 10 Connection: linux2 via TCP/IP Client characterset:latin1 Server characterset:latin1 TCP port: 3306 Uptime: 7 hours 27 min 52 sec Red Hat Linux release 7.0 (Guinness) Kernel 2.2.16-22 on an i586 -Mensaje original- De: Gerald Clark [mailto:[EMAIL PROTECTED]] Enviado el: martes, 15 de enero de 2002 15:35 Para: Nuno Gonçalves CC: Mailing list MySql Asunto: Re: MySQL can't tell the difference between two databases??? Is db2 a symlink to db1? If it was deleting one database or table must delete de another one. Javier Armendáriz [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php