summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/create.result6
-rw-r--r--mysql-test/t/create.test12
2 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index 627913939fb..22743782484 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -216,3 +216,9 @@ a b
0 2
3 4
drop table t1;
+create table `t1 `(a int);
+Incorrect table name 't1 '
+create database `db1 `;
+Incorrect database name 'db1 '
+create table t1(`a ` int);
+Incorrect column name 'a '
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test
index 8aee586268f..94c2f24dffc 100644
--- a/mysql-test/t/create.test
+++ b/mysql-test/t/create.test
@@ -179,3 +179,15 @@ create table if not exists t1 select 3 as 'a',4 as 'b';
create table if not exists t1 select 3 as 'a',3 as 'b';
select * from t1;
drop table t1;
+
+#
+# Test for Bug #2985
+# "Table truncated when creating another table name with Spaces"
+#
+
+--error 1103
+create table `t1 `(a int);
+--error 1102
+create database `db1 `;
+--error 1166;
+create table t1(`a ` int);