Merge mysql.com:/home/ram/work/mysql-5.1-maint

into  mysql.com:/home/ram/work/b30885/b30885.5.1
parents c51df4a5 981ebebf
...@@ -321,4 +321,12 @@ DROP TABLE t1; ...@@ -321,4 +321,12 @@ DROP TABLE t1;
CREATE TABLE t1 (a INT, UNIQUE USING BTREE(a)) ENGINE=MEMORY; CREATE TABLE t1 (a INT, UNIQUE USING BTREE(a)) ENGINE=MEMORY;
INSERT INTO t1 VALUES(NULL),(NULL); INSERT INTO t1 VALUES(NULL),(NULL);
DROP TABLE t1; DROP TABLE t1;
create table t1(a varchar(255), b varchar(255),
key using btree (a,b)) engine=memory;
insert into t1 values (1, 1), (3, 3), (2, 2), (NULL, 1), (NULL, NULL), (0, 0);
select * from t1 where a is null;
a b
NULL NULL
NULL 1
drop table t1;
End of 5.0 tests End of 5.0 tests
...@@ -235,5 +235,14 @@ CREATE TABLE t1 (a INT, UNIQUE USING BTREE(a)) ENGINE=MEMORY; ...@@ -235,5 +235,14 @@ CREATE TABLE t1 (a INT, UNIQUE USING BTREE(a)) ENGINE=MEMORY;
INSERT INTO t1 VALUES(NULL),(NULL); INSERT INTO t1 VALUES(NULL),(NULL);
DROP TABLE t1; DROP TABLE t1;
#
# Bug #30885: MEMORY returns incorrect data if BTREE index is used for NULL lookup
#
create table t1(a varchar(255), b varchar(255),
key using btree (a,b)) engine=memory;
insert into t1 values (1, 1), (3, 3), (2, 2), (NULL, 1), (NULL, NULL), (0, 0);
select * from t1 where a is null;
drop table t1;
--echo End of 5.0 tests --echo End of 5.0 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