MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:kroki Date:June 28 2006 7:50pm
Subject:bk commit into 5.0 tree (kroki:1.2205) BUG#10946
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of tomash. When tomash does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2205 06/06/28 23:50:50 kroki@stripped +3 -0
  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.

  sql/sql_trigger.cc
    1.50 06/06/28 23:50:41 kroki@stripped +3 -1
    If there is already a trigger with the same activation time, report an
    "Unsupported yet" error.

  mysql-test/t/trigger.test
    1.47 06/06/28 23:50:41 kroki@stripped +1 -1
    Update test for new error code.

  mysql-test/r/trigger.result
    1.42 06/06/28 23:50:41 kroki@stripped +1 -1
    Update result for new error message.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	kroki
# Host:	moonlight.intranet
# Root:	/home/tomash/src/mysql_ab/mysql-5.0-bug10946

--- 1.41/mysql-test/r/trigger.result	2006-06-16 20:21:21 +04:00
+++ 1.42/mysql-test/r/trigger.result	2006-06-28 23:50:41 +04:00
@@ -295,7 +295,7 @@
 create trigger trg after insert on t1 for each row set @a:=1;
 ERROR HY000: Trigger already exists
 create trigger trg2 before insert on t1 for each row set @a:=1;
-ERROR HY000: Trigger already exists
+ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
 create trigger trg before insert on t3 for each row set @a:=1;
 ERROR HY000: Trigger already exists
 create trigger trg2 before insert on t3 for each row set @a:=1;

--- 1.46/mysql-test/t/trigger.test	2006-06-16 20:21:21 +04:00
+++ 1.47/mysql-test/t/trigger.test	2006-06-28 23:50:41 +04:00
@@ -321,7 +321,7 @@
 create trigger trg before insert on t1 for each row set @a:=1;
 --error 1359
 create trigger trg after insert on t1 for each row set @a:=1;
---error 1359
+--error 1235
 create trigger trg2 before insert on t1 for each row set @a:=1;
 --error 1359
 create trigger trg before insert on t3 for each row set @a:=1;

--- 1.49/sql/sql_trigger.cc	2006-03-28 01:01:48 +04:00
+++ 1.50/sql/sql_trigger.cc	2006-06-28 23:50:41 +04:00
@@ -366,7 +366,9 @@
   /* 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;
   }
 
Thread
bk commit into 5.0 tree (kroki:1.2205) BUG#10946kroki28 Jun