Commit 078b84bd authored by unknown's avatar unknown

Added tests with IGNORE and NULL values

parent aba5100d
...@@ -629,7 +629,23 @@ DELETE FROM t1; ...@@ -629,7 +629,23 @@ DELETE FROM t1;
CREATE UNIQUE INDEX ai ON t1(a); CREATE UNIQUE INDEX ai ON t1(a);
INSERT IGNORE INTO t1 VALUES (1); INSERT IGNORE INTO t1 VALUES (1);
INSERT IGNORE INTO t1 VALUES (1); INSERT IGNORE INTO t1 VALUES (1);
INSERT IGNORE INTO t1 VALUES (NULL),(2);
SELECT * FROM t1 ORDER BY a; SELECT * FROM t1 ORDER BY a;
a a
NULL
1 1
2
DROP TABLE t1;
CREATE TABLE t1(pk INT NOT NULL PRIMARY KEY, a INT, UNIQUE (a)) ENGINE=ndb;
INSERT IGNORE INTO t1 VALUES (1,1),(2,2),(3,3);
INSERT IGNORE INTO t1 VALUES (4,NULL),(5,NULL),(6,NULL),(7,4);
SELECT * FROM t1 ORDER BY pk;
pk a
1 1
2 2
3 3
4 NULL
5 NULL
6 NULL
7 4
DROP TABLE t1; DROP TABLE t1;
...@@ -619,7 +619,15 @@ DELETE FROM t1; ...@@ -619,7 +619,15 @@ DELETE FROM t1;
CREATE UNIQUE INDEX ai ON t1(a); CREATE UNIQUE INDEX ai ON t1(a);
INSERT IGNORE INTO t1 VALUES (1); INSERT IGNORE INTO t1 VALUES (1);
INSERT IGNORE INTO t1 VALUES (1); INSERT IGNORE INTO t1 VALUES (1);
INSERT IGNORE INTO t1 VALUES (NULL),(2);
SELECT * FROM t1 ORDER BY a; SELECT * FROM t1 ORDER BY a;
DROP TABLE t1; DROP TABLE t1;
# Ignore and NULL values
CREATE TABLE t1(pk INT NOT NULL PRIMARY KEY, a INT, UNIQUE (a)) ENGINE=ndb;
INSERT IGNORE INTO t1 VALUES (1,1),(2,2),(3,3);
INSERT IGNORE INTO t1 VALUES (4,NULL),(5,NULL),(6,NULL),(7,4);
SELECT * FROM t1 ORDER BY pk;
DROP TABLE t1;
# End of 4.1 tests # End of 4.1 tests
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