List:Commits« Previous MessageNext Message »
From:Alexander Nozdrin Date:October 14 2010 10:06am
Subject:bzr commit into mysql-5.5-bugteam branch (alexander.nozdrin:3245) Bug#48874
View as plain text  
#At file:///home/alik/MySQL/bzr/00/bug48874/mysql-5.5-bugteam-bug48874/ based on revid:davi.arnaut@stripped

 3245 Alexander Nozdrin	2010-10-14
      A patch for Bug#48874 (Test "is_triggers" fails because of wrong charset info).
      
      The thing is that the following attributes are fixed (remembered) when a trigger
      is created:
        - character_set_client
        - character_set_results
        - collation_connection
      
      There are two triggers created in mysql-test/include/mtr_warnings.sql.
      They were created using "current default" character set / collation.
      is_triggers.test shows definition of these triggers including recorded
      character set information.
      
      The problem was that if "current default" changed, the recorded character
      set information was not accurate.
      
      There might be two ways to fix that:
        a) update is_triggers.test so that it does not put character-set information
           into result-file;
        b) update mtr_warnings.sql so that the triggers are created using
           hard-coded character sets.
      
      This patch implements option b).

    modified:
      mysql-test/include/mtr_warnings.sql
=== modified file 'mysql-test/include/mtr_warnings.sql'
--- a/mysql-test/include/mtr_warnings.sql	2010-06-02 16:08:06 +0000
+++ b/mysql-test/include/mtr_warnings.sql	2010-10-14 10:05:59 +0000
@@ -16,6 +16,12 @@ CREATE TABLE test_suppressions (
 -- no invalid patterns can be inserted
 -- into test_suppressions
 --
+SET @character_set_client_saved = @@character_set_client||
+SET @character_set_results_saved = @@character_set_results||
+SET @collation_connection_saved = @@collation_connection||
+SET @@character_set_client = latin1||
+SET @@character_set_results = latin1||
+SET @@collation_connection = latin1_swedish_ci||
 /*!50002
 CREATE DEFINER=root@localhost TRIGGER ts_insert
 BEFORE INSERT ON test_suppressions
@@ -24,6 +30,9 @@ FOR EACH ROW BEGIN
   SELECT "" REGEXP NEW.pattern INTO dummy;
 END
 */||
+SET @@character_set_client = @character_set_client_saved||
+SET @@character_set_results = @character_set_results_saved||
+SET @@collation_connection = @collation_connection_saved||
 
 
 --
@@ -38,6 +47,12 @@ CREATE TABLE global_suppressions (
 -- no invalid patterns can be inserted
 -- into global_suppressions
 --
+SET @character_set_client_saved = @@character_set_client||
+SET @character_set_results_saved = @@character_set_results||
+SET @collation_connection_saved = @@collation_connection||
+SET @@character_set_client = latin1||
+SET @@character_set_results = latin1||
+SET @@collation_connection = latin1_swedish_ci||
 /*!50002
 CREATE DEFINER=root@localhost TRIGGER gs_insert
 BEFORE INSERT ON global_suppressions
@@ -46,6 +61,9 @@ FOR EACH ROW BEGIN
   SELECT "" REGEXP NEW.pattern INTO dummy;
 END
 */||
+SET @@character_set_client = @character_set_client_saved||
+SET @@character_set_results = @character_set_results_saved||
+SET @@collation_connection = @collation_connection_saved||
 
 
 


Attachment: [text/bzr-bundle] bzr/alexander.nozdrin@oracle.com-20101014100559-ej9ai4fpkhz2ks5y.bundle
Thread
bzr commit into mysql-5.5-bugteam branch (alexander.nozdrin:3245) Bug#48874Alexander Nozdrin14 Oct