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

into  april.(none):/home/svoj/devel/mysql/BUG17001/mysql-5.0
This commit is contained in:
unknown 2006-05-24 15:19:48 +05:00
commit 3ebf191662
3 changed files with 12 additions and 1 deletions

View file

@ -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);
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;
}
else

View file

@ -256,3 +256,6 @@ SELECT INDEX_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=DATABASE()
INDEX_LENGTH
21
DROP TABLE t1;
CREATE TABLE t1 (a INT, UNIQUE USING BTREE(a)) ENGINE=MEMORY;
INSERT INTO t1 VALUES(NULL),(NULL);
DROP TABLE t1;

View file

@ -176,4 +176,12 @@ UPDATE t1 SET val=1;
SELECT INDEX_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME='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