diff --git a/myisam/ft_update.c b/myisam/ft_update.c index a946b0beabe..8ffc35157d2 100644 --- a/myisam/ft_update.c +++ b/myisam/ft_update.c @@ -159,9 +159,10 @@ int _mi_ft_cmp(MI_INFO *info, uint keynr, const byte *rec1, const byte *rec2) while(_mi_ft_segiterator(&ftsi1) && _mi_ft_segiterator(&ftsi2)) { if ((ftsi1.pos != ftsi2.pos) && + (!ftsi1.pos || !ftsi2.pos || _mi_compare_text(default_charset_info, (uchar*) ftsi1.pos,ftsi1.len, - (uchar*) ftsi2.pos,ftsi2.len,0)) + (uchar*) ftsi2.pos,ftsi2.len,0))) return THOSE_TWO_DAMN_KEYS_ARE_REALLY_DIFFERENT; } return GEE_THEY_ARE_ABSOLUTELY_IDENTICAL; diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index 6660a788646..1d03dffa76a 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -149,3 +149,4 @@ update t1 set title='this test once revealed a bug' where id=1; select * from t1; id title 1 this test once revealed a bug +update t1 set title=NULL where id=1; diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test index 50931637188..ace51217bba 100644 --- a/mysql-test/t/fulltext.test +++ b/mysql-test/t/fulltext.test @@ -128,4 +128,4 @@ update t1 set title='this is A test' where id=1; check table t1; update t1 set title='this test once revealed a bug' where id=1; select * from t1; - +update t1 set title=NULL where id=1;