mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-show-5.0
This commit is contained in:
@ -23,6 +23,8 @@
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_acl.h"
|
||||
#include "sql_select.h"
|
||||
#include "sp_head.h"
|
||||
#include "sql_trigger.h"
|
||||
|
||||
static bool safe_update_on_fly(JOIN_TAB *join_tab, List<Item> *fields);
|
||||
|
||||
@ -354,6 +356,10 @@ int mysql_update(THD *thd,
|
||||
if (fill_record(fields,values, 0) || thd->net.report_error)
|
||||
break; /* purecov: inspected */
|
||||
found++;
|
||||
|
||||
if (table->triggers)
|
||||
table->triggers->process_triggers(thd, TRG_EVENT_UPDATE, TRG_ACTION_BEFORE);
|
||||
|
||||
if (compare_record(table, query_id))
|
||||
{
|
||||
if (!(error=table->file->update_row((byte*) table->record[1],
|
||||
@ -369,6 +375,10 @@ int mysql_update(THD *thd,
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (table->triggers)
|
||||
table->triggers->process_triggers(thd, TRG_EVENT_UPDATE, TRG_ACTION_AFTER);
|
||||
|
||||
if (!--limit && using_limit)
|
||||
{
|
||||
error= -1; // Simulate end of file
|
||||
|
Reference in New Issue
Block a user