Bug #3647 | Unable to "USE databasename" if database has been dropped and then recreated.. | ||
---|---|---|---|
Submitted: | 4 May 2004 9:37 | Modified: | 4 May 2004 22:12 |
Reporter: | cami sardinha | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Installing | Severity: | S2 (Serious) |
Version: | 4.1.1 | OS: | Linux (Fedora Core 1) |
Assigned to: | CPU Architecture: | Any |
[4 May 2004 9:37]
cami sardinha
[4 May 2004 14:31]
Tobias Asplund
Bug is only triggered when you DROP/CREATE the database you're currently using. ==================== mysql> USE foo; Database changed mysql> DROP DATABASE foo; Query OK, 1 row affected (0.00 sec) mysql> CREATE DATABASE foo; Query OK, 1 row affected (0.00 sec) mysql> USE foo; Database changed mysql> CREATE TABLE foo ( bar INT); ERROR 1046 (3D000): No Database Selected ==================== mysql> USE test; Database changed mysql> DROP DATABASE foo; Query OK, 1 row affected (0.00 sec) mysql> CREATE DATABASE foo; Query OK, 1 row affected (0.00 sec) mysql> USE foo; Database changed mysql> CREATE TABLE foo ( bar INT); Query OK, 0 rows affected (0.11 sec) ==================== Seems like the client still thinks it's in the database that got dropped, and when you later issue a USE it thinks that you're trying to change to your current database and ignores it? doing a USE test; USE foo; makes the first example work since you actually change to a different than your "current" database.
[4 May 2004 14:36]
cami sardinha
If it the client which is having trouble, then its the client that is coming bundled with the 4.1.1 binary package as i didnt not have any mysql package installed on there before.. Using the 4.0 stable binary package doesnt have this issue. Can you confirm that the problem is infact with the 4.1.1 client binary or confirm that its not..
[4 May 2004 22:12]
Michael Widenius
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. If necessary, you can access the source repository and build the latest available version, including the bugfix, yourself. More information about accessing the source trees is available at http://www.mysql.com/doc/en/Installing_source_tree.html Additional info: This is same as bug 2205. This was fixed in the 4.1 source tree in January and will be in 4.1.2