diff options
author | unknown <monty@hundin.mysql.fi> | 2001-11-22 14:40:38 +0200 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-11-22 14:40:38 +0200 |
commit | e673b6dcf8b55ec4457ab554a1c09ccf3c079463 (patch) | |
tree | ed7b5ac619c61e789b26d5243f8391f68a3fa04a /sql | |
parent | d576cd65d00d23b634e0ef4254660e67c055c045 (diff) | |
parent | 7ef7d93726929ec678a8b07bed1be7bb56ad4b10 (diff) | |
download | mariadb-git-e673b6dcf8b55ec4457ab554a1c09ccf3c079463.tar.gz |
merge
BitKeeper/etc/logging_ok:
auto-union
Docs/manual.texi:
Auto merged
innobase/srv/srv0srv.c:
Auto merged
myisam/mi_check.c:
Auto merged
myisam/mi_open.c:
Auto merged
myisam/mi_packrec.c:
Auto merged
myisam/myisamdef.h:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/t/fulltext.test:
Auto merged
sql/stacktrace.c:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_update.cc:
Auto merged
Diffstat (limited to 'sql')
-rw-r--r-- | sql/mysql_priv.h | 4 | ||||
-rw-r--r-- | sql/sql_base.cc | 25 | ||||
-rw-r--r-- | sql/sql_delete.cc | 15 | ||||
-rw-r--r-- | sql/sql_update.cc | 4 | ||||
-rw-r--r-- | sql/stacktrace.c | 4 |
5 files changed, 36 insertions, 16 deletions
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index bd7c2f3cfd1..e0e85145c52 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -327,7 +327,6 @@ int setup_order(THD *thd,TABLE_LIST *tables, List<Item> &fields, int handle_select(THD *thd, LEX *lex, select_result *result); int mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &list,COND *conds, - List<Item_func_match> &ftfuncs, ORDER *order, ORDER *group,Item *having,ORDER *proc_param, ulong select_type,select_result *result); int mysql_union(THD *thd,LEX *lex,select_result *result); @@ -450,7 +449,8 @@ int setup_fields(THD *thd,TABLE_LIST *tables,List<Item> &item, bool set_query_id,List<Item> *sum_func_list, bool allow_sum_func); int setup_conds(THD *thd,TABLE_LIST *tables,COND **conds); -int setup_ftfuncs(THD *thd,TABLE_LIST *tables, List<Item_func_match> &ftfuncs); +int setup_ftfuncs(THD *thd); +int init_ftfuncs(THD *thd, bool no_order); void wait_for_refresh(THD *thd); int open_tables(THD *thd,TABLE_LIST *tables); int open_and_lock_tables(THD *thd,TABLE_LIST *tables); diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 56063a33d68..7c5b56aa8b6 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -2172,17 +2172,18 @@ bool remove_table_from_cache(THD *thd, const char *db, const char *table_name, DBUG_RETURN(result); } -int setup_ftfuncs(THD *thd,TABLE_LIST *tables, List<Item_func_match> &ftfuncs) +int setup_ftfuncs(THD *thd) { - List_iterator<Item_func_match> li(ftfuncs), li2(ftfuncs); + List_iterator<Item_func_match> li(thd->lex.ftfunc_list), + lj(thd->lex.ftfunc_list); Item_func_match *ftf, *ftf2; while ((ftf=li++)) { if (ftf->fix_index()) return 1; - li2.rewind(); - while ((ftf2=li2++) != ftf) + lj.rewind(); + while ((ftf2=lj++) != ftf) { if (ftf->eq(ftf2) && !ftf2->master) ftf2->master=ftf; @@ -2191,3 +2192,19 @@ int setup_ftfuncs(THD *thd,TABLE_LIST *tables, List<Item_func_match> &ftfuncs) return 0; } + +int init_ftfuncs(THD *thd, bool no_order) +{ + List_iterator<Item_func_match> li(thd->lex.ftfunc_list); + Item_func_match *ifm; + DBUG_PRINT("info",("Performing FULLTEXT search")); + thd->proc_info="FULLTEXT initialization"; + + while ((ifm=li++)) + { + ifm->init_search(no_order); + } + + return 0; +} + diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index a712d4ca54c..464216d56ba 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -1,28 +1,24 @@ /* Copyright (C) 2000 MySQL AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - /* Delete of records and truncate of tables. - Multi-table deletes were introduced by Monty and Sinisa */ - - #include "mysql_priv.h" #include "ha_innobase.h" #include "sql_select.h" @@ -52,7 +48,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 */ @@ -79,7 +75,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, if (error) DBUG_RETURN(-1); if ((select && select->check_quick(test(thd->options & SQL_SAFE_UPDATES), - limit)) || + limit)) || !limit) { delete select; @@ -129,6 +125,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, } init_read_record(&info,thd,table,select,1,1); + init_ftfuncs(thd,1); deleted=0L; thd->proc_info="updating"; while (!(error=info.read_record(&info)) && !thd->killed) diff --git a/sql/sql_update.cc b/sql/sql_update.cc index fec40d61f91..270f164bf80 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -74,7 +74,8 @@ int mysql_update(THD *thd, 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 @@ -138,6 +139,7 @@ int mysql_update(THD *thd, 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() && diff --git a/sql/stacktrace.c b/sql/stacktrace.c index 32bc37f5500..4f8fde31d3d 100644 --- a/sql/stacktrace.c +++ b/sql/stacktrace.c @@ -218,5 +218,9 @@ void write_core(int sig) { signal(sig, SIG_DFL); pthread_kill(pthread_self(), sig); +#if defined(P_MYID) + /* On Solaris, the above kill is not enough */ + sigsend(P_PID,P_MYID,sig); +#endif } #endif |