|
Mantis - Quercus
|
|||||
| Viewing Issue Advanced Details | |||||
|
|
|||||
| ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
| 2880 | major | always | 08-29-08 00:05 | 09-05-08 15:59 | |
|
|
|||||
| Reporter: | koreth | Platform: | |||
| Assigned To: | nam | OS: | |||
| Priority: | high | OS Version: | |||
| Status: | closed | Product Version: | 3.2.1 | ||
| Product Build: | Resolution: | fixed | |||
| Projection: | none | ||||
| ETA: | none | Fixed in 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. |
||||
| Steps To Reproduce: | |||||
| Additional Information: | |||||
| Relationships | |||||
| Attached Files: | |||||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||