List:Commits« Previous MessageNext Message »
From:Hemant Kumar Date:January 6 2012 10:32am
Subject:bzr push into mysql-5.1 branch (hemant.hk.kumar:3659 to 3660) Bug#12872804
View as plain text  
 3660 Hemant Kumar	2012-01-06
      Bug#12872804 - 62155: BINLOG.BINLOG_STM_UNSAFE_WARNING FAILS WHEN RUN WITH --REPEAT=2
      Fixed the testcase using timestamp logic while doing grep from the error file.

    modified:
      mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result
      mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test
 3659 Tatjana Azundris Nuernberg	2012-01-02
      BUG#11755281/47032: ERROR 2006 / ERROR 2013 INSTEAD OF PROPER ERROR MESSAGE
      
      If init_command was incorrect, we couldn't let users execute
      queries, but we couldn't report the issue to the client either
      as it does not expect error messages before even sending a
      command. Thus, we simply disconnected them without throwing
      a clear error.
      
      We now go through the proper sequence once (without executing
      any user statements) so we can report back what the problem
      is. Only then do we disconnect the user.
      
      As always, root remains unaffected by this as init_command is
      (still) not executed for them.
     @ mysql-test/r/init_connect.result
        We now report a proper error if init_command fails.
        Expect as much.
     @ mysql-test/t/init_connect.test
        We now report a proper error if init_command fails.
        Expect as much.
     @ sql/sql_connect.cc
        If init_command fails, throw an error explaining this to
        the user.

    modified:
      mysql-test/r/init_connect.result
      mysql-test/t/init_connect.test
      sql/sql_connect.cc
=== modified file 'mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result'
--- a/mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result	2009-07-31 13:00:35 +0000
+++ b/mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result	2012-01-06 10:16:03 +0000
@@ -34,13 +34,13 @@ USE test;
 #
 SET @old_log_warnings = @@log_warnings;
 DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 (a VARCHAR(36), b VARCHAR(10));
+CREATE TABLE t1 (a VARCHAR(36), b VARCHAR(15));
 SET GLOBAL LOG_WARNINGS = 0;
-INSERT INTO t1 VALUES(UUID(), 'Bug#46265');
+INSERT INTO t1 VALUES(UUID(), 'timestamp');
 Warnings:
 Note	1592	Statement may not be safe to log in statement format.
 SET GLOBAL LOG_WARNINGS = 1;
-INSERT INTO t1 VALUES(UUID(), 'Bug#46265');
+INSERT INTO t1 VALUES(UUID(), 'timestamp');
 Warnings:
 Note	1592	Statement may not be safe to log in statement format.
 DROP TABLE t1;

=== modified file 'mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test'
--- a/mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test	2009-10-08 12:00:43 +0000
+++ b/mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test	2012-01-06 10:16:03 +0000
@@ -80,22 +80,33 @@ eval USE $old_db;
 --echo # Bug#46265: Can not disable warning about unsafe statements for binary logging
 --echo #
 
+# Here introducing a sleep of one Second, just to make sure 
+# that when this test executes with "--repeat" option,
+# the timestamp value is different and hence the Occcurrence count is one.
+--sleep 1
+
 SET @old_log_warnings = @@log_warnings;
 
 --disable_warnings
 DROP TABLE IF EXISTS t1;
 --enable_warnings
-CREATE TABLE t1 (a VARCHAR(36), b VARCHAR(10));
+let BINLOG_COUNTER1= `select CONVERT(NOW(),UNSIGNED) as timestmap from dual`;
+
+CREATE TABLE t1 (a VARCHAR(36), b VARCHAR(15));
 SET GLOBAL LOG_WARNINGS = 0;
-INSERT INTO t1 VALUES(UUID(), 'Bug#46265');
+# Replacing the result file content here.
+# Instead of writing $BINLOG_COUNTER1 value to result file, writing a fixed string timestamp to it.
+--replace_result $BINLOG_COUNTER1 timestamp
+eval INSERT INTO t1 VALUES(UUID(), '$BINLOG_COUNTER1');
 SET GLOBAL LOG_WARNINGS = 1;
-INSERT INTO t1 VALUES(UUID(), 'Bug#46265');
+--replace_result $BINLOG_COUNTER1 timestamp
+eval INSERT INTO t1 VALUES(UUID(), '$BINLOG_COUNTER1');
 DROP TABLE t1;
 
 SET GLOBAL log_warnings = @old_log_warnings;
 
 let $log_error_= `SELECT @@GLOBAL.log_error`;
-if(!`select LENGTH('$log_error_')`)
+if(!$log_error_)
 {
   # MySQL Server on windows is started with --console and thus
   # does not know the location of its .err log, use default location
@@ -111,7 +122,9 @@ perl;
   use strict;
   my $log_error= $ENV{'LOG_ERROR'} or die "LOG_ERROR not set";
   open(FILE, "$log_error") or die("Unable to open $log_error: $!\n");
-  my $count = () = grep(/Bug#46265/g,<FILE>);
+  my $binlog_counter= $ENV{'BINLOG_COUNTER1'} or die "BINLOG_COUNTER1 not set";
+  my $count = () = grep(/$binlog_counter/g,<FILE>); 
+  # Grep the timestamp value from the error file.
   print "Occurrences: $count\n";
   close(FILE);
 EOF

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1 branch (hemant.hk.kumar:3659 to 3660) Bug#12872804Hemant Kumar9 Jan