summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <brian@avenger.(none)>2004-10-01 12:39:11 -0700
committerunknown <brian@avenger.(none)>2004-10-01 12:39:11 -0700
commitd352949e1afb658cee7d0be64fe6eba2b89898be (patch)
tree698b999a8fe37eb1751e20a3ef989ef1b0313b13
parenta930fd3e565a1287cf95eaba37816c521a2df044 (diff)
downloadmariadb-git-d352949e1afb658cee7d0be64fe6eba2b89898be.tar.gz
Update to add keyword "SCHEMA" and "SCHEMAS". Small test case was added too.
sql/lex.h: Update to add compatibility keyword "SCHEMA"
-rw-r--r--mysql-test/r/schema.result10
-rw-r--r--mysql-test/t/schema.test8
-rw-r--r--sql/lex.h2
3 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/r/schema.result b/mysql-test/r/schema.result
new file mode 100644
index 00000000000..d7bd6fef655
--- /dev/null
+++ b/mysql-test/r/schema.result
@@ -0,0 +1,10 @@
+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;
diff --git a/mysql-test/t/schema.test b/mysql-test/t/schema.test
new file mode 100644
index 00000000000..d9bd607b2db
--- /dev/null
+++ b/mysql-test/t/schema.test
@@ -0,0 +1,8 @@
+#
+# Just a couple of tests to make sure that schema works.
+#
+
+create schema foo;
+show create schema foo;
+show schemas;
+drop schema foo;
diff --git a/sql/lex.h b/sql/lex.h
index 023c4752720..920325024f9 100644
--- a/sql/lex.h
+++ b/sql/lex.h
@@ -397,6 +397,8 @@ static SYMBOL symbols[] = {
{ "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)},