summaryrefslogtreecommitdiff
path: root/sql/sql_trigger.cc
diff options
context:
space:
mode:
authorkroki@mysql.com <>2006-06-28 23:50:50 +0400
committerkroki@mysql.com <>2006-06-28 23:50:50 +0400
commit3e2e20ecfbeb372292bd0f99ede7d2a93426126b (patch)
tree0ad56171641573599cd3fff92940862851c4868f /sql/sql_trigger.cc
parent40a1c179e67199c8c137f5fde9633e14183dba47 (diff)
downloadmariadb-git-3e2e20ecfbeb372292bd0f99ede7d2a93426126b.tar.gz
Bug#10946: Confusing error messeges in the case of duplicate trigger definition
It was hard to distinguish case, when one was unable to create trigger on the table because trigger with same action time and event already existed for this table, from the case, when one tried to create trigger with name which was already occupied by some other trigger, since in both these cases we emitted ER_TRG_ALREADY_EXISTS error and message. Now we emit ER_NOT_SUPPORTED_YET error with appropriate additional message in the first case. There is no sense in introducing separate error for this situation since we plan to get rid of this limitation eventually.
Diffstat (limited to 'sql/sql_trigger.cc')
-rw-r--r--sql/sql_trigger.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc
index f943b014118..013a269d3af 100644
--- a/sql/sql_trigger.cc
+++ b/sql/sql_trigger.cc
@@ -366,7 +366,9 @@ bool Table_triggers_list::create_trigger(THD *thd, TABLE_LIST *tables,
/* We don't allow creation of several triggers of the same type yet */
if (bodies[lex->trg_chistics.event][lex->trg_chistics.action_time])
{
- my_message(ER_TRG_ALREADY_EXISTS, ER(ER_TRG_ALREADY_EXISTS), MYF(0));
+ my_error(ER_NOT_SUPPORTED_YET, MYF(0),
+ "multiple triggers with the same action time"
+ " and event for one table");
return 1;
}