Loading mysql-test/r/fulltext.result +4 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,10 @@ Full-text indexes are called collections a b Full-text indexes are called collections Only MyISAM tables support collections a b Only MyISAM tables support collections Function MATCH ... AGAINST() is used to do a search some test foobar implements vector space model id id id Loading mysql-test/t/fulltext.test +3 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,9 @@ select * from t1 where MATCH(a,b) AGAINST ("collections"); select * from t1 where MATCH(a,b) AGAINST ("indexes"); select * from t1 where MATCH(a,b) AGAINST ("indexes collections"); delete from t1 where a like "MySQL%"; update t1 set a='some test foobar' where MATCH a,b AGAINST ('model'); delete from t1 where MATCH(a,b) AGAINST ("indexes"); select * from t1; drop table t1; # Loading sql/sql_delete.cc +10 −11 Original line number Diff line number Diff line Loading @@ -51,7 +51,6 @@ int generate_table(THD *thd, TABLE_LIST *table_list, TABLE *locked_table) pthread_mutex_unlock(&LOCK_open); } /* If it is a temporary table, close and regenerate it */ if ((table_ptr=find_temporary_table(thd,table_list->db, table_list->real_name))) Loading Loading @@ -163,7 +162,7 @@ int mysql_delete(THD *thd,TABLE_LIST *table_list,COND *conds,ha_rows limit, if (use_generate_table) DBUG_RETURN(generate_table(thd,table_list,table)); table->map=1; if (setup_conds(thd,table_list,&conds)) if (setup_conds(thd,table_list,&conds) || setup_ftfuncs(thd)) DBUG_RETURN(-1); table->used_keys=table->quick_keys=0; // Can't use 'only index' Loading Loading @@ -195,6 +194,7 @@ int mysql_delete(THD *thd,TABLE_LIST *table_list,COND *conds,ha_rows limit, (void) table->file->extra(HA_EXTRA_QUICK); init_read_record(&info,thd,table,select,-1,1); ulong deleted=0L; init_ftfuncs(thd,1); thd->proc_info="updating"; while (!(error=info.read_record(&info)) && !thd->killed) { Loading Loading @@ -255,4 +255,3 @@ int mysql_delete(THD *thd,TABLE_LIST *table_list,COND *conds,ha_rows limit, DBUG_RETURN(0); } sql/sql_update.cc +3 −1 Original line number Diff line number Diff line Loading @@ -70,7 +70,8 @@ int mysql_update(THD *thd,TABLE_LIST *table_list,List<Item> &fields, table->quick_keys=0; want_privilege=table->grant.want_privilege; table->grant.want_privilege=(SELECT_ACL & ~table->grant.privilege); if (setup_tables(table_list) || setup_conds(thd,table_list,&conds)) if (setup_tables(table_list) || setup_conds(thd,table_list,&conds) || setup_ftfuncs(thd)) DBUG_RETURN(-1); /* purecov: inspected */ old_used_keys=table->used_keys; // Keys used in WHERE Loading Loading @@ -134,6 +135,7 @@ int mysql_update(THD *thd,TABLE_LIST *table_list,List<Item> &fields, DBUG_RETURN(1); } } init_ftfuncs(thd,1); /* Check if we are modifying a key that we are used to search with */ if (select && select->quick) used_key_is_modified= (!select->quick->unique_key_range() && Loading Loading
mysql-test/r/fulltext.result +4 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,10 @@ Full-text indexes are called collections a b Full-text indexes are called collections Only MyISAM tables support collections a b Only MyISAM tables support collections Function MATCH ... AGAINST() is used to do a search some test foobar implements vector space model id id id Loading
mysql-test/t/fulltext.test +3 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,9 @@ select * from t1 where MATCH(a,b) AGAINST ("collections"); select * from t1 where MATCH(a,b) AGAINST ("indexes"); select * from t1 where MATCH(a,b) AGAINST ("indexes collections"); delete from t1 where a like "MySQL%"; update t1 set a='some test foobar' where MATCH a,b AGAINST ('model'); delete from t1 where MATCH(a,b) AGAINST ("indexes"); select * from t1; drop table t1; # Loading
sql/sql_delete.cc +10 −11 Original line number Diff line number Diff line Loading @@ -51,7 +51,6 @@ int generate_table(THD *thd, TABLE_LIST *table_list, TABLE *locked_table) pthread_mutex_unlock(&LOCK_open); } /* If it is a temporary table, close and regenerate it */ if ((table_ptr=find_temporary_table(thd,table_list->db, table_list->real_name))) Loading Loading @@ -163,7 +162,7 @@ int mysql_delete(THD *thd,TABLE_LIST *table_list,COND *conds,ha_rows limit, if (use_generate_table) DBUG_RETURN(generate_table(thd,table_list,table)); table->map=1; if (setup_conds(thd,table_list,&conds)) if (setup_conds(thd,table_list,&conds) || setup_ftfuncs(thd)) DBUG_RETURN(-1); table->used_keys=table->quick_keys=0; // Can't use 'only index' Loading Loading @@ -195,6 +194,7 @@ int mysql_delete(THD *thd,TABLE_LIST *table_list,COND *conds,ha_rows limit, (void) table->file->extra(HA_EXTRA_QUICK); init_read_record(&info,thd,table,select,-1,1); ulong deleted=0L; init_ftfuncs(thd,1); thd->proc_info="updating"; while (!(error=info.read_record(&info)) && !thd->killed) { Loading Loading @@ -255,4 +255,3 @@ int mysql_delete(THD *thd,TABLE_LIST *table_list,COND *conds,ha_rows limit, DBUG_RETURN(0); }
sql/sql_update.cc +3 −1 Original line number Diff line number Diff line Loading @@ -70,7 +70,8 @@ int mysql_update(THD *thd,TABLE_LIST *table_list,List<Item> &fields, table->quick_keys=0; want_privilege=table->grant.want_privilege; table->grant.want_privilege=(SELECT_ACL & ~table->grant.privilege); if (setup_tables(table_list) || setup_conds(thd,table_list,&conds)) if (setup_tables(table_list) || setup_conds(thd,table_list,&conds) || setup_ftfuncs(thd)) DBUG_RETURN(-1); /* purecov: inspected */ old_used_keys=table->used_keys; // Keys used in WHERE Loading Loading @@ -134,6 +135,7 @@ int mysql_update(THD *thd,TABLE_LIST *table_list,List<Item> &fields, DBUG_RETURN(1); } } init_ftfuncs(thd,1); /* Check if we are modifying a key that we are used to search with */ if (select && select->quick) used_key_is_modified= (!select->quick->unique_key_range() && Loading