Loading mysql-test/r/myisam.result +17 −0 Original line number Diff line number Diff line Loading @@ -31,3 +31,20 @@ check table t1; Table Op Msg_type Msg_text test.t1 check status OK drop table t1; create table t1 (a int not null auto_increment, b int not null, primary key (a), index(b)); insert into t1 (b) values (1),(2),(2),(2),(2); optimize table t1; Table Op Msg_type Msg_text test.t1 optimize status OK show index from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment t1 0 PRIMARY 1 a A 5 NULL NULL t1 1 b 1 b A 1 NULL NULL optimize table t1; Table Op Msg_type Msg_text test.t1 optimize status Table is already up to date show index from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment t1 0 PRIMARY 1 a A 5 NULL NULL t1 1 b 1 b A 1 NULL NULL drop table t1; sql/item_func.cc +1 −4 Original line number Diff line number Diff line Loading @@ -2164,10 +2164,7 @@ bool Item_func_match::eq(const Item *item) const double Item_func_match::val() { if (ft_handler==NULL) init_search(1); if ((null_value= (ft_handler==NULL))) return 0.0; return -1.0; if (join_key) { Loading sql/sql_base.cc +3 −3 Original line number Diff line number Diff line Loading @@ -2174,8 +2174,8 @@ bool remove_table_from_cache(THD *thd, const char *db, const char *table_name, int setup_ftfuncs(THD *thd) { List_iterator<Item_func_match> li(thd->lex.ftfunc_list), lj(thd->lex.ftfunc_list); List_iterator<Item_func_match> li(thd->lex.select_lex.ftfunc_list), lj(thd->lex.select_lex.ftfunc_list); Item_func_match *ftf, *ftf2; while ((ftf=li++)) Loading @@ -2195,7 +2195,7 @@ int setup_ftfuncs(THD *thd) int init_ftfuncs(THD *thd, bool no_order) { List_iterator<Item_func_match> li(thd->lex.ftfunc_list); List_iterator<Item_func_match> li(thd->lex.select_lex.ftfunc_list); Item_func_match *ifm; DBUG_PRINT("info",("Performing FULLTEXT search")); thd->proc_info="FULLTEXT initialization"; Loading sql/sql_delete.cc +2 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK); thd->proc_info="init"; table->map=1; if (setup_conds(thd,table_list,&conds)) if (setup_conds(thd,table_list,&conds) || setup_ftfuncs(thd)) DBUG_RETURN(-1); /* Test if the user wants to delete all rows */ Loading Loading @@ -130,6 +130,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, init_read_record(&info,thd,table,select,1,1); deleted=0L; init_ftfuncs(thd,1); thd->proc_info="updating"; while (!(error=info.read_record(&info)) && !thd->killed) { Loading sql/sql_parse.cc +1 −1 Original line number Diff line number Diff line Loading @@ -1718,7 +1718,7 @@ mysql_execute_command(void) table_count)) && ! thd->fatal_error) { res=mysql_select(thd,tables,select_lex->item_list, select_lex->where,select_lex->ftfunc_list, select_lex->where, (ORDER *)NULL,(ORDER *)NULL,(Item *)NULL, (ORDER *)NULL, select_lex->options | thd->options | Loading Loading
mysql-test/r/myisam.result +17 −0 Original line number Diff line number Diff line Loading @@ -31,3 +31,20 @@ check table t1; Table Op Msg_type Msg_text test.t1 check status OK drop table t1; create table t1 (a int not null auto_increment, b int not null, primary key (a), index(b)); insert into t1 (b) values (1),(2),(2),(2),(2); optimize table t1; Table Op Msg_type Msg_text test.t1 optimize status OK show index from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment t1 0 PRIMARY 1 a A 5 NULL NULL t1 1 b 1 b A 1 NULL NULL optimize table t1; Table Op Msg_type Msg_text test.t1 optimize status Table is already up to date show index from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment t1 0 PRIMARY 1 a A 5 NULL NULL t1 1 b 1 b A 1 NULL NULL drop table t1;
sql/item_func.cc +1 −4 Original line number Diff line number Diff line Loading @@ -2164,10 +2164,7 @@ bool Item_func_match::eq(const Item *item) const double Item_func_match::val() { if (ft_handler==NULL) init_search(1); if ((null_value= (ft_handler==NULL))) return 0.0; return -1.0; if (join_key) { Loading
sql/sql_base.cc +3 −3 Original line number Diff line number Diff line Loading @@ -2174,8 +2174,8 @@ bool remove_table_from_cache(THD *thd, const char *db, const char *table_name, int setup_ftfuncs(THD *thd) { List_iterator<Item_func_match> li(thd->lex.ftfunc_list), lj(thd->lex.ftfunc_list); List_iterator<Item_func_match> li(thd->lex.select_lex.ftfunc_list), lj(thd->lex.select_lex.ftfunc_list); Item_func_match *ftf, *ftf2; while ((ftf=li++)) Loading @@ -2195,7 +2195,7 @@ int setup_ftfuncs(THD *thd) int init_ftfuncs(THD *thd, bool no_order) { List_iterator<Item_func_match> li(thd->lex.ftfunc_list); List_iterator<Item_func_match> li(thd->lex.select_lex.ftfunc_list); Item_func_match *ifm; DBUG_PRINT("info",("Performing FULLTEXT search")); thd->proc_info="FULLTEXT initialization"; Loading
sql/sql_delete.cc +2 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK); thd->proc_info="init"; table->map=1; if (setup_conds(thd,table_list,&conds)) if (setup_conds(thd,table_list,&conds) || setup_ftfuncs(thd)) DBUG_RETURN(-1); /* Test if the user wants to delete all rows */ Loading Loading @@ -130,6 +130,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, init_read_record(&info,thd,table,select,1,1); deleted=0L; init_ftfuncs(thd,1); thd->proc_info="updating"; while (!(error=info.read_record(&info)) && !thd->killed) { Loading
sql/sql_parse.cc +1 −1 Original line number Diff line number Diff line Loading @@ -1718,7 +1718,7 @@ mysql_execute_command(void) table_count)) && ! thd->fatal_error) { res=mysql_select(thd,tables,select_lex->item_list, select_lex->where,select_lex->ftfunc_list, select_lex->where, (ORDER *)NULL,(ORDER *)NULL,(Item *)NULL, (ORDER *)NULL, select_lex->options | thd->options | Loading