Bug #48521 s/database/schema/g (Error messages)
Submitted: 4 Nov 2009 0:37 Modified: 16 Sep 2010 10:37
Reporter: Konstantin Osipov (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version:5.0+ OS:Any
Assigned to: CPU Architecture:Any

[4 Nov 2009 0:37] Konstantin Osipov
Description:
mysql> create schema s1;
Query OK, 1 row affected (0.00 sec)

mysql> use s1;
Database changed
mysql> show tables;
Empty set (0.00 sec)

mysql> show schemas;
+--------------------+
| Database           |
+--------------------+
| information_schema | 
| bug48067           | 
| mysql              | 
| s1                 | 
| test               | 
+--------------------+
5 rows in set (0.00 sec)

mysql> drop schema s1;
Query OK, 0 rows affected (0.00 sec)

mysql> use s1;
ERROR 1049 (42000): Unknown database 's1'

Pay attention to the text of the message. It should say "Unknown schema", not "Unknown database".

How to repeat:
use non_existing_schema;
[4 Nov 2009 0:57] MySQL Verification Team
Thank you for the bug report.
[16 Sep 2010 5:45] Konstantin Osipov
This bug has been sitting in "Analyzing" for a year.
Falling back to "Open" for verification.
[16 Sep 2010 10:37] MySQL Verification Team
Sorry I forgot to change the Status:

C:\DBS>c:\dbs\5.1\bin\mysql -uroot --port=3306 --prompt="mysql 5.1 >"
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.51-Win X64-log Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql 5.1 >create schema s1;
Query OK, 1 row affected (0.02 sec)

mysql 5.1 >use s1;
Database changed
mysql 5.1 >show tables;
Empty set (0.07 sec)

mysql 5.1 >show schemas;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| d5                 |
| d7                 |
| mysql              |
| s1                 |
| test               |
+--------------------+
6 rows in set (0.07 sec)

mysql 5.1 >drop schema s1;
Query OK, 0 rows affected (0.10 sec)

mysql 5.1 >use s1;
ERROR 1049 (42000): Unknown database 's1'
mysql 5.1 >