mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.0
into c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.1
This commit is contained in:

commit
02056f8e3a
@ -30,7 +30,7 @@
|
||||
#include "sql_trigger.h"
|
||||
|
||||
bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
|
||||
SQL_LIST *order, ha_rows limit, ulong options)
|
||||
SQL_LIST *order, ha_rows limit, ulonglong options)
|
||||
{
|
||||
bool will_batch;
|
||||
int error, loc_error;
|
||||
@ -309,6 +309,7 @@ bool mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds)
|
||||
DBUG_ENTER("mysql_prepare_delete");
|
||||
|
||||
if (setup_tables(thd, &thd->lex->select_lex.context,
|
||||
&thd->lex->select_lex.top_join_list,
|
||||
table_list, conds, &select_lex->leaf_tables,
|
||||
FALSE) ||
|
||||
setup_conds(thd, table_list, select_lex->leaf_tables, conds) ||
|
||||
@ -367,6 +368,7 @@ bool mysql_multi_delete_prepare(THD *thd)
|
||||
lex->query_tables also point on local list of DELETE SELECT_LEX
|
||||
*/
|
||||
if (setup_tables(thd, &thd->lex->select_lex.context,
|
||||
&thd->lex->select_lex.top_join_list,
|
||||
lex->query_tables, &lex->select_lex.where,
|
||||
&lex->select_lex.leaf_tables, FALSE))
|
||||
DBUG_RETURN(TRUE);
|
||||
@ -415,9 +417,8 @@ bool mysql_multi_delete_prepare(THD *thd)
|
||||
}
|
||||
|
||||
|
||||
multi_delete::multi_delete(THD *thd_arg, TABLE_LIST *dt,
|
||||
uint num_of_tables_arg)
|
||||
: delete_tables(dt), thd(thd_arg), deleted(0), found(0),
|
||||
multi_delete::multi_delete(TABLE_LIST *dt, uint num_of_tables_arg)
|
||||
: delete_tables(dt), deleted(0), found(0),
|
||||
num_of_tables(num_of_tables_arg), error(0),
|
||||
do_delete(0), transactional_tables(0), normal_tables(0)
|
||||
{
|
||||
@ -826,7 +827,7 @@ bool mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
|
||||
ha_enable_transaction(thd, FALSE);
|
||||
mysql_init_select(thd->lex);
|
||||
error= mysql_delete(thd, table_list, (COND*) 0, (SQL_LIST*) 0,
|
||||
HA_POS_ERROR, 0);
|
||||
HA_POS_ERROR, LL(0));
|
||||
ha_enable_transaction(thd, TRUE);
|
||||
thd->options= save_options;
|
||||
DBUG_RETURN(error);
|
||||
|
Reference in New Issue
Block a user