summaryrefslogtreecommitdiff
path: root/mysql-test/main
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-10-03 14:02:00 +0400
committerAlexander Barkov <bar@mariadb.com>2019-10-03 14:02:00 +0400
commitd168601e83dd69a229d43a577eddf2278def2bf6 (patch)
tree8628b9e1dbf17fce4faf6e44c0e527d452959c2f /mysql-test/main
parent54606df1a36e683b63604f7a3893a74723b16274 (diff)
downloadmariadb-git-d168601e83dd69a229d43a577eddf2278def2bf6.tar.gz
MDEV-20734 Allow reserved keywords as user defined type names
Diffstat (limited to 'mysql-test/main')
-rw-r--r--mysql-test/main/parser.result13
-rw-r--r--mysql-test/main/parser.test18
2 files changed, 31 insertions, 0 deletions
diff --git a/mysql-test/main/parser.result b/mysql-test/main/parser.result
index b39f496e3db..53377142dbd 100644
--- a/mysql-test/main/parser.result
+++ b/mysql-test/main/parser.result
@@ -1798,3 +1798,16 @@ ERROR HY000: Table 't2' was not locked with LOCK TABLES
SET STATEMENT max_statement_time=900 FOR unlock tables;
drop table t1, t2;
# End of 10.4 tests
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-20734 Allow reserved keywords as user defined type names
+#
+CREATE TABLE t1 (a DUAL);
+ERROR HY000: Unknown data type: 'DUAL'
+SELECT CAST(1 AS DUAL);
+ERROR HY000: Unknown data type: 'DUAL'
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/parser.test b/mysql-test/main/parser.test
index c6e9f13cdaf..2df25d4d02d 100644
--- a/mysql-test/main/parser.test
+++ b/mysql-test/main/parser.test
@@ -1566,3 +1566,21 @@ SET STATEMENT max_statement_time=900 FOR unlock tables;
drop table t1, t2;
--echo # End of 10.4 tests
+
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-20734 Allow reserved keywords as user defined type names
+--echo #
+
+--error ER_UNKNOWN_DATA_TYPE
+CREATE TABLE t1 (a DUAL);
+--error ER_UNKNOWN_DATA_TYPE
+SELECT CAST(1 AS DUAL);
+
+--echo #
+--echo # End of 10.5 tests
+--echo #