summaryrefslogtreecommitdiff
path: root/mysql-test/t/default.test
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-11-07 17:17:40 +0100
committerSergei Golubchik <serg@mariadb.org>2016-12-12 20:35:41 +0100
commita411d7f4f670c24b43b50f7d2a1129e10218f4a7 (patch)
treecc1e9cdf6b85bdcec8c0369e502d4d211b2f7263 /mysql-test/t/default.test
parent8b3b6dc377c548b1b72978a015af999cf6e99760 (diff)
downloadmariadb-git-a411d7f4f670c24b43b50f7d2a1129e10218f4a7.tar.gz
store/show vcols as item->print()
otherwise we'd need to store sql_mode *per vcol* (consider CREATE INDEX...) and how SHOW CREATE TABLE would support that? Additionally, get rid of vcol::expr_str, just to make sure the string is always generated and never leaked in the original form.
Diffstat (limited to 'mysql-test/t/default.test')
-rw-r--r--mysql-test/t/default.test25
1 files changed, 22 insertions, 3 deletions
diff --git a/mysql-test/t/default.test b/mysql-test/t/default.test
index 5f00debbc3a..6eca3a64562 100644
--- a/mysql-test/t/default.test
+++ b/mysql-test/t/default.test
@@ -448,11 +448,12 @@ DEALLOCATE PREPARE stmt;
# We can't have an expression for prepared statements
#
-PREPARE stmt FROM 'CREATE TABLE t1 (a INT DEFAULT(?+?))';
+prepare stmt from 'create table t1 (a int default(?+?))';
set @a=1;
---error ER_PARSE_ERROR
execute stmt using @a,@a;
-DEALLOCATE PREPARE stmt;
+deallocate prepare stmt;
+show create table t1;
+drop table t1;
--echo #
--echo # Parenthesized Item_basic_constant
@@ -1974,3 +1975,21 @@ DROP TABLE t1;
--echo # end of 10.2 test
+
+#
+# ANSI_QUOTES
+#
+set sql_mode=ansi_quotes;
+create table t1 (a int, b int default (a+1));
+show create table t1;
+insert t1 (a) values (10);
+set sql_mode='';
+show create table t1;
+insert t1 (a) values (20);
+flush tables;
+show create table t1;
+insert t1 (a) values (30);
+select * from t1;
+drop table t1;
+set sql_mode=default;
+