mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
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:
parent
462bca365a
commit
9090c3efca
2 changed files with 29 additions and 0 deletions
|
@ -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 #
|
||||
|
|
Loading…
Add table
Reference in a new issue