Merge mysql.com:/home/svoj/devel/mysql/BUG11684/mysql-4.0

into  mysql.com:/home/svoj/devel/mysql/BUG11684/mysql-4.1
This commit is contained in:
svoj@mysql.com 2005-08-02 12:12:37 +05:00
commit 0f98bf44ef
3 changed files with 27 additions and 6 deletions

View file

@ -587,13 +587,15 @@ int thr_write_keys(MI_SORT_PARAM *sort_param)
while (!got_error &&
!my_b_read(&sinfo->tempfile_for_exceptions,(byte*)&key_length,
sizeof(key_length)) &&
!my_b_read(&sinfo->tempfile_for_exceptions,(byte*)mergebuf,
(uint) key_length))
sizeof(key_length)))
{
if (_mi_ck_write(info,sinfo->key,(uchar*) mergebuf,
key_length - info->s->rec_reflength))
got_error=1;
byte ft_buf[HA_FT_MAXLEN + HA_FT_WLEN + 10];
if (key_length > sizeof(ft_buf) ||
my_b_read(&sinfo->tempfile_for_exceptions, (byte*)ft_buf,
(uint)key_length) ||
_mi_ck_write(info, sinfo->key, (uchar*)ft_buf,
key_length - info->s->rec_reflength))
got_error=1;
}
}
}

View file

@ -421,3 +421,11 @@ SELECT COUNT(*) FROM t1 WHERE MATCH(t) AGAINST ('"osnabr
COUNT(*)
1
DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(30), FULLTEXT(a));
INSERT INTO t1 VALUES('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb');
SET myisam_repair_threads=2;
REPAIR TABLE t1;
Table Op Msg_type Msg_text
test.t1 repair status OK
SET myisam_repair_threads=@@global.myisam_repair_threads;
DROP TABLE t1;

View file

@ -339,4 +339,15 @@ INSERT INTO t1 VALUES('Mit freundlichem Gr
SELECT COUNT(*) FROM t1 WHERE MATCH(t) AGAINST ('"osnabrück"' IN BOOLEAN MODE);
DROP TABLE t1;
#
# BUG#11684 - repair crashes mysql when table has fulltext index
#
CREATE TABLE t1 (a VARCHAR(30), FULLTEXT(a));
INSERT INTO t1 VALUES('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb');
SET myisam_repair_threads=2;
REPAIR TABLE t1;
SET myisam_repair_threads=@@global.myisam_repair_threads;
DROP TABLE t1;
# End of 4.1 tests