diff options
author | monty@hundin.mysql.fi <> | 2001-11-22 14:40:38 +0200 |
---|---|---|
committer | monty@hundin.mysql.fi <> | 2001-11-22 14:40:38 +0200 |
commit | 9265a4df45ea24b029ce024df7c9f34b7248a0d0 (patch) | |
tree | ed7b5ac619c61e789b26d5243f8391f68a3fa04a | |
parent | 9209210d30e5bd29f4df30f208f6e91cee3e089b (diff) | |
parent | a2a838f88769dea90a0ba5a7196057eec6ca8c11 (diff) | |
download | mariadb-git-9265a4df45ea24b029ce024df7c9f34b7248a0d0.tar.gz |
merge
-rw-r--r-- | Docs/manual.texi | 16 | ||||
-rw-r--r-- | innobase/srv/srv0srv.c | 12 | ||||
-rw-r--r-- | mysql-test/t/fulltext.test | 3 | ||||
-rw-r--r-- | mysys/my_seek.c | 3 | ||||
-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 | ||||
-rw-r--r-- | support-files/mysql.spec.sh | 1 |
10 files changed, 63 insertions, 24 deletions
diff --git a/Docs/manual.texi b/Docs/manual.texi index 06c313a2020..ffa42d2ba73 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -46013,10 +46013,22 @@ not yet 100% confident in this code. @appendixsubsec Changes in release 3.23.45 @itemize @bullet @item +@code{(UPDATE|DELETE) ...WHERE MATCH} bugfix +@item +shutdown should now work on Darwin (Mac OS X). +@item +Fixed core-dump when repairing corrupted packed MyISAM files. +@item +@code{--core-file} now works on Solaris. +@item Fix a bug which could cause InnoDB to complain if it cannot find free blocks from the buffer cache during recovery. @item -Fixed a bug in InnoDB insert buffer B-tree handling that could cause crashes. +Fixed bug in InnoDB insert buffer B-tree handling that could cause crashes. +@item +Fixed bug in InnoDB lock timeout handling. +@item +Fixed core dump bug in @code{ALTER TABLE} on a @code{TEMPORARY} InnoDB table. @item Fixed bug in @code{OPTIMIZE TABLE} that reset index cardinality if it was up to date. @@ -46029,8 +46041,6 @@ Fixed bug with BDB tables and keys on @code{BLOB}'s. Fixed bug in @code{MERGE} tables on OS with 32 bit file pointers. @item Fixed bug in @code{TIME_TO_SEC()} when using negative values. -@item -Fixed core dump bug in @code{ALTER TABLE} on a @code{TEMPORARY} InnoDB table. @end itemize @node News-3.23.44, News-3.23.43, News-3.23.45, News-3.23.x diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c index 7f90c295b41..424bb8a7086 100644 --- a/innobase/srv/srv0srv.c +++ b/innobase/srv/srv0srv.c @@ -2153,10 +2153,14 @@ loop: /* Timeout exceeded or a wrap-around in system time counter: cancel the lock request queued by the transaction and release possible - other transactions waiting behind */ - - lock_cancel_waiting_and_release( - thr_get_trx(slot->thr)->wait_lock); + other transactions waiting behind; it is + possible that the lock has already been + granted: in that case do nothing */ + + if (thr_get_trx(slot->thr)->wait_lock) { + lock_cancel_waiting_and_release( + thr_get_trx(slot->thr)->wait_lock); + } } } } diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test index 2608a9c02a6..81993b167c6 100644 --- a/mysql-test/t/fulltext.test +++ b/mysql-test/t/fulltext.test @@ -23,6 +23,9 @@ select * from t1 where MATCH(a,b) AGAINST("+search +(support vector)" IN BOOLEAN select * from t1 where MATCH(a,b) AGAINST("+search -(support vector)" IN BOOLEAN MODE); select *, MATCH(a,b) AGAINST("support collections" IN BOOLEAN MODE) as x from t1; 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; # diff --git a/mysys/my_seek.c b/mysys/my_seek.c index 39d376c1eae..7c4da4f6010 100644 --- a/mysys/my_seek.c +++ b/mysys/my_seek.c @@ -20,7 +20,8 @@ /* Seek to position in file */ /*ARGSUSED*/ -my_off_t my_seek(File fd, my_off_t pos, int whence, myf MyFlags __attribute__((unused))) +my_off_t my_seek(File fd, my_off_t pos, int whence, + myf MyFlags __attribute__((unused))) { reg1 os_off_t newpos; DBUG_ENTER("my_seek"); 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 diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 95d42fdc24d..41818759db1 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -365,6 +365,7 @@ fi %attr(755, root, root) /usr/bin/replace %attr(755, root, root) /usr/bin/resolveip %attr(755, root, root) /usr/bin/mysqld_safe +%attr(755, root, root) /usr/bin/resolve_stack_dump %attr(755, root, root) /usr/bin/mysqld_multi %attr(755, root, root) /usr/bin/my_print_defaults |