Description:
following is a copy from client
mysql> show databases; // show you my databases
+--------------------+
| Database |
+--------------------+
| information_schema |
| et |
| mysql |
| test |
+--------------------+
4 rows in set (0.00 sec)
mysql> use et // I may use et
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> use et; // but when I use et; ERROR 1049 happened
ERROR 1049 (42000): Unknown database 'et;'
mysql> status; // following is my server/client version
--------------
./bin/mysql Ver 14.12 Distrib 5.0.15, for pc-solaris2.10 (i386) using readline 5.0
Connection id: 6
Current database: et
Current user: charles@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.0.15-max
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: latin1
Conn. characterset: latin1
UNIX socket: /tmp/mysql.sock
Uptime: 1 hour 7 min 1 sec
Threads: 2 Questions: 125 Slow queries: 0 Opens: 0 Flush tables: 1 Open tables: 24 Queries per second avg: 0.031
--------------
mysql>
if the database name is long enough, the use operation can work normally. for example, I may use test, and I may use test; too.
Say, the bug appears if use a shorter-named database.
The bug get repeated when I tried to connect a lower version server (v4.1) via a 5.0.15 client (Solaris x86), so I think the bug has something to do with the client part.
How to repeat:
you may create a database which name is like kk, and maybe you need create a table.
try to connect the server:
$mysql -uyouname -p
then you can see mysql>
try use kk
mysql>use kk
you can see this operation works.
but when you type use kk;
mysql>use kk;
you can see something wrong, and the error message is:
ERROR 1049 (42000): Unknown database 'kk;'
Suggested fix:
something wrong with the client. check the codes and see what happens where use kk;