MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:ahristov Date:August 5 2005 3:00pm
Subject:bk commit into 5.0 tree (andrey:1.1945) BUG#10946
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of andrey. When andrey 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.1945 05/08/05 17:00:15 andrey@lmy004. +4 -0
  fix for bug #10946

  sql/sql_trigger.cc
    1.27 05/08/05 17:00:05 andrey@lmy004. +3 -2
    use different message in different cases - fix for bug #10946

  sql/share/errmsg.txt
    1.38 05/08/05 17:00:05 andrey@lmy004. +4 -2
    bug 10946 - personalize (add additional message)

  mysql-test/t/trigger.test
    1.21 05/08/05 17:00:05 andrey@lmy004. +2 -2
    bug 10946 - fix test

  mysql-test/r/trigger.result
    1.16 05/08/05 17:00:04 andrey@lmy004. +3 -3
    bug 10946 - fix test output

# 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:	andrey
# Host:	lmy004.
# Root:	/home/andrey/mysql-5.0-bug10946

--- 1.37/sql/share/errmsg.txt	2005-08-03 01:28:30 +02:00
+++ 1.38/sql/share/errmsg.txt	2005-08-05 17:00:05 +02:00
@@ -5216,8 +5216,8 @@
 	eng "Can't drop or alter a %s from within another stored routine"
 ER_SP_GOTO_IN_HNDLR  
 	eng "GOTO is not allowed in a stored procedure handler"
-ER_TRG_ALREADY_EXISTS  
-	eng "Trigger already exists"
+ER_TRG_ALREADY_EXISTS_SAME_ACT_TIME  
+	eng "Trigger with the same activation time already exists "
 ER_TRG_DOES_NOT_EXIST  
 	eng "Trigger does not exist"
 ER_TRG_ON_VIEW_OR_TEMP_TABLE  
@@ -5388,3 +5388,5 @@
 	eng "Thread stack overrun:  %ld bytes used of a %ld byte stack, and %ld bytes needed.  Use 'mysqld -O thread_stack=#' to specify a bigger stack."
 ER_TOO_LONG_BODY 42000 S1009
 	eng "Routine body for '%-.100s' is too long"
+ER_TRG_ALREADY_EXISTS_SAME_NAME  
+	eng "Trigger %s already exists"

--- 1.15/mysql-test/r/trigger.result	2005-07-30 08:24:47 +02:00
+++ 1.16/mysql-test/r/trigger.result	2005-08-05 17:00:04 +02:00
@@ -290,11 +290,11 @@
 ERROR 42S02: Table 'test.t2' doesn't exist
 create trigger trg before insert on t1 for each row set @a:=1;
 create trigger trg after insert on t1 for each row set @a:=1;
-ERROR HY000: Trigger already exists
+ERROR HY000: Trigger trg already exists
 create trigger trg2 before insert on t1 for each row set @a:=1;
-ERROR HY000: Trigger already exists
+ERROR HY000: Trigger with the same activation time already exists 
 create trigger trg before insert on t3 for each row set @a:=1;
-ERROR HY000: Trigger already exists
+ERROR HY000: Trigger trg already exists
 create trigger trg2 before insert on t3 for each row set @a:=1;
 drop trigger trg2;
 drop trigger trg;

--- 1.20/mysql-test/t/trigger.test	2005-07-30 08:24:47 +02:00
+++ 1.21/mysql-test/t/trigger.test	2005-08-05 17:00:05 +02:00
@@ -308,11 +308,11 @@
 create trigger trg before insert on t2 for each row set @a:=1;
 
 create trigger trg before insert on t1 for each row set @a:=1;
---error 1359
+--error 1438
 create trigger trg after insert on t1 for each row set @a:=1;
 --error 1359
 create trigger trg2 before insert on t1 for each row set @a:=1;
---error 1359
+--error 1438
 create trigger trg before insert on t3 for each row set @a:=1;
 create trigger trg2 before insert on t3 for each row set @a:=1;
 drop trigger trg2;

--- 1.26/sql/sql_trigger.cc	2005-07-31 11:55:58 +02:00
+++ 1.27/sql/sql_trigger.cc	2005-08-05 17:00:05 +02:00
@@ -243,7 +243,8 @@
   /* 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_message(ER_TRG_ALREADY_EXISTS_SAME_ACT_TIME,
+              ER(ER_TRG_ALREADY_EXISTS_SAME_ACT_TIME), MYF(0));
     return 1;
   }
 
@@ -292,7 +293,7 @@
   /* Use the filesystem to enforce trigger namespace constraints. */
   if (!access(trigname_path, F_OK))
   {
-    my_error(ER_TRG_ALREADY_EXISTS, MYF(0));
+    my_error(ER_TRG_ALREADY_EXISTS_SAME_NAME, MYF(0), lex->spname->m_name.str);
     return 1;
   }
 
Thread
bk commit into 5.0 tree (andrey:1.1945) BUG#10946ahristov5 Aug