Commit 9090c3ef authored by Alexander Barkov's avatar Alexander Barkov

Adding a test for Item_default_value in WHERE condition:

  WHERE DEFAULT(col)
It seems this was not covered yet.
parent 462bca36
......@@ -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
#
......@@ -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 #
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment