diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-11-22 10:19:31 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-11-22 10:19:31 +0100 |
commit | a48a91d90f07798deebe514d9d827fb719da7294 (patch) | |
tree | c438c045be1f3d8167b3746aa3ac87f848902aeb /mysql-test/suite/heap | |
parent | 3a1fdc9e7fc65e29320b988f9a69c8acab168ff9 (diff) | |
parent | 13ba0dd286f3296bfbbd202fa76d47770734b472 (diff) | |
download | mariadb-git-a48a91d90f07798deebe514d9d827fb719da7294.tar.gz |
5.3->5.5 merge
Diffstat (limited to 'mysql-test/suite/heap')
-rw-r--r-- | mysql-test/suite/heap/heap_hash.result | 20 | ||||
-rw-r--r-- | mysql-test/suite/heap/heap_hash.test | 17 |
2 files changed, 37 insertions, 0 deletions
diff --git a/mysql-test/suite/heap/heap_hash.result b/mysql-test/suite/heap/heap_hash.result index ac62427c81c..55d43588403 100644 --- a/mysql-test/suite/heap/heap_hash.result +++ b/mysql-test/suite/heap/heap_hash.result @@ -382,6 +382,26 @@ INSERT INTO t1 VALUES('A ', 'A '); ERROR 23000: Duplicate entry 'A -A ' for key 'key1' DROP TABLE t1; End of 5.0 tests +# +# MDEV-568 (AKA LP BUG#1007981, AKA MySQL bug#44771) +# Wrong result for a hash index look-up if the index is unique and +# the key is NULL +# +CREATE TABLE t1 ( pk INT PRIMARY KEY, val INT, UNIQUE KEY USING HASH(val)) ENGINE=MEMORY; +INSERT INTO t1 VALUES (1, NULL); +INSERT INTO t1 VALUES (2, NULL); +INSERT INTO t1 VALUES (3, 1); +INSERT INTO t1 VALUES (4, NULL); +EXPLAIN SELECT * FROM t1 WHERE val IS NULL; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref val val 5 const 1 Using where +SELECT * FROM t1 WHERE val IS NULL; +pk val +4 NULL +2 NULL +1 NULL +drop table t1; +End of 5.2 tests # bit index in heap tables create table t1 (a bit(63) not null) engine=heap; insert into t1 values (869751),(736494),(226312),(802616),(728912); diff --git a/mysql-test/suite/heap/heap_hash.test b/mysql-test/suite/heap/heap_hash.test index 80d6ef9c8f2..3fe95e14205 100644 --- a/mysql-test/suite/heap/heap_hash.test +++ b/mysql-test/suite/heap/heap_hash.test @@ -285,6 +285,23 @@ DROP TABLE t1; --echo End of 5.0 tests +--echo # +--echo # MDEV-568 (AKA LP BUG#1007981, AKA MySQL bug#44771) +--echo # Wrong result for a hash index look-up if the index is unique and +--echo # the key is NULL +--echo # +CREATE TABLE t1 ( pk INT PRIMARY KEY, val INT, UNIQUE KEY USING HASH(val)) ENGINE=MEMORY; + +INSERT INTO t1 VALUES (1, NULL); +INSERT INTO t1 VALUES (2, NULL); +INSERT INTO t1 VALUES (3, 1); +INSERT INTO t1 VALUES (4, NULL); +EXPLAIN SELECT * FROM t1 WHERE val IS NULL; +SELECT * FROM t1 WHERE val IS NULL; +drop table t1; + +--echo End of 5.2 tests + -- echo # bit index in heap tables create table t1 (a bit(63) not null) engine=heap; |