List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:September 29 2011 11:59am
Subject:bzr push into mysql-trunk branch (andrei.elkin:3449 to 3450)
View as plain text  
 3450 Andrei Elkin	2011-09-29 [merge]
      merge from 5.5 bugfixing branch

    modified:
      mysql-test/suite/rpl/r/rpl_checksum.result
      mysql-test/suite/rpl/r/rpl_log_pos.result
      mysql-test/suite/rpl/r/rpl_manual_change_index_file.result
      mysql-test/suite/rpl/r/rpl_packet.result
      mysql-test/suite/rpl/r/rpl_row_event_max_size.result
      sql/rpl_master.cc
      sql/share/errmsg-utf8.txt
 3449 Rohit Kalhans	2011-09-29 [merge]
      BUG#11758262: Merge from mysql-5.5 to mysql-trunk branch.

    removed:
      mysql-test/extra/rpl_tests/rpl_insert_duplicate.test
      mysql-test/suite/rpl/r/rpl_insert_duplicate.result
      mysql-test/suite/rpl/r/rpl_insert_select.result
      mysql-test/suite/rpl/t/rpl_insert_duplicate.test
      mysql-test/suite/rpl/t/rpl_insert_select.test
    modified:
      mysql-test/extra/rpl_tests/rpl_insert_id.test
      mysql-test/extra/rpl_tests/rpl_insert_ignore.test
      mysql-test/r/commit_1innodb.result
      mysql-test/suite/binlog/r/binlog_stm_blackhole.result
      mysql-test/suite/binlog/r/binlog_unsafe.result
      mysql-test/suite/binlog/t/binlog_unsafe.test
      mysql-test/suite/rpl/r/rpl_insert_ignore.result
      mysql-test/suite/rpl/r/rpl_known_bugs_detection.result
      mysql-test/suite/rpl/t/rpl_known_bugs_detection.test
      sql/share/errmsg-utf8.txt
      sql/sql_lex.cc
      sql/sql_lex.h
      sql/sql_parse.cc
=== modified file 'mysql-test/suite/rpl/r/rpl_checksum.result'
--- a/mysql-test/suite/rpl/r/rpl_checksum.result	2011-05-17 22:52:04 +0000
+++ b/mysql-test/suite/rpl/r/rpl_checksum.result	2011-09-29 11:55:31 +0000
@@ -64,7 +64,7 @@ insert into t1 values (1) /* will not be
 set @@global.debug='d,simulate_slave_unaware_checksum';
 start slave;
 include/wait_for_slave_io_error.inc [errno=1236]
-Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'Slave can not handle replication events with the checksum that master is configured to log''
+Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'Slave can not handle replication events with the checksum that master is configured to log; the last event was read from ./master-bin.000010 at 114, the last byte read was read from ./master-bin.000010 at 114.''
 select count(*) as zero from t1;
 zero
 0

=== modified file 'mysql-test/suite/rpl/r/rpl_log_pos.result'
--- a/mysql-test/suite/rpl/r/rpl_log_pos.result	2011-01-31 13:44:38 +0000
+++ b/mysql-test/suite/rpl/r/rpl_log_pos.result	2011-09-29 11:55:31 +0000
@@ -9,7 +9,7 @@ change master to master_log_pos=MASTER_L
 Read_Master_Log_Pos = '75'
 start slave;
 include/wait_for_slave_io_error.inc [errno=1236]
-Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master''
+Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the last event was read from ./master-bin.000001 at 75, the last byte read was read from ./master-bin.000001 at 94.''
 include/stop_slave_sql.inc
 show master status;
 File	Position	Binlog_Do_DB	Binlog_Ignore_DB

=== modified file 'mysql-test/suite/rpl/r/rpl_manual_change_index_file.result'
--- a/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result	2011-01-17 10:10:06 +0000
+++ b/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result	2011-09-29 11:55:31 +0000
@@ -5,7 +5,7 @@ CREATE TABLE t1(c1 INT);
 FLUSH LOGS;
 call mtr.add_suppression('Got fatal error 1236 from master when reading data from binary log: .*could not find next log');
 include/wait_for_slave_io_error.inc [errno=1236]
-Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'could not find next log''
+Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'could not find next log; the last event was read from ./master-bin.000002 at 251, the last byte read was read from ./master-bin.000002 at 251.''
 CREATE TABLE t2(c1 INT);
 FLUSH LOGS;
 CREATE TABLE t3(c1 INT);

=== modified file 'mysql-test/suite/rpl/r/rpl_packet.result'
--- a/mysql-test/suite/rpl/r/rpl_packet.result	2011-08-19 13:04:28 +0000
+++ b/mysql-test/suite/rpl/r/rpl_packet.result	2011-09-29 11:55:31 +0000
@@ -37,7 +37,7 @@ DROP TABLE t1;
 CREATE TABLE t1 (f1 int PRIMARY KEY, f2 LONGTEXT, f3 LONGTEXT) ENGINE=MyISAM;
 INSERT INTO t1(f1, f2, f3) VALUES(1, REPEAT('a', @@global.max_allowed_packet), REPEAT('b', @@global.max_allowed_packet));
 include/wait_for_slave_io_error.inc [errno=1236]
-Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master''
+Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the last event was read from ./master-bin.000001 at 484, the last byte read was read from ./master-bin.000001 at 503.''
 STOP SLAVE;
 RESET SLAVE;
 RESET MASTER;

=== modified file 'mysql-test/suite/rpl/r/rpl_row_event_max_size.result'
--- a/mysql-test/suite/rpl/r/rpl_row_event_max_size.result	2011-08-19 13:04:28 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_event_max_size.result	2011-09-29 11:55:31 +0000
@@ -63,7 +63,7 @@ call mtr.add_suppression("Found invalid 
 call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
 drop table t1;
 include/wait_for_slave_io_error.inc [errno=1236]
-Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master''
+Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the last event was read from ./master-bin.000001 at 8098734, the last byte read was read from ./master-bin.000001 at 8098753.''
 ==== clean up ====
 include/stop_slave_sql.inc
 RESET SLAVE;

=== modified file 'sql/rpl_master.cc'
--- a/sql/rpl_master.cc	2011-07-21 16:27:14 +0000
+++ b/sql/rpl_master.cc	2011-09-29 11:55:31 +0000
@@ -517,7 +517,7 @@ Increase max_allowed_packet on master";
     *errmsg = "memory allocation failed reading log event";
     break;
   case LOG_READ_TRUNC:
-    *errmsg = "binlog truncated in the middle of event";
+    *errmsg = "binlog truncated in the middle of event; consider out of disk space on master";
     break;
   case LOG_READ_CHECKSUM_FAILURE:
     *errmsg = "event read from binlog did not pass crc check";
@@ -629,6 +629,9 @@ void mysql_binlog_send(THD* thd, char* l
   String* packet = &thd->packet;
   int error;
   const char *errmsg = "Unknown error";
+  const char *fmt= "%s; the last event was read from %s at %s, the last byte read was read from %s at %s.";
+  char llbuff1[22], llbuff2[22];
+  char error_text[MAX_SLAVE_ERRMSG]; // to be send to slave via my_message()
   NET* net = &thd->net;
   mysql_mutex_t *log_lock;
   mysql_cond_t *log_cond;
@@ -897,11 +900,9 @@ impossible position";
     if (reset_transmit_packet(thd, flags, &ev_offset, &errmsg))
       goto err;
 
-    my_off_t prev_pos= pos;
-    while (!(error = Log_event::read_log_event(&log, packet, log_lock,
+    while (!(error= Log_event::read_log_event(&log, packet, log_lock,
                                                current_checksum_alg)))
     {
-      prev_pos= my_b_tell(&log);
 #ifndef DBUG_OFF
       if (max_binlog_dump_events && !left_events--)
       {
@@ -1005,18 +1006,6 @@ impossible position";
     }
 
     /*
-      here we were reading binlog that was not closed properly (as a result
-      of a crash ?). treat any corruption as EOF
-    */
-    if (binlog_can_be_corrupted &&
-        error != LOG_READ_MEM &&
-        error != LOG_READ_CHECKSUM_FAILURE &&
-        error != LOG_READ_EOF)
-    {
-      my_b_seek(&log, prev_pos);
-      error=LOG_READ_EOF;
-    }
-    /*
       TODO: now that we are logging the offset, check to make sure
       the recorded offset and the actual match.
       Guilhem 2003-06: this is not true if this master is a slave
@@ -1263,6 +1252,16 @@ end:
 
 err:
   THD_STAGE_INFO(thd, stage_waiting_to_finalize_termination);
+  if (my_errno == ER_MASTER_FATAL_ERROR_READING_BINLOG && my_b_inited(&log))
+    /* 
+       detailing the fatal error message with coordinates 
+       of the last position read.
+    */
+    my_snprintf(error_text, sizeof(error_text), fmt, errmsg,
+                coord->file_name, (llstr(coord->pos, llbuff1), llbuff1),
+                log_file_name, (llstr(my_b_tell(&log), llbuff2), llbuff2));
+  else
+    strcpy(error_text, errmsg);
   end_io_cache(&log);
   (void) RUN_HOOK(binlog_transmit, transmit_stop, (thd, flags));
   /*
@@ -1280,7 +1279,7 @@ err:
   thd->variables.max_allowed_packet= old_max_allowed_packet;
 
   thd->set_stmt_da(saved_da);
-  my_message(my_errno, errmsg, MYF(0));
+  my_message(my_errno, error_text, MYF(0));
   DBUG_VOID_RETURN;
 }
 

=== modified file 'sql/share/errmsg-utf8.txt'
--- a/sql/share/errmsg-utf8.txt	2011-09-29 10:42:53 +0000
+++ b/sql/share/errmsg-utf8.txt	2011-09-29 11:55:31 +0000
@@ -4701,14 +4701,14 @@ ER_NOT_SUPPORTED_YET 42000 
         spa "Esta versión de MySQL no soporta todavia '%s'"
         swe "Denna version av MySQL kan ännu inte utföra '%s'"
 ER_MASTER_FATAL_ERROR_READING_BINLOG  
-        nla "Kreeg fatale fout %d: '%-.128s' van master tijdens lezen van data uit binaire log"
-        eng "Got fatal error %d from master when reading data from binary log: '%-.128s'"
-        ger "Schwerer Fehler %d: '%-.128s vom Master beim Lesen des binären Logs"
-        ita "Errore fatale %d: '%-.128s' dal master leggendo i dati dal log binario"
-        por "Obteve fatal erro %d: '%-.128s' do master quando lendo dados do binary log"
-        rus "Получена неисправspa "Recibió fatal error %d: '%-.128s' del master cuando leyendo datos del binary log"
-        swe "Fick fatalt fel %d: '%-.128s' från master vid läsning av binärloggen"
+        nla "Kreeg fatale fout %d: '%-.256s' van master tijdens lezen van data uit binaire log"
+        eng "Got fatal error %d from master when reading data from binary log: '%-.256s'"
+        ger "Schwerer Fehler %d: '%-.256s vom Master beim Lesen des binären Logs"
+        ita "Errore fatale %d: '%-.256s' dal master leggendo i dati dal log binario"
+        por "Obteve fatal erro %d: '%-.256s' do master quando lendo dados do binary log"
+        rus "Получена неисправимая ошдвоичного журнала"
+        spa "Recibió fatal error %d: '%-.256s' del master cuando leyendo datos del binary log"
+        swe "Fick fatalt fel %d: '%-.256s' från master vid läsning av binärloggen"
 ER_SLAVE_IGNORED_TABLE  
         eng "Slave SQL thread ignored the query because of replicate-*-table rules"
         ger "Slave-SQL-Thread hat die Abfrage aufgrund von replicate-*-table-Regeln ignoriert"

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (andrei.elkin:3449 to 3450) Andrei Elkin2 Oct