1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Fix for bug #5890 "Triggers fail for DELETE without WHERE".

If we have DELETE with always true WHERE clause we should not use 
optimized delete_all_rows() method for tables with DELETE triggers,
because in this case we will lose side-effect of deletion.
This commit is contained in:
dlenev@brandersnatch.localdomain
2004-11-12 17:04:07 +03:00
parent aa6d99dd0a
commit e7a2466024
4 changed files with 42 additions and 2 deletions

View File

@@ -58,5 +58,11 @@ public:
static bool check_n_load(THD *thd, const char *db, const char *table_name,
TABLE *table);
bool has_delete_triggers()
{
return (bodies[TRG_EVENT_DELETE][TRG_ACTION_BEFORE] ||
bodies[TRG_EVENT_DELETE][TRG_ACTION_AFTER]);
}
friend class Item_trigger_field;
};