summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
authorunknown <kostja@bodhi.local>2006-07-07 22:09:43 +0400
committerunknown <kostja@bodhi.local>2006-07-07 22:09:43 +0400
commitf5340f8c7d3798f4cef7bbc3f7dd1173151ef1d0 (patch)
tree9baffd6140dc110806fd9c5531adf2e4f85fb6d0 /sql/sql_update.cc
parent5ac016a8147602703aae069c076e6b75a3ab5723 (diff)
parent685ccf85d40b39e690e99ef735ce202c876468c3 (diff)
downloadmariadb-git-f5340f8c7d3798f4cef7bbc3f7dd1173151ef1d0.tar.gz
Merge bodhi.local:/opt/local/work/mysql-5.0-root
into bodhi.local:/opt/local/work/mysql-5.0-runtime sql/ha_ndbcluster.cc: Auto merged sql/item.cc: Auto merged sql/mysql_priv.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/sql_update.cc: Manual merge.
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 5237b3a1c05..9a207845893 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -434,13 +434,15 @@ int mysql_update(THD *thd,
(MODE_STRICT_TRANS_TABLES |
MODE_STRICT_ALL_TABLES)));
+ if (table->triggers)
+ table->triggers->mark_fields_used(thd, TRG_EVENT_UPDATE);
+
/*
We can use compare_record() to optimize away updates if
the table handler is returning all columns
*/
can_compare_record= !(table->file->table_flags() &
HA_PARTIAL_COLUMN_READ);
-
while (!(error=info.read_record(&info)) && !thd->killed)
{
if (!(select && select->skip_record()))
@@ -763,6 +765,9 @@ reopen_tables:
DBUG_RETURN(TRUE);
}
+ if (table->triggers)
+ table->triggers->mark_fields_used(thd, TRG_EVENT_UPDATE);
+
DBUG_PRINT("info",("setting table `%s` for update", tl->alias));
/*
If table will be updated we should not downgrade lock for it and