summaryrefslogtreecommitdiff
path: root/mysql-test/r/default.result
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-07-24 14:54:52 +0200
committerSergei Golubchik <serg@mariadb.org>2016-08-27 16:59:12 +0200
commit4070d55735f1642e563b8d60fc2e9771f4963a3f (patch)
tree1d8569fbc15ec6562b685729424f806800893233 /mysql-test/r/default.result
parent3aff76f3750cf1ce2a58f093cb46190c2417f3bd (diff)
downloadmariadb-git-4070d55735f1642e563b8d60fc2e9771f4963a3f.tar.gz
fix: CHECK and DEFAULT after CREATE ... SELECT
expression defaults and check constraints should behave as constant default values - copied from fields, not copied from expressions
Diffstat (limited to 'mysql-test/r/default.result')
-rw-r--r--mysql-test/r/default.result18
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/r/default.result b/mysql-test/r/default.result
index 62dee045604..81568d6c654 100644
--- a/mysql-test/r/default.result
+++ b/mysql-test/r/default.result
@@ -3063,3 +3063,21 @@ t1 CREATE TABLE `t1` (
`c` int(11) DEFAULT (-a)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
+create table t1 (a int default 5 check (a>10), b int default (5+5), c int as (a+b));
+create table t2 as select a, b, c from t1;
+create table t3 as select max(a), max(b), max(c) from t1;
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT 5 CHECK (a>10),
+ `b` int(11) DEFAULT (5+5),
+ `c` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show create table t3;
+Table Create Table
+t3 CREATE TABLE `t3` (
+ `max(a)` int(11) DEFAULT NULL,
+ `max(b)` int(11) DEFAULT NULL,
+ `max(c)` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1, t2, t3;