Bug #156 --one-database (-o) option of mysql client does not work properly
Submitted: 15 Mar 2003 22:57 Modified: 17 Mar 2003 6:18
Reporter: Peter Zaitsev (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:all OS:Any (all)
Assigned to: Jani Tolonen CPU Architecture:Any

[15 Mar 2003 22:57] Peter Zaitsev
Description:
mysql -o  test
does not work properly resulting in "Ignoring query to other database"
in queries for current database.
On other hand if "use database" is executed it starts to work OK.

How to repeat:
pz@abyss:~> mysql -o test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6 to server version: 4.0.12-debug

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show databases;
Ignoring query to other database
mysql> use test;
Database changed
mysql> show databases;
+----------+
| Database |
+----------+
| mysql    |
| repl     |
| test     |
+----------+
3 rows in set (0.00 sec)

Note: ofther queries like select * from a will also do not work.
[17 Mar 2003 6:18] Jani Tolonen
Fixed in 4.0, will be automerged to 4.1 later.
Regards,
Jani