Commit e673b6dc authored by unknown's avatar unknown

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
parents d576cd65 7ef7d937
......@@ -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
......@@ -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);
}
}
}
}
......
......@@ -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;
#
......
......@@ -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");
......
......@@ -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);
......
......@@ -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;
}
/* 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)
......
......@@ -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() &&
......
......@@ -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
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment