summaryrefslogtreecommitdiff
path: root/mysql-test/t/default.test
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2015-05-04 18:31:24 +0400
committerAlexander Barkov <bar@mariadb.org>2015-05-04 18:31:24 +0400
commit9090c3efcae0874219b990e73568e41e021a3352 (patch)
tree63e77611694166d22938f018e626b97092875c9a /mysql-test/t/default.test
parent462bca365ad3e8cda99b044bcf63d3ec5dc78bd9 (diff)
downloadmariadb-git-9090c3efcae0874219b990e73568e41e021a3352.tar.gz
Adding a test for Item_default_value in WHERE condition:
WHERE DEFAULT(col) It seems this was not covered yet.
Diffstat (limited to 'mysql-test/t/default.test')
-rw-r--r--mysql-test/t/default.test15
1 files changed, 15 insertions, 0 deletions
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 #