List:Commits« Previous MessageNext Message »
From:Sergey Vojtovich Date:January 23 2006 1:15pm
Subject:bk commit into 4.1 tree (svoj:1.2452) BUG#16489
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of svoj. When svoj does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2452 06/01/23 17:15:33 svoj@april.(none) +3 -0
  BUG#16489 - utf8 + fulltext leads to corrupt index file.
  Fixed that UPDATE statement crashes multi-byte charset fulltext index.

  mysql-test/t/fulltext2.test
    1.13 06/01/23 17:15:31 svoj@april.(none) +8 -0
    Added a testcase for BUG#16489.

  mysql-test/r/fulltext2.result
    1.11 06/01/23 17:15:31 svoj@april.(none) +5 -0
    Added a testcase for BUG#16489.

  myisam/ft_update.c
    1.36 06/01/23 17:15:31 svoj@april.(none) +4 -0
    Fixed that UPDATE statement crashes multi-byte charset fulltext index.
    While updating, always rewrite multi-byte charset fulltext index.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	svoj
# Host:	april.(none)
# Root:	/home/svoj/devel/mysql/BUG16489/mysql-4.1

--- 1.35/myisam/ft_update.c	2004-03-25 17:04:58 +04:00
+++ 1.36/myisam/ft_update.c	2006-01-23 17:15:31 +04:00
@@ -170,6 +170,10 @@
   FT_SEG_ITERATOR ftsi1, ftsi2;
   CHARSET_INFO *cs=info->s->keyinfo[keynr].seg->charset;
   DBUG_ENTER("_mi_ft_cmp");
+#ifndef MYSQL_HAS_TRUE_CTYPE_IMPLEMENTATION
+  if (cs->mbmaxlen > 1)
+    DBUG_RETURN(THOSE_TWO_DAMN_KEYS_ARE_REALLY_DIFFERENT);
+#endif
 
   _mi_ft_segiterator_init(info, keynr, rec1, &ftsi1);
   _mi_ft_segiterator_init(info, keynr, rec2, &ftsi2);

--- 1.10/mysql-test/r/fulltext2.result	2005-12-18 16:29:47 +04:00
+++ 1.11/mysql-test/r/fulltext2.result	2006-01-23 17:15:31 +04:00
@@ -234,5 +234,10 @@
 ('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
 ('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test');
 delete from t1 limit 1;
+truncate table t1;
+insert into t1 values('ab c d');
+update t1 set a='ab c d';
+select * from t1 where match a against('ab c' in boolean mode);
+a
 drop table t1;
 set names latin1;

--- 1.12/mysql-test/t/fulltext2.test	2005-12-18 16:29:47 +04:00
+++ 1.13/mysql-test/t/fulltext2.test	2006-01-23 17:15:31 +04:00
@@ -209,6 +209,14 @@
 ('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
 ('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test');
 delete from t1 limit 1;
+
+#
+# BUG#16489: utf8 + fulltext leads to corrupt index file.
+#
+truncate table t1;
+insert into t1 values('ab c d');
+update t1 set a='ab c d';
+select * from t1 where match a against('ab c' in boolean mode);
 drop table t1;
 set names latin1;
 
Thread
bk commit into 4.1 tree (svoj:1.2452) BUG#16489Sergey Vojtovich23 Jan