Anonymous | Login | Signup for a new account | 12-17-2024 08:31 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0002880 | [Quercus] | major | always | 08-29-08 00:05 | 09-05-08 15:59 | ||||
Reporter | koreth | View Status | public | ||||||
Assigned To | nam | ||||||||
Priority | high | Resolution | fixed | ||||||
Status | closed | Product Version | 3.2.1 | ||||||
Summary | 0002880: MySQL code assumes only one database name is ever used | ||||||||
Description |
Say you have two MySQL servers at 1.2.3.4 and 1.2.3.5. Each one has a few databases (catalogs), no overlap in database names. <?php $conn = mysql_connect('1.2.3.4', 'myuser', 'mypass'); mysql_select_db('some_db', $conn); $conn2 = mysql_connect('1.2.3.5', 'myuser', 'mypass'); The above code will successfully connect to the 1.2.3.4 server and switch to the some_db database. But then the second mysql_connect() will fail with an "Unknown database 'some_db'" exception because the MySQL code is caching the last selected database name and sticking it on the end of the JDBC URL it uses to connect to the second database. |
||||||||
Additional Information | |||||||||
Attached Files | |||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
32 total queries executed. 28 unique queries executed. |