1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.1

into  mysql.com:/windows/Linux_space/MySQL/mysql-5.1-new-ndb
This commit is contained in:
mskold/marty@linux.site
2007-04-04 17:03:31 +02:00
11 changed files with 409 additions and 10 deletions

View File

@@ -452,7 +452,20 @@ int mysql_update(THD *thd,
(thd->variables.sql_mode &
(MODE_STRICT_TRANS_TABLES |
MODE_STRICT_ALL_TABLES)));
will_batch= !table->file->start_bulk_update();
if (table->triggers &&
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);
will_batch= FALSE;
}
else
will_batch= !table->file->start_bulk_update();
/*
We can use compare_record() to optimize away updates if
@@ -1121,6 +1134,17 @@ int multi_update::prepare(List<Item> &not_used_values,
table->no_keyread=1;
table->covering_keys.clear_all();
table->pos_in_table_list= tl;
if (table->triggers &&
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);
}
}
}