Commit ecd4ac2a authored by unknown's avatar unknown

test for NULL processing has been added

parent 87db341d
......@@ -213,6 +213,20 @@ a b
INSERT INTO t1 VALUES (1,3);
Duplicate entry '3' for key 1
DROP TABLE t1;
CREATE TABLE t1 (a int, b int, c int, key using BTREE (a, b, c)) type=heap;
INSERT INTO t1 VALUES (1, NULL, NULL), (1, 1, NULL), (1, NULL, 1);
SELECT * FROM t1 WHERE a=1 and b IS NULL;
a b c
1 NULL NULL
1 NULL 1
SELECT * FROM t1 WHERE a=1 and c IS NULL;
a b c
1 NULL NULL
1 1 NULL
SELECT * FROM t1 WHERE a=1 and b IS NULL and c IS NULL;
a b c
1 NULL NULL
DROP TABLE t1;
CREATE TABLE t1 (a int not null, primary key using BTREE (a)) type=heap;
INSERT into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11);
DELETE from t1 where a < 100;
......
......@@ -137,6 +137,13 @@ SELECT * FROM t1 WHERE b<=>NULL;
INSERT INTO t1 VALUES (1,3);
DROP TABLE t1;
CREATE TABLE t1 (a int, b int, c int, key using BTREE (a, b, c)) type=heap;
INSERT INTO t1 VALUES (1, NULL, NULL), (1, 1, NULL), (1, NULL, 1);
SELECT * FROM t1 WHERE a=1 and b IS NULL;
SELECT * FROM t1 WHERE a=1 and c IS NULL;
SELECT * FROM t1 WHERE a=1 and b IS NULL and c IS NULL;
DROP TABLE t1;
#
# Test when deleting all rows
#
......
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