Bug #172 Inconsistent behavior of MySQL when creating a database called "database."
Submitted: 20 Mar 2003 16:55 Modified: 24 Mar 2003 16:42
Reporter: [ name withheld ] Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.0.11-gamma OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[20 Mar 2003 16:55] [ name withheld ]
Description:
mysqladmin command (mysqladmin create database) allows you to create a database called "database."  Trying to do the same using mysql client (create database database;) returns an syntax error.  Once the "database" has been created using the mysqladmin command, you can't drop it either.  

How to repeat:

Suggested fix:
We need to be consistent here.  We have to either disallow or allow "database" as database name.
[24 Mar 2003 16:42] Michael Widenius
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.mysql.com/documentation/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

This is not a bug. The problem is that 'database' is a reserved word and if you want to use it in the mysql client you must quote it:

DROP DATABASE `DATABASE`