mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.0
into mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb include/my_base.h: Auto merged sql/ha_ndbcluster.h: Auto merged sql/mysql_priv.h: Auto merged sql/sql_delete.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_load.cc: Auto merged sql/sql_trigger.h: Auto merged sql/sql_update.cc: Auto merged sql/ha_ndbcluster.cc: Merge
This commit is contained in:
@@ -436,7 +436,19 @@ int mysql_update(THD *thd,
|
||||
MODE_STRICT_ALL_TABLES)));
|
||||
|
||||
if (table->triggers)
|
||||
{
|
||||
table->triggers->mark_fields_used(thd, TRG_EVENT_UPDATE);
|
||||
if (table->triggers->has_triggers(TRG_EVENT_UPDATE,
|
||||
TRG_ACTION_AFTER))
|
||||
{
|
||||
/*
|
||||
The table has AFTER UPDATE triggers that might access to subject
|
||||
table and therefore might need update to be done immediately.
|
||||
So we turn-off the batching.
|
||||
*/
|
||||
(void) table->file->extra(HA_EXTRA_UPDATE_CANNOT_BATCH);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
We can use compare_record() to optimize away updates if
|
||||
@@ -1001,6 +1013,20 @@ int multi_update::prepare(List<Item> ¬_used_values,
|
||||
table->no_keyread=1;
|
||||
table->used_keys.clear_all();
|
||||
table->pos_in_table_list= tl;
|
||||
if (table->triggers)
|
||||
{
|
||||
table->triggers->mark_fields_used(thd, TRG_EVENT_UPDATE);
|
||||
if (table->triggers->has_triggers(TRG_EVENT_UPDATE,
|
||||
TRG_ACTION_AFTER))
|
||||
{
|
||||
/*
|
||||
The table has AFTER UPDATE triggers that might access to subject
|
||||
table and therefore might need update to be done immediately.
|
||||
So we turn-off the batching.
|
||||
*/
|
||||
(void) table->file->extra(HA_EXTRA_UPDATE_CANNOT_BATCH);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user