diff options
-rw-r--r-- | mysql-test/r/default.result | 14 | ||||
-rw-r--r-- | mysql-test/t/default.test | 15 |
2 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/r/default.result b/mysql-test/r/default.result index 9afffe4c3bc..2ec961a4ce9 100644 --- a/mysql-test/r/default.result +++ b/mysql-test/r/default.result @@ -220,3 +220,17 @@ NULL 10 drop table t1, t2; End of 5.0 tests. +# +# Start of 10.1 tests +# +CREATE TABLE t1 (a INT DEFAULT 100, b INT DEFAULT NULL); +INSERT INTO t1 VALUES (); +SELECT * FROM t1 WHERE DEFAULT(a); +a b +100 NULL +SELECT * FROM t1 WHERE DEFAULT(b); +a b +DROP TABLE IF EXISTS t1; +# +# End of 10.1 tests +# diff --git a/mysql-test/t/default.test b/mysql-test/t/default.test index b719cb83448..6904d9bb242 100644 --- a/mysql-test/t/default.test +++ b/mysql-test/t/default.test @@ -166,3 +166,18 @@ drop table t1, t2; --echo End of 5.0 tests. +--echo # +--echo # Start of 10.1 tests +--echo # + +# Using DEFAULT(col) in WHERE condition +CREATE TABLE t1 (a INT DEFAULT 100, b INT DEFAULT NULL); +INSERT INTO t1 VALUES (); +SELECT * FROM t1 WHERE DEFAULT(a); +SELECT * FROM t1 WHERE DEFAULT(b); +DROP TABLE IF EXISTS t1; + + +--echo # +--echo # End of 10.1 tests +--echo # |