diff options
author | unknown <svoj@mysql.com> | 2005-11-12 11:25:14 +0400 |
---|---|---|
committer | unknown <svoj@mysql.com> | 2005-11-12 11:25:14 +0400 |
commit | dc44851352f68e240074ecc571216a8c2503ae0b (patch) | |
tree | 5124816e3828fbbe10b9d6f7b532f69567451db1 | |
parent | cde1be69d673d66ad1dec4b7b90a0320e8e3e83b (diff) | |
download | mariadb-git-dc44851352f68e240074ecc571216a8c2503ae0b.tar.gz |
Fix for BUG#5686 - #1034 - Incorrect key file for table - only utf8
myisam/ft_parser.c:
word->len calculation correction.
mysql-test/r/fulltext.result:
Test case for bug#5686.
mysql-test/t/fulltext.test:
Test case for bug#5686.
-rw-r--r-- | myisam/ft_parser.c | 4 | ||||
-rw-r--r-- | mysql-test/r/fulltext.result | 4 | ||||
-rw-r--r-- | mysql-test/t/fulltext.test | 6 |
3 files changed, 13 insertions, 1 deletions
diff --git a/myisam/ft_parser.c b/myisam/ft_parser.c index 0b1e68b0d70..8e4769ebc75 100644 --- a/myisam/ft_parser.c +++ b/myisam/ft_parser.c @@ -188,8 +188,10 @@ byte ft_simple_get_word(CHARSET_INFO *cs, byte **start, byte *end, for (word->pos=doc; doc<end; length++, mbl=my_mbcharlen(cs, *(uchar *)doc), doc+=(mbl ? mbl : 1)) if (true_word_char(cs,*doc)) mwc= 0; - else if (!misc_word_char(*doc) || mwc++) + else if (!misc_word_char(*doc) || mwc) break; + else + mwc++; word->len= (uint)(doc-word->pos) - mwc; diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index 8fa2df2e756..87551f96a13 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -428,4 +428,8 @@ REPAIR TABLE t1; Table Op Msg_type Msg_text test.t1 repair status OK SET myisam_repair_threads=@@global.myisam_repair_threads; +INSERT INTO t1 VALUES('testword\'\''); +SELECT a FROM t1 WHERE MATCH a AGAINST('testword' IN BOOLEAN MODE); +a +testword'' DROP TABLE t1; diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test index fa63778c4c1..7c7927b638b 100644 --- a/mysql-test/t/fulltext.test +++ b/mysql-test/t/fulltext.test @@ -348,6 +348,12 @@ INSERT INTO t1 VALUES('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'); SET myisam_repair_threads=2; REPAIR TABLE t1; SET myisam_repair_threads=@@global.myisam_repair_threads; + +# +# BUG#5686 - #1034 - Incorrect key file for table - only utf8 +# +INSERT INTO t1 VALUES('testword\'\''); +SELECT a FROM t1 WHERE MATCH a AGAINST('testword' IN BOOLEAN MODE); DROP TABLE t1; # End of 4.1 tests |