Bug #10407 Incorrect error is displayed when creating a teble with incorrect DB name.
Submitted: 6 May 2005 10:16 Modified: 25 Jul 2005 19:55
Reporter: Disha Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1.11, 5.0.4 Beta OS:Microsoft Windows (Windows 2003)
Assigned to: Jim Winstead CPU Architecture:Any

[6 May 2005 10:16] Disha
Description:
if we provide incorrect database name in the create table statement then incorrect error is displayed.

How to repeat:
1. Start the MySQL client and connect to the database with valid user and password.
2. Set the delimiter to //
3. Try to create a table by providing non existing database as follows:

   create table db1.tb1(f1 char(100))//

NOTE: db1 database does not exists.

Expected Results: 
1. Appropriate error should be displayed as the database does not exists.

Actual Results: 
1. Incorrrect error is displayed as follows:
"ERROR 1 (HY000): Can't create/write to file '.\db1\tb1.frm' (Errcode: 2)"
[6 May 2005 11:43] Hartmut Holzgraefe
Verified, happens on 4.1.11 (linux), too ...
[9 May 2005 7:23] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/24706
[31 May 2005 23:39] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/25424
[29 Jun 2005 11:17] Magnus BlÄudd
Approved
[22 Jul 2005 3:09] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/27459
[22 Jul 2005 21:45] Jim Winstead
Fixed in 4.1.14 and 5.0.11.
[25 Jul 2005 19:55] Mike Hillyer
Documented in 4.1.14 and 5.0.11 changelogs:

<listitem><para>Incorrect error message displayed if user attempted to create a table in a non-existing database using <literal>CREATE database_name.table_name</literal> syntax. (Bug #10407)</para></listitem>