mirror of
https://github.com/MariaDB/server.git
synced 2026-04-27 18:55:31 +02:00
Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.0
into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0-marvel client/mysqldump.c: Auto merged mysql-test/t/sp.test: Auto merged mysys/my_malloc.c: Auto merged mysys/my_static.c: Auto merged mysys/safemalloc.c: Auto merged ndb/src/mgmclient/CommandInterpreter.cpp: Auto merged sql/ha_archive.cc: Auto merged sql/ha_innodb.cc: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/handler.cc: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_func.h: Auto merged sql/log.cc: Auto merged sql/log_event.cc: Auto merged sql/mysql_priv.h: Auto merged sql-common/client.c: Auto merged sql/sp.cc: Auto merged sql/sp_head.cc: Auto merged sql/sql_delete.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_update.cc: Auto merged sql/table.cc: Auto merged sql-common/my_time.c: Auto merged mysql-test/r/sp.result: Merged from main 5.0 sql/sql_load.cc: Merged from main 5.0
This commit is contained in:
commit
239b385933
153 changed files with 4340 additions and 1372 deletions
|
|
@ -217,7 +217,19 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
|
|||
thd->proc_info="updating";
|
||||
|
||||
if (table->triggers)
|
||||
{
|
||||
table->triggers->mark_fields_used(thd, TRG_EVENT_DELETE);
|
||||
if (table->triggers->has_triggers(TRG_EVENT_DELETE,
|
||||
TRG_ACTION_AFTER))
|
||||
{
|
||||
/*
|
||||
The table has AFTER DELETE triggers that might access to subject table
|
||||
and therefore might need delete to be done immediately. So we turn-off
|
||||
the batching.
|
||||
*/
|
||||
(void) table->file->extra(HA_EXTRA_DELETE_CANNOT_BATCH);
|
||||
}
|
||||
}
|
||||
|
||||
while (!(error=info.read_record(&info)) && !thd->killed &&
|
||||
!thd->net.report_error)
|
||||
|
|
@ -540,7 +552,19 @@ multi_delete::initialize_tables(JOIN *join)
|
|||
else
|
||||
normal_tables= 1;
|
||||
if (tbl->triggers)
|
||||
{
|
||||
tbl->triggers->mark_fields_used(thd, TRG_EVENT_DELETE);
|
||||
if (tbl->triggers->has_triggers(TRG_EVENT_DELETE,
|
||||
TRG_ACTION_AFTER))
|
||||
{
|
||||
/*
|
||||
The table has AFTER DELETE triggers that might access to subject
|
||||
table and therefore might need delete to be done immediately.
|
||||
So we turn-off the batching.
|
||||
*/
|
||||
(void) tbl->file->extra(HA_EXTRA_DELETE_CANNOT_BATCH);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ((tab->type != JT_SYSTEM && tab->type != JT_CONST) &&
|
||||
walk == delete_tables)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue