List:Commits« Previous MessageNext Message »
From:marko.makela Date:September 26 2012 8:43pm
Subject:bzr push into mysql-5.6-wl6494 branch (marko.makela:4333 to 4335) WL#6494
View as plain text  
 4335 Marko Mäkelä	2012-09-26
      WL#6494: Enable a test.

    modified:
      mysql-test/suite/innodb/t/innodb-log-file-size-1.test
 4334 Marko Mäkelä	2012-09-26
      WL#6494: Refuse to resize logs in read-only mode.

    modified:
      mysql-test/suite/innodb/r/innodb-log-file-size-1.result
      mysql-test/suite/innodb/t/innodb-log-file-size-1.test
      storage/innobase/srv/srv0start.cc
 4333 Vinay Fisrekar	2012-09-27
      Add test (non dependent on debug build) to handle redo log size mismatch 
      (took negative cases from innodb-log-file-size which only runs for debug build)

    added:
      mysql-test/suite/innodb/r/innodb-log-file-size-1.result
      mysql-test/suite/innodb/t/innodb-log-file-size-1.test
=== modified file 'mysql-test/suite/innodb/r/innodb-log-file-size-1.result'
--- a/mysql-test/suite/innodb/r/innodb-log-file-size-1.result	revid:vinay.fisrekar@stripped193703-u0vb3ugq6l06amj5
+++ b/mysql-test/suite/innodb/r/innodb-log-file-size-1.result	revid:marko.makela@strippedm-20120926203822-nmlmb7790qgth7j3
@@ -135,6 +135,7 @@ id	LEFT(bfield,20)
 23	cccccccccccccccccccc
 "test misc 1"
 "test misc 2"
+"test misc 3"
 "test misc 4"
 "test misc 5"
 "test misc 6"

=== modified file 'mysql-test/suite/innodb/t/innodb-log-file-size-1.test'
--- a/mysql-test/suite/innodb/t/innodb-log-file-size-1.test	revid:vinay.fisrekar@stripped
+++ b/mysql-test/suite/innodb/t/innodb-log-file-size-1.test	revid:marko.makela@stripped
@@ -183,28 +183,25 @@ let SEARCH_PATTERN= syntax error in inno
 --source include/search_pattern_in_file.inc
 --remove_file $SEARCH_FILE
 
-#--echo "test misc 3"
-#--error 1
-#--exec $MYSQLD_CMD $args --innodb-read-only
-#let SEARCH_PATTERN= InnoDB: Recovery skipped, --innodb-read-only set!;
-#--source include/search_pattern_in_file.inc
-#let SEARCH_PATTERN= InnoDB: Can.t initiate database recovery, running in read-only-mode;
-#--source include/search_pattern_in_file.inc
-#--remove_file $SEARCH_FILE
-
+--echo "test misc 3"
+--error 1
+--exec $MYSQLD_CMD $args --innodb-read-only
+let SEARCH_PATTERN= InnoDB: Cannot resize log files in read-only mode;
+--source include/search_pattern_in_file.inc
+--remove_file $SEARCH_FILE
 
 --echo "test misc 4"
 # We should have perfectly synced files here.
 # Rename the log files, and trigger an error in recovery.
-##--move_file $MYSQLD_DATADIR/ib_logfile101 $MYSQLD_DATADIR/ib_logfile0
-#--move_file $MYSQLD_DATADIR/ib_logfile1 $MYSQLD_DATADIR/ib_logfile1_hidden
-#--error 1
-#--exec $MYSQLD_CMD $args
-#let SEARCH_PATTERN= InnoDB: Only one log file found;
-#--source include/search_pattern_in_file.inc
-#--remove_file $SEARCH_FILE
-##--move_file $MYSQLD_DATADIR/ib_logfile0 $MYSQLD_DATADIR/ib_logfile101
-#--move_file $MYSQLD_DATADIR/ib_logfile1_hidden $MYSQLD_DATADIR/ib_logfile1
+#--move_file $MYSQLD_DATADIR/ib_logfile101 $MYSQLD_DATADIR/ib_logfile0
+--move_file $MYSQLD_DATADIR/ib_logfile1 $MYSQLD_DATADIR/ib_logfile1_hidden
+--error 1
+--exec $MYSQLD_CMD $args
+let SEARCH_PATTERN= InnoDB: Only one log file found;
+--source include/search_pattern_in_file.inc
+--remove_file $SEARCH_FILE
+#--move_file $MYSQLD_DATADIR/ib_logfile0 $MYSQLD_DATADIR/ib_logfile101
+--move_file $MYSQLD_DATADIR/ib_logfile1_hidden $MYSQLD_DATADIR/ib_logfile1
 
 --echo "test misc 5"
 # make copy of ib_logfile0 before editing

=== modified file 'storage/innobase/srv/srv0start.cc'
--- a/storage/innobase/srv/srv0start.cc	revid:vinay.fisrekar@strippedvb3ugq6l06amj5
+++ b/storage/innobase/srv/srv0start.cc	revid:marko.makela@strippedj3
@@ -2343,6 +2343,13 @@ files_checked:
 			|| srv_n_log_files_found != srv_n_log_files)) {
 			/* Prepare to replace the redo log files. */
 
+			if (srv_read_only_mode) {
+				ib_logf(IB_LOG_LEVEL_ERROR,
+					"Cannot resize log files "
+					"in read-only mode.");
+				return(DB_READ_ONLY);
+			}
+
 			/* Clean the buffer pool. */
 			bool success = buf_flush_list(
 				ULINT_MAX, LSN_MAX, NULL);

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.6-wl6494 branch (marko.makela:4333 to 4335) WL#6494marko.makela28 Sep