List:Commits« Previous MessageNext Message »
From:He Zhenxing Date:October 2 2009 8:40am
Subject:bzr commit into mysql-5.1-rep+2 branch (zhenxing.he:3121) Bug#12190 Bug#25192
View as plain text  
#At file:///media/sdb2/hezx/work/mysql/bzrwork/backport/5.1-rep%2B2/ based on revid:zhenxing.he@stripped

 3121 He Zhenxing	2009-10-02
      Backport post fix compiler warnings and test failures for BUG#25192 BUG#12190

    M  mysql-test/include/setup_fake_relay_log.inc
    M  mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test
    M  mysys/default.c
    M  sql/log.cc
=== modified file 'mysql-test/include/setup_fake_relay_log.inc'
--- a/mysql-test/include/setup_fake_relay_log.inc	2009-10-02 08:35:03 +0000
+++ b/mysql-test/include/setup_fake_relay_log.inc	2009-10-02 08:40:06 +0000
@@ -69,7 +69,21 @@ let $_fake_relay_log_purge= `SELECT @@gl
 # Create relay log file.
 copy_file $fake_relay_log $_fake_relay_log;
 # Create relay log index.
---exec echo ./$_fake_filename-fake.000001 > $_fake_relay_index
+
+# After patch for BUG#12190, the filename used in CHANGE MASTER
+# RELAY_LOG_FILE will be automatically added the directory of the
+# relay log before comparison, thus we need to added the directory
+# part (./ on unix .\ on windows) when faking the relay-log-bin.index.
+
+if (`select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") = 0`)
+{
+  eval select './$_fake_filename-fake.000001\n' into dumpfile '$_fake_relay_index';
+}
+
+if (`select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") != 0`)
+{
+  eval select '.\\\\$_fake_filename-fake.000001\n' into dumpfile '$_fake_relay_index';
+}
 
 # Setup replication from existing relay log.
 eval CHANGE MASTER TO MASTER_HOST='dummy.localdomain', RELAY_LOG_FILE='$_fake_filename-fake.000001', RELAY_LOG_POS=4;

=== modified file 'mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test'
--- a/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test	2009-10-02 08:35:03 +0000
+++ b/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test	2009-10-02 08:40:06 +0000
@@ -25,9 +25,22 @@ let $MYSQLD_DATADIR= `select @@datadir`;
 
 copy_file $MYSQL_TEST_DIR/std_data/bug33029-slave-relay-bin.000001 $MYSQLD_DATADIR/slave-relay-bin.000001;
 
-write_file $MYSQLD_DATADIR/slave-relay-bin.index;
-./slave-relay-bin.000001
-EOF
+
+# After patch for BUG#12190, the filename used in CHANGE MASTER
+# RELAY_LOG_FILE will be automatically added the directory of the
+# relay log before comparison, thus we need to added the directory
+# part (./ on unix .\ on windows) when faking the relay-log-bin.index.
+disable_query_log;
+if (`select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") = 0`)
+{
+  eval select './slave-relay-bin.000001\n' into dumpfile '$MYSQLD_DATADIR/slave-relay-bin.index';
+}
+
+if (`select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") != 0`)
+{
+  eval select '.\\\\slave-relay-bin.000001\n' into dumpfile '$MYSQLD_DATADIR/slave-relay-bin.index';
+}
+enable_query_log;
 
 change master to
   MASTER_HOST='dummy.localdomain',

=== modified file 'mysys/default.c'
--- a/mysys/default.c	2009-10-02 08:25:53 +0000
+++ b/mysys/default.c	2009-10-02 08:40:06 +0000
@@ -478,7 +478,7 @@ int my_load_defaults(const char *conf_fi
     res= (char**) (ptr+sizeof(alloc));
     res[0]= **argv;				/* Copy program name */
     /* set arguments separator */
-    res[1]= args_separator;
+    res[1]= (char *)args_separator;
     for (i=2 ; i < (uint) *argc ; i++)
       res[i]=argv[0][i];
     res[i]=0;					/* End pointer */
@@ -534,7 +534,7 @@ int my_load_defaults(const char *conf_fi
 
   /* set arguments separator for arguments from config file and
      command line */
-  res[args.elements+1]= args_separator;
+  res[args.elements+1]= (char *)args_separator;
 
   if (*argc)
     memcpy((uchar*) (res+1+args.elements+1), (char*) ((*argv)+1),

=== modified file 'sql/log.cc'
--- a/sql/log.cc	2009-10-01 17:22:44 +0000
+++ b/sql/log.cc	2009-10-02 08:40:06 +0000
@@ -1901,7 +1901,7 @@ updating the index files.", max_found);
    */
   if (((strlen(ext_buf) + (end - name)) >= FN_REFLEN))
   {
-    sql_print_error("Log filename too large: %s%s (%d). \
+    sql_print_error("Log filename too large: %s%s (%lu). \
 Please fix this by archiving old logs and updating the \
 index files.", name, ext_buf, (strlen(ext_buf) + (end - name)));
     error= 1;


Attachment: [text/bzr-bundle] bzr/zhenxing.he@sun.com-20091002084006-xdkf8b0wcmzj49fv.bundle
Thread
bzr commit into mysql-5.1-rep+2 branch (zhenxing.he:3121) Bug#12190 Bug#25192He Zhenxing2 Oct