Commit 3ebf1916 authored by unknown's avatar unknown

Merge april.(none):/home/svoj/devel/mysql/BUG12873/mysql-5.0

into  april.(none):/home/svoj/devel/mysql/BUG17001/mysql-5.0

parents c06d757e ca88ca16
...@@ -105,7 +105,7 @@ int hp_rb_write_key(HP_INFO *info, HP_KEYDEF *keyinfo, const byte *record, ...@@ -105,7 +105,7 @@ int hp_rb_write_key(HP_INFO *info, HP_KEYDEF *keyinfo, const byte *record,
custom_arg.key_length= hp_rb_make_key(keyinfo, info->recbuf, record, recpos); custom_arg.key_length= hp_rb_make_key(keyinfo, info->recbuf, record, recpos);
if (keyinfo->flag & HA_NOSAME) if (keyinfo->flag & HA_NOSAME)
{ {
custom_arg.search_flag= SEARCH_FIND | SEARCH_SAME | SEARCH_UPDATE; custom_arg.search_flag= SEARCH_FIND | SEARCH_UPDATE;
keyinfo->rb_tree.flag= TREE_NO_DUPS; keyinfo->rb_tree.flag= TREE_NO_DUPS;
} }
else else
......
...@@ -256,3 +256,6 @@ SELECT INDEX_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=DATABASE() ...@@ -256,3 +256,6 @@ SELECT INDEX_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=DATABASE()
INDEX_LENGTH INDEX_LENGTH
21 21
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (a INT, UNIQUE USING BTREE(a)) ENGINE=MEMORY;
INSERT INTO t1 VALUES(NULL),(NULL);
DROP TABLE t1;
...@@ -176,4 +176,12 @@ UPDATE t1 SET val=1; ...@@ -176,4 +176,12 @@ UPDATE t1 SET val=1;
SELECT INDEX_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME='t1'; SELECT INDEX_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME='t1';
DROP TABLE t1; DROP TABLE t1;
#
# BUG#12873 - BTREE index on MEMORY table with multiple NULL values doesn't
# work properly
#
CREATE TABLE t1 (a INT, UNIQUE USING BTREE(a)) ENGINE=MEMORY;
INSERT INTO t1 VALUES(NULL),(NULL);
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