Adding a test for Item_default_value in WHERE condition:

WHERE DEFAULT(col)
It seems this was not covered yet.
This commit is contained in:
Alexander Barkov 2015-05-04 18:31:24 +04:00
parent 462bca365a
commit 9090c3efca
2 changed files with 29 additions and 0 deletions

View file

@ -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
#

View file

@ -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 #