Loading mysql-test/r/fulltext.result +6 −0 Original line number Diff line number Diff line Loading @@ -150,3 +150,9 @@ select * from t1; id title 1 this test once revealed a bug update t1 set title=NULL where id=1; drop table t1; CREATE TABLE t1 (a int(11), b text, FULLTEXT KEY (b)) TYPE=MyISAM; insert into t1 values (1,"I wonder why the fulltext index doesnt work?"); SELECT * from t1 where MATCH (b) AGAINST ('apples'); a b drop table t1; mysql-test/t/fulltext.test +10 −0 Original line number Diff line number Diff line Loading @@ -129,3 +129,13 @@ 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; drop table t1; # one more bug - const_table related CREATE TABLE t1 (a int(11), b text, FULLTEXT KEY (b)) TYPE=MyISAM; insert into t1 values (1,"I wonder why the fulltext index doesnt work?"); SELECT * from t1 where MATCH (b) AGAINST ('apples'); drop table t1; sql/item_func.cc +1 −0 Original line number Diff line number Diff line Loading @@ -2108,6 +2108,7 @@ bool Item_func_match::fix_fields(THD *thd,struct st_table_list *tlist) key=NO_SUCH_KEY; const_item_cache=0; table=((Item_field *)fields.head())->field->table; table->fulltext_searched=1; record=table->record[0]; if (key == NO_SUCH_KEY && mode != FT_BOOL) { Loading sql/item_func.h +1 −0 Original line number Diff line number Diff line Loading @@ -930,6 +930,7 @@ class Item_func_match :public Item_real_func ft_handler=0; if(join_key) table->file->ft_handler=0; table->fulltext_searched=0; } if (concat) delete concat; } Loading sql/sql_select.cc +2 −1 Original line number Diff line number Diff line Loading @@ -982,7 +982,8 @@ make_join_statistics(JOIN *join,TABLE_LIST *tables,COND *conds, s->dependent=(table_map) 0; s->key_dependent=(table_map) 0; if ((table->system || table->file->records <= 1) && ! s->dependent && !(table->file->option_flag() & HA_NOT_EXACT_COUNT)) !(table->file->option_flag() & HA_NOT_EXACT_COUNT) && !table->fulltext_searched) { set_position(join,const_count++,s,(KEYUSE*) 0); } Loading Loading
mysql-test/r/fulltext.result +6 −0 Original line number Diff line number Diff line Loading @@ -150,3 +150,9 @@ select * from t1; id title 1 this test once revealed a bug update t1 set title=NULL where id=1; drop table t1; CREATE TABLE t1 (a int(11), b text, FULLTEXT KEY (b)) TYPE=MyISAM; insert into t1 values (1,"I wonder why the fulltext index doesnt work?"); SELECT * from t1 where MATCH (b) AGAINST ('apples'); a b drop table t1;
mysql-test/t/fulltext.test +10 −0 Original line number Diff line number Diff line Loading @@ -129,3 +129,13 @@ 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; drop table t1; # one more bug - const_table related CREATE TABLE t1 (a int(11), b text, FULLTEXT KEY (b)) TYPE=MyISAM; insert into t1 values (1,"I wonder why the fulltext index doesnt work?"); SELECT * from t1 where MATCH (b) AGAINST ('apples'); drop table t1;
sql/item_func.cc +1 −0 Original line number Diff line number Diff line Loading @@ -2108,6 +2108,7 @@ bool Item_func_match::fix_fields(THD *thd,struct st_table_list *tlist) key=NO_SUCH_KEY; const_item_cache=0; table=((Item_field *)fields.head())->field->table; table->fulltext_searched=1; record=table->record[0]; if (key == NO_SUCH_KEY && mode != FT_BOOL) { Loading
sql/item_func.h +1 −0 Original line number Diff line number Diff line Loading @@ -930,6 +930,7 @@ class Item_func_match :public Item_real_func ft_handler=0; if(join_key) table->file->ft_handler=0; table->fulltext_searched=0; } if (concat) delete concat; } Loading
sql/sql_select.cc +2 −1 Original line number Diff line number Diff line Loading @@ -982,7 +982,8 @@ make_join_statistics(JOIN *join,TABLE_LIST *tables,COND *conds, s->dependent=(table_map) 0; s->key_dependent=(table_map) 0; if ((table->system || table->file->records <= 1) && ! s->dependent && !(table->file->option_flag() & HA_NOT_EXACT_COUNT)) !(table->file->option_flag() & HA_NOT_EXACT_COUNT) && !table->fulltext_searched) { set_position(join,const_count++,s,(KEYUSE*) 0); } Loading