Bug #11851 SCHEMA() not listed as synonym for DATABASE()
Submitted: 10 Jul 2005 22:51 Modified: 19 Aug 2005 0:51
Reporter: Roland Bouman Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S4 (Feature request)
Version:5.0 OS:Any (*)
Assigned to: CPU Architecture:Any

[10 Jul 2005 22:51] Roland Bouman
Description:
The documentation section that describes the DATABASE() function does not list the SCHEMA() function as a SYNOYM.

How to repeat:
mysql> select schema()=database();
+---------------------+
| schema()=database() |
+---------------------+
|                   1 |
+---------------------+
1 row in set (0.00 sec)

Suggested fix:
Document the SCHEMA() function.
[12 Jul 2005 7:37] Geert Vanderkelen
Hi Roland,

Thanks for the report!

Looked up the patch where it was added:

--- 1.121/sql/lex.h	Thu Jul 15 15:15:15 2004
+++ 1.122/sql/lex.h	Fri Oct  1 12:35:21 2004
@@ -397,6 +397,8 @@
   { "ROW_FORMAT",	SYM(ROW_FORMAT_SYM)},
   { "RTREE",		SYM(RTREE_SYM)},
   { "SAVEPOINT",	SYM(SAVEPOINT_SYM)},
+  { "SCHEMA",		SYM(DATABASE)},
+  { "SCHEMAS",          SYM(DATABASES)},
   { "SECOND",		SYM(SECOND_SYM)},
   { "SECOND_MICROSECOND", SYM(SECOND_MICROSECOND_SYM)},
   { "SECURITY",         SYM(SECURITY_SYM)},
--- New file ---
+++ mysql-test/r/schema.result	04/10/01 12:35:21
create schema foo;
show create schema foo;
Database	Create Database
foo	CREATE DATABASE `foo` /*!40100 DEFAULT CHARACTER SET latin1 */
show schemas;
Database
foo
mysql
test
drop schema foo;

Regards,

Geert
[19 Aug 2005 0:51] Paul DuBois
Thank you for your bug report. This issue has been addressed in the
documentation. The updated documentation will appear on our website
shortly, and will be included in the next release of the relevant
product(s).