diff options
author | unknown <bell@sanja.is.com.ua> | 2004-09-10 02:26:09 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2004-09-10 02:26:09 +0300 |
commit | f3d4db99c3c9d53f3910d6534c6a6b7c3ca871db (patch) | |
tree | eea1212a9ec3c1119581fb5e96e61e74df7cfaa4 /sql/sql_delete.cc | |
parent | b386f888da6eaf55c50d5ee9f8c2fa46c6b0cbf2 (diff) | |
parent | b0afd74eba339155721c9916556d53457ac37b7d (diff) | |
download | mariadb-git-f3d4db99c3c9d53f3910d6534c6a6b7c3ca871db.tar.gz |
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
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/table.h:
Auto merged
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r-- | sql/sql_delete.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 44288bf81a5..f9dba49d2e3 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -26,6 +26,8 @@ #include "mysql_priv.h" #include "ha_innodb.h" #include "sql_select.h" +#include "sp_head.h" +#include "sql_trigger.h" int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, SQL_LIST *order, ha_rows limit, ulong options) @@ -160,6 +162,11 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, SQL_LIST *order, // thd->net.report_error is tested to disallow delete row on error if (!(select && select->skip_record())&& !thd->net.report_error ) { + + if (table->triggers) + table->triggers->process_triggers(thd, TRG_EVENT_DELETE, + TRG_ACTION_BEFORE); + if (!(error=table->file->delete_row(table->record[0]))) { deleted++; @@ -183,6 +190,10 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, SQL_LIST *order, error= 1; break; } + + if (table->triggers) + table->triggers->process_triggers(thd, TRG_EVENT_DELETE, + TRG_ACTION_AFTER); } else table->file->unlock_row(); // Row failed selection, release lock on it |