diff options
author | unknown <dlenev@brandersnatch.localdomain> | 2005-03-27 16:15:21 +0400 |
---|---|---|
committer | unknown <dlenev@brandersnatch.localdomain> | 2005-03-27 16:15:21 +0400 |
commit | 2c5d427c87bb5aa3cdb9fe9b951b87e529f9ed1c (patch) | |
tree | 5b1878608e2f5118db8fd255f55b897b71c95f95 /sql/sql_trigger.cc | |
parent | 7ff83a3f7f520feda32fb5cf68da54771542cc80 (diff) | |
download | mariadb-git-2c5d427c87bb5aa3cdb9fe9b951b87e529f9ed1c.tar.gz |
Fix for bugs #5859 "DROP TABLE does not drop triggers" and
#6559 "DROP DATABASE forgets to drop triggers".
If we drop table we should also drop all triggers associated with it.
To do this we have to check for existence of .TRG file when we are
dropping table and delete it too.
mysql-test/r/trigger.result:
Added tests for bugs #5859 "DROP TABLE does not drop triggers"
and #6559 "DROP DATABASE forgets to drop triggers".
mysql-test/t/trigger.test:
Added tests for bugs #5859 "DROP TABLE does not drop triggers"
and #6559 "DROP DATABASE forgets to drop triggers".
sql/handler.cc:
Added .TRG to the list of known extensions of files associated with
tables.
sql/mysql_priv.h:
Added declaration of constant holding extension for trigger files.
sql/sql_table.cc:
mysql_rm_table_part2():
If we drop table we should also drop all triggers associated with it.
To do this we have to check for existence of .TRG file and delete it
(until the moment when we will store trigger definitions in the same
.FRM file as table description).
sql/sql_trigger.cc:
Made constant holding extension for trigger files externally visible.
Diffstat (limited to 'sql/sql_trigger.cc')
-rw-r--r-- | sql/sql_trigger.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index 110841e8fd4..5b6f12eab52 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -4,7 +4,8 @@ #include "parse_file.h" static const LEX_STRING triggers_file_type= {(char *)"TRIGGERS", 8}; -static const char * const triggers_file_ext= ".TRG"; + +const char * const triggers_file_ext= ".TRG"; /* Table of .TRG file field descriptors. |