List:Commits« Previous MessageNext Message »
From:Mats Kindahl Date:June 2 2007 10:43am
Subject:bk commit into 5.1 tree (mats:1.2362) BUG#24954
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of mats. When mats does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-06-02 10:43:23+02:00, mats@stripped +12 -0
  BUG#24954 (Last_errno and Last_error not set after master_retry_count
  has been reached):
  
  - Fixing slave fatal error message.
  - Adding debug code to generate a fatal error message.
  - Adding test to ensure that message is generated and correct.

  mysql-test/include/show_slave_status.inc@stripped, 2007-06-02 10:43:19+02:00,
mats@stripped +6 -0
    New BitKeeper file ``mysql-test/include/show_slave_status.inc''

  mysql-test/include/show_slave_status.inc@stripped, 2007-06-02 10:43:19+02:00,
mats@stripped +0 -0

  mysql-test/r/rpl_extraCol_innodb.result@stripped, 2007-06-02 10:43:17+02:00,
mats@stripped +14 -14
    Result change.

  mysql-test/r/rpl_extraCol_myisam.result@stripped, 2007-06-02 10:43:17+02:00,
mats@stripped +14 -14
    Result change.

  mysql-test/r/rpl_loaddata_fatal.result@stripped, 2007-06-02 10:43:19+02:00,
mats@stripped +85 -0
    New BitKeeper file ``mysql-test/r/rpl_loaddata_fatal.result''

  mysql-test/r/rpl_loaddata_fatal.result@stripped, 2007-06-02 10:43:19+02:00,
mats@stripped +0 -0

  mysql-test/r/rpl_ndb_extraCol.result@stripped, 2007-06-02 10:43:17+02:00,
mats@stripped +14 -14
    Result change.

  mysql-test/r/rpl_row_tabledefs_2myisam.result@stripped, 2007-06-02 10:43:18+02:00,
mats@stripped +8 -8
    Result change.

  mysql-test/r/rpl_row_tabledefs_3innodb.result@stripped, 2007-06-02 10:43:18+02:00,
mats@stripped +8 -8
    Result change.

  mysql-test/r/rpl_stm_max_relay_size.result@stripped, 2007-06-02 10:43:18+02:00,
mats@stripped +12 -12
    Result change.

  mysql-test/t/rpl_loaddata_fatal-slave.opt@stripped, 2007-06-02 10:43:19+02:00,
mats@stripped +1 -0
    New BitKeeper file ``mysql-test/t/rpl_loaddata_fatal-slave.opt''

  mysql-test/t/rpl_loaddata_fatal-slave.opt@stripped, 2007-06-02 10:43:19+02:00,
mats@stripped +0 -0

  mysql-test/t/rpl_loaddata_fatal.test@stripped, 2007-06-02 10:43:19+02:00,
mats@stripped +19 -0
    New BitKeeper file ``mysql-test/t/rpl_loaddata_fatal.test''

  mysql-test/t/rpl_loaddata_fatal.test@stripped, 2007-06-02 10:43:19+02:00,
mats@stripped +0 -0

  sql/log_event.cc@stripped, 2007-06-02 10:43:18+02:00, mats@stripped +35
-7
    Adding debug variable to stop slave with an out-of-memory error or with
    a fatal error. The checks are put both in the new Execute_load_query_
    log_event and in the old Load_log_event which is used for Execute_load_
    log_event.
    
    Adding code to generate fatal error message.
    
    Eliminating redundant arguments when printing ER_NO_DEFAULT_FOR_FIELD
    message.

  sql/share/errmsg.txt@stripped, 2007-06-02 10:43:19+02:00, mats@stripped
+2 -2
    Making message for ER_NO_DEFAULT_FOR_FIELD consistent over languages
    (actually restoring old message).
    
    Adding argument to ER:SLAVE_FATAL_ERROR message.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	mats
# Host:	kindahl-laptop.dnsalias.net
# Root:	/home/bk/b24954-mysql-5.1-new-rpl

--- 1.257/sql/log_event.cc	2007-06-02 10:43:33 +02:00
+++ 1.258/sql/log_event.cc	2007-06-02 10:43:33 +02:00
@@ -3283,6 +3283,10 @@
   thd->query_length= 0;
   VOID(pthread_mutex_unlock(&LOCK_thread_count));
   close_thread_tables(thd);
+
+  DBUG_EXECUTE_IF("LOAD_DATA_INFILE_has_fatal_error",
+                  thd->query_error= 0; thd->is_fatal_error= 1;);
+
   if (thd->query_error)
   {
     /* this err/sql_errno code is copy-paste from net_send_error() */
@@ -3305,10 +3309,31 @@
 
   if (thd->is_fatal_error)
   {
+    char buf[256];
+    size_t const bytes_written=
+      my_snprintf(buf, sizeof(buf),
+                  "Running LOAD DATA INFILE on table '%s'."
+                  " Default database: '%s'",
+                  (char*)table_name,
+                  print_slave_db_safe(remember_db));
+
+    /*
+      Here bytes_written can be more than the size of buf, in the
+      event that the string was truncated.  This is still safe since
+      there is a trailing NUL appended, and it is important to
+      generate a sensible error that can be used to debug the problem,
+      so we print the truncated string even though it was truncated.
+      We add three trailing dots to emphasize that the string was
+      truncated.
+     */
+    if (bytes_written > sizeof(buf))
+    {
+      char *ptr = buf + sizeof(buf) - 4;
+      ptr[0]= ptr[1]= ptr[2]= '.';
+    }
+
     rli->report(ERROR_LEVEL, ER_SLAVE_FATAL_ERROR,
-                ER(ER_SLAVE_FATAL_ERROR),
-                "Running LOAD DATA INFILE on table '%s'. Default database: '%s'",
-                (char*)table_name, print_slave_db_safe(remember_db));
+                ER(ER_SLAVE_FATAL_ERROR), buf);
     return 1;
   }
 
@@ -5170,9 +5195,13 @@
   char *fname_end;
   int error;
 
+  buf= my_malloc(q_len + 1 - (fn_pos_end - fn_pos_start) +
+                 (FN_REFLEN + 10) + 10 + 8 + 5, MYF(MY_WME));
+
+  DBUG_EXECUTE_IF("LOAD_DATA_INFILE_has_fatal_error", buf= NULL;);
+
   /* Replace filename and LOCAL keyword in query before executing it */
-  if (!(buf = my_malloc(q_len + 1 - (fn_pos_end - fn_pos_start) +
-                        (FN_REFLEN + 10) + 10 + 8 + 5, MYF(MY_WME))))
+  if (buf == NULL)
   {
     rli->report(ERROR_LEVEL, ER_SLAVE_FATAL_ERROR,
                 ER(ER_SLAVE_FATAL_ERROR), "Not enough memory");
@@ -5614,8 +5643,7 @@
     {
       rli->report(ERROR_LEVEL, ER_NO_DEFAULT_FOR_FIELD,
                   ER(ER_NO_DEFAULT_FOR_FIELD),
-                  (*field_ptr)->field_name, table->s->db.str,
-                  table->s->table_name.str);
+                  (*field_ptr)->field_name);
       error = ER_NO_DEFAULT_FOR_FIELD;
     }
     else

--- 1.138/sql/share/errmsg.txt	2007-06-02 10:43:33 +02:00
+++ 1.139/sql/share/errmsg.txt	2007-06-02 10:43:33 +02:00
@@ -5312,7 +5312,7 @@
         eng "There is no %s row in %s trigger"
         ger "Es gibt keine %s-Zeile im %s-Trigger"
 ER_NO_DEFAULT_FOR_FIELD  
-        eng "Field `%s` of table `%s`.`%s` has no default value and cannot be NULL"
+        eng "Field '%-.64s' doesn't have a default value"
         ger "Feld '%-.64s' hat keinen Vorgabewert"
 ER_DIVISION_BY_ZERO 22012 
         eng "Division by 0"
@@ -6017,7 +6017,7 @@
 ER_BINLOG_PURGE_EMFILE
         eng "Too many files opened, please execute the command again"
 ER_SLAVE_FATAL_ERROR
-        eng "Fatal error"
+        eng "Fatal error: %s"
 ER_SLAVE_RELAY_LOG_READ_FAILURE
         eng "Relay log read failure: %s"
 ER_SLAVE_RELAY_LOG_WRITE_FAILURE

--- 1.27/mysql-test/r/rpl_stm_max_relay_size.result	2007-06-02 10:43:33 +02:00
+++ 1.28/mysql-test/r/rpl_stm_max_relay_size.result	2007-06-02 10:43:33 +02:00
@@ -55,8 +55,8 @@
 Master_SSL_Cipher	
 Master_SSL_Key	
 Seconds_Behind_Master	#
-Last_IO_Errno	0
-Last_IO_Error	
+Last_IO_Errno	#
+Last_IO_Error	#
 Last_SQL_Errno	0
 Last_SQL_Error	
 #
@@ -102,8 +102,8 @@
 Master_SSL_Cipher	
 Master_SSL_Key	
 Seconds_Behind_Master	#
-Last_IO_Errno	0
-Last_IO_Error	
+Last_IO_Errno	#
+Last_IO_Error	#
 Last_SQL_Errno	0
 Last_SQL_Error	
 #
@@ -149,8 +149,8 @@
 Master_SSL_Cipher	
 Master_SSL_Key	
 Seconds_Behind_Master	#
-Last_IO_Errno	0
-Last_IO_Error	
+Last_IO_Errno	#
+Last_IO_Error	#
 Last_SQL_Errno	0
 Last_SQL_Error	
 #
@@ -193,8 +193,8 @@
 Master_SSL_Cipher	
 Master_SSL_Key	
 Seconds_Behind_Master	#
-Last_IO_Errno	0
-Last_IO_Error	
+Last_IO_Errno	#
+Last_IO_Error	#
 Last_SQL_Errno	0
 Last_SQL_Error	
 #
@@ -238,8 +238,8 @@
 Master_SSL_Cipher	
 Master_SSL_Key	
 Seconds_Behind_Master	#
-Last_IO_Errno	0
-Last_IO_Error	
+Last_IO_Errno	#
+Last_IO_Error	#
 Last_SQL_Errno	0
 Last_SQL_Error	
 #
@@ -281,8 +281,8 @@
 Master_SSL_Cipher	
 Master_SSL_Key	
 Seconds_Behind_Master	#
-Last_IO_Errno	0
-Last_IO_Error	
+Last_IO_Errno	#
+Last_IO_Error	#
 Last_SQL_Errno	0
 Last_SQL_Error	
 flush logs;

--- 1.2/mysql-test/r/rpl_extraCol_innodb.result	2007-06-02 10:43:33 +02:00
+++ 1.3/mysql-test/r/rpl_extraCol_innodb.result	2007-06-02 10:43:33 +02:00
@@ -73,7 +73,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Column 0 type mismatch - received type 252, test.t3 has type 3
+Last_Error	Table definition on master and slave does not match: Column 0 type mismatch -
received type 252, test.t3 has type 3
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -90,7 +90,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Column 0 type mismatch - received type 252, test.t3 has type 3
+Last_SQL_Error	Table definition on master and slave does not match: Column 0 type
mismatch - received type 252, test.t3 has type 3
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 START SLAVE;
 *** Drop t3  ***
@@ -134,7 +134,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Column 0 type mismatch - received type 246, test.t4 has type 3
+Last_Error	Table definition on master and slave does not match: Column 0 type mismatch -
received type 246, test.t4 has type 3
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -151,7 +151,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Column 0 type mismatch - received type 246, test.t4 has type 3
+Last_SQL_Error	Table definition on master and slave does not match: Column 0 type
mismatch - received type 246, test.t4 has type 3
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 START SLAVE;
 *** Drop t4  ***
@@ -195,7 +195,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Column 5 type mismatch - received type 4, test.t5 has type 246
+Last_Error	Table definition on master and slave does not match: Column 5 type mismatch -
received type 4, test.t5 has type 246
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -212,7 +212,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Column 5 type mismatch - received type 4, test.t5 has type 246
+Last_SQL_Error	Table definition on master and slave does not match: Column 5 type
mismatch - received type 4, test.t5 has type 246
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 START SLAVE;
 *** Drop t5  ***
@@ -255,7 +255,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Column 3 type mismatch - received type 16, test.t6 has type 3
+Last_Error	Table definition on master and slave does not match: Column 3 type mismatch -
received type 16, test.t6 has type 3
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -272,7 +272,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Column 3 type mismatch - received type 16, test.t6 has type 3
+Last_SQL_Error	Table definition on master and slave does not match: Column 3 type
mismatch - received type 16, test.t6 has type 3
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
 *** Drop t6  ***
 DROP TABLE t6;
@@ -366,7 +366,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Column 2 type mismatch - received type 254, test.t10 has type 5
+Last_Error	Table definition on master and slave does not match: Column 2 type mismatch -
received type 254, test.t10 has type 5
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -383,7 +383,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Column 2 type mismatch - received type 254, test.t10 has type 5
+Last_SQL_Error	Table definition on master and slave does not match: Column 2 type
mismatch - received type 254, test.t10 has type 5
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 START SLAVE;
 *** Drop t10  ***
@@ -426,7 +426,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Column 2 type mismatch - received type 15, test.t11 has type 252
+Last_Error	Table definition on master and slave does not match: Column 2 type mismatch -
received type 15, test.t11 has type 252
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -443,7 +443,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Column 2 type mismatch - received type 15, test.t11 has type 252
+Last_SQL_Error	Table definition on master and slave does not match: Column 2 type
mismatch - received type 15, test.t11 has type 252
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 START SLAVE;
 *** Drop t11  ***
@@ -749,7 +749,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Column 0 type mismatch - received type 8, test.t17 has type 2
+Last_Error	Table definition on master and slave does not match: Column 0 type mismatch -
received type 8, test.t17 has type 2
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -766,7 +766,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Column 0 type mismatch - received type 8, test.t17 has type 2
+Last_SQL_Error	Table definition on master and slave does not match: Column 0 type
mismatch - received type 8, test.t17 has type 2
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 START SLAVE;
 ** DROP table t17 ***

--- 1.2/mysql-test/r/rpl_extraCol_myisam.result	2007-06-02 10:43:33 +02:00
+++ 1.3/mysql-test/r/rpl_extraCol_myisam.result	2007-06-02 10:43:33 +02:00
@@ -73,7 +73,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Column 0 type mismatch - received type 252, test.t3 has type 3
+Last_Error	Table definition on master and slave does not match: Column 0 type mismatch -
received type 252, test.t3 has type 3
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -90,7 +90,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Column 0 type mismatch - received type 252, test.t3 has type 3
+Last_SQL_Error	Table definition on master and slave does not match: Column 0 type
mismatch - received type 252, test.t3 has type 3
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 START SLAVE;
 *** Drop t3  ***
@@ -134,7 +134,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Column 0 type mismatch - received type 246, test.t4 has type 3
+Last_Error	Table definition on master and slave does not match: Column 0 type mismatch -
received type 246, test.t4 has type 3
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -151,7 +151,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Column 0 type mismatch - received type 246, test.t4 has type 3
+Last_SQL_Error	Table definition on master and slave does not match: Column 0 type
mismatch - received type 246, test.t4 has type 3
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 START SLAVE;
 *** Drop t4  ***
@@ -195,7 +195,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Column 5 type mismatch - received type 4, test.t5 has type 246
+Last_Error	Table definition on master and slave does not match: Column 5 type mismatch -
received type 4, test.t5 has type 246
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -212,7 +212,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Column 5 type mismatch - received type 4, test.t5 has type 246
+Last_SQL_Error	Table definition on master and slave does not match: Column 5 type
mismatch - received type 4, test.t5 has type 246
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 START SLAVE;
 *** Drop t5  ***
@@ -255,7 +255,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Column 3 type mismatch - received type 16, test.t6 has type 3
+Last_Error	Table definition on master and slave does not match: Column 3 type mismatch -
received type 16, test.t6 has type 3
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -272,7 +272,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Column 3 type mismatch - received type 16, test.t6 has type 3
+Last_SQL_Error	Table definition on master and slave does not match: Column 3 type
mismatch - received type 16, test.t6 has type 3
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
 *** Drop t6  ***
 DROP TABLE t6;
@@ -366,7 +366,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Column 2 type mismatch - received type 254, test.t10 has type 5
+Last_Error	Table definition on master and slave does not match: Column 2 type mismatch -
received type 254, test.t10 has type 5
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -383,7 +383,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Column 2 type mismatch - received type 254, test.t10 has type 5
+Last_SQL_Error	Table definition on master and slave does not match: Column 2 type
mismatch - received type 254, test.t10 has type 5
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 START SLAVE;
 *** Drop t10  ***
@@ -426,7 +426,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Column 2 type mismatch - received type 15, test.t11 has type 252
+Last_Error	Table definition on master and slave does not match: Column 2 type mismatch -
received type 15, test.t11 has type 252
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -443,7 +443,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Column 2 type mismatch - received type 15, test.t11 has type 252
+Last_SQL_Error	Table definition on master and slave does not match: Column 2 type
mismatch - received type 15, test.t11 has type 252
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 START SLAVE;
 *** Drop t11  ***
@@ -749,7 +749,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Column 0 type mismatch - received type 8, test.t17 has type 2
+Last_Error	Table definition on master and slave does not match: Column 0 type mismatch -
received type 8, test.t17 has type 2
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -766,7 +766,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Column 0 type mismatch - received type 8, test.t17 has type 2
+Last_SQL_Error	Table definition on master and slave does not match: Column 0 type
mismatch - received type 8, test.t17 has type 2
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 START SLAVE;
 ** DROP table t17 ***

--- 1.2/mysql-test/r/rpl_ndb_extraCol.result	2007-06-02 10:43:33 +02:00
+++ 1.3/mysql-test/r/rpl_ndb_extraCol.result	2007-06-02 10:43:33 +02:00
@@ -73,7 +73,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Column 0 type mismatch - received type 252, test.t3 has type 3
+Last_Error	Table definition on master and slave does not match: Column 0 type mismatch -
received type 252, test.t3 has type 3
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -90,7 +90,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Column 0 type mismatch - received type 252, test.t3 has type 3
+Last_SQL_Error	Table definition on master and slave does not match: Column 0 type
mismatch - received type 252, test.t3 has type 3
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 START SLAVE;
 *** Drop t3  ***
@@ -134,7 +134,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Column 0 type mismatch - received type 246, test.t4 has type 3
+Last_Error	Table definition on master and slave does not match: Column 0 type mismatch -
received type 246, test.t4 has type 3
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -151,7 +151,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Column 0 type mismatch - received type 246, test.t4 has type 3
+Last_SQL_Error	Table definition on master and slave does not match: Column 0 type
mismatch - received type 246, test.t4 has type 3
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 START SLAVE;
 *** Drop t4  ***
@@ -195,7 +195,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Column 5 type mismatch - received type 4, test.t5 has type 246
+Last_Error	Table definition on master and slave does not match: Column 5 type mismatch -
received type 4, test.t5 has type 246
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -212,7 +212,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Column 5 type mismatch - received type 4, test.t5 has type 246
+Last_SQL_Error	Table definition on master and slave does not match: Column 5 type
mismatch - received type 4, test.t5 has type 246
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 START SLAVE;
 *** Drop t5  ***
@@ -255,7 +255,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Column 3 type mismatch - received type 16, test.t6 has type 3
+Last_Error	Table definition on master and slave does not match: Column 3 type mismatch -
received type 16, test.t6 has type 3
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -272,7 +272,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Column 3 type mismatch - received type 16, test.t6 has type 3
+Last_SQL_Error	Table definition on master and slave does not match: Column 3 type
mismatch - received type 16, test.t6 has type 3
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
 *** Drop t6  ***
 DROP TABLE t6;
@@ -366,7 +366,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Column 2 type mismatch - received type 254, test.t10 has type 5
+Last_Error	Table definition on master and slave does not match: Column 2 type mismatch -
received type 254, test.t10 has type 5
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -383,7 +383,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Column 2 type mismatch - received type 254, test.t10 has type 5
+Last_SQL_Error	Table definition on master and slave does not match: Column 2 type
mismatch - received type 254, test.t10 has type 5
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 START SLAVE;
 *** Drop t10  ***
@@ -426,7 +426,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Column 2 type mismatch - received type 15, test.t11 has type 252
+Last_Error	Table definition on master and slave does not match: Column 2 type mismatch -
received type 15, test.t11 has type 252
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -443,7 +443,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Column 2 type mismatch - received type 15, test.t11 has type 252
+Last_SQL_Error	Table definition on master and slave does not match: Column 2 type
mismatch - received type 15, test.t11 has type 252
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 START SLAVE;
 *** Drop t11  ***
@@ -750,7 +750,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Column 0 type mismatch - received type 8, test.t17 has type 2
+Last_Error	Table definition on master and slave does not match: Column 0 type mismatch -
received type 8, test.t17 has type 2
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -767,7 +767,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Column 0 type mismatch - received type 8, test.t17 has type 2
+Last_SQL_Error	Table definition on master and slave does not match: Column 0 type
mismatch - received type 8, test.t17 has type 2
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 START SLAVE;
 ** DROP table t17 ***

--- 1.8/mysql-test/r/rpl_row_tabledefs_2myisam.result	2007-06-02 10:43:33 +02:00
+++ 1.9/mysql-test/r/rpl_row_tabledefs_2myisam.result	2007-06-02 10:43:33 +02:00
@@ -164,7 +164,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Table width mismatch - received 2 columns, test.t2 has 1 columns
+Last_Error	Table definition on master and slave does not match: Table width mismatch -
received 2 columns, test.t2 has 1 columns
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -181,7 +181,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Table width mismatch - received 2 columns, test.t2 has 1 columns
+Last_SQL_Error	Table definition on master and slave does not match: Table width mismatch
- received 2 columns, test.t2 has 1 columns
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 START SLAVE;
 INSERT INTO t9 VALUES (4);
@@ -206,7 +206,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Column 0 type mismatch - received type 3, test.t4 has type 4
+Last_Error	Table definition on master and slave does not match: Column 0 type mismatch -
received type 3, test.t4 has type 4
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -223,7 +223,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Column 0 type mismatch - received type 3, test.t4 has type 4
+Last_SQL_Error	Table definition on master and slave does not match: Column 0 type
mismatch - received type 3, test.t4 has type 4
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 START SLAVE;
 INSERT INTO t9 VALUES (5);
@@ -248,7 +248,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Column 1 type mismatch - received type 3, test.t5 has type 4
+Last_Error	Table definition on master and slave does not match: Column 1 type mismatch -
received type 3, test.t5 has type 4
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -265,7 +265,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Column 1 type mismatch - received type 3, test.t5 has type 4
+Last_SQL_Error	Table definition on master and slave does not match: Column 1 type
mismatch - received type 3, test.t5 has type 4
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 START SLAVE;
 INSERT INTO t9 VALUES (6);
@@ -290,7 +290,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Column 2 type mismatch - received type 3, test.t6 has type 4
+Last_Error	Table definition on master and slave does not match: Column 2 type mismatch -
received type 3, test.t6 has type 4
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -307,7 +307,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Column 2 type mismatch - received type 3, test.t6 has type 4
+Last_SQL_Error	Table definition on master and slave does not match: Column 2 type
mismatch - received type 3, test.t6 has type 4
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 START SLAVE;
 INSERT INTO t9 VALUES (6);
--- New file ---
+++ mysql-test/include/show_slave_status.inc	07/06/02 10:43:19
# Include file to show the slave status, masking out some information
# that varies depending on where the test is executed.

--replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 8 # 9 # 16 # 23 # 33 # 34 # 35 #
query_vertical SHOW SLAVE STATUS;

--- New file ---
+++ mysql-test/r/rpl_loaddata_fatal.result	07/06/02 10:43:19
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 VALUES (1,10);
SHOW SLAVE STATUS;
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_PORT
Connect_Retry	1
Master_Log_File	master-bin.000001
Read_Master_Log_Pos	286
Relay_Log_File	#
Relay_Log_Pos	#
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
Slave_SQL_Running	Yes
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	#
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	0
Last_Error	
Skip_Counter	0
Exec_Master_Log_Pos	286
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
Last_IO_Errno	#
Last_IO_Error	#
Last_SQL_Errno	0
Last_SQL_Error	
LOAD DATA INFILE '../std_data_ln/rpl_loaddata.dat' INTO TABLE t1;
SHOW SLAVE STATUS;
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_PORT
Connect_Retry	1
Master_Log_File	master-bin.000001
Read_Master_Log_Pos	461
Relay_Log_File	#
Relay_Log_Pos	#
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
Slave_SQL_Running	No
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	#
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	1581
Last_Error	Fatal error: Not enough memory
Skip_Counter	0
Exec_Master_Log_Pos	321
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
Last_IO_Errno	#
Last_IO_Error	#
Last_SQL_Errno	1581
Last_SQL_Error	Fatal error: Not enough memory

--- New file ---
+++ mysql-test/t/rpl_loaddata_fatal-slave.opt	07/06/02 10:43:19
--loose-debug=+d,LOAD_DATA_INFILE_has_fatal_error

--- New file ---
+++ mysql-test/t/rpl_loaddata_fatal.test	07/06/02 10:43:19
source include/have_binlog_format_mixed_or_statement.inc;
source include/master-slave.inc;

# We do this little stunt to make sure that the slave has started
# before we stop it again.
connection master;
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 VALUES (1,10);
sync_slave_with_master;
source include/show_slave_status.inc;

# Now we feed it a load data infile, which should make it stop with a
# fatal error.
connection master;
LOAD DATA INFILE '../std_data_ln/rpl_loaddata.dat' INTO TABLE t1;

connection slave;
wait_for_slave_to_stop;
source include/show_slave_status.inc;


--- 1.5/mysql-test/r/rpl_row_tabledefs_3innodb.result	2007-06-02 10:43:33 +02:00
+++ 1.6/mysql-test/r/rpl_row_tabledefs_3innodb.result	2007-06-02 10:43:33 +02:00
@@ -164,7 +164,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Table width mismatch - received 2 columns, test.t2 has 1 columns
+Last_Error	Table definition on master and slave does not match: Table width mismatch -
received 2 columns, test.t2 has 1 columns
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -181,7 +181,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Table width mismatch - received 2 columns, test.t2 has 1 columns
+Last_SQL_Error	Table definition on master and slave does not match: Table width mismatch
- received 2 columns, test.t2 has 1 columns
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 START SLAVE;
 INSERT INTO t9 VALUES (4);
@@ -206,7 +206,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Column 0 type mismatch - received type 3, test.t4 has type 4
+Last_Error	Table definition on master and slave does not match: Column 0 type mismatch -
received type 3, test.t4 has type 4
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -223,7 +223,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Column 0 type mismatch - received type 3, test.t4 has type 4
+Last_SQL_Error	Table definition on master and slave does not match: Column 0 type
mismatch - received type 3, test.t4 has type 4
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 START SLAVE;
 INSERT INTO t9 VALUES (5);
@@ -248,7 +248,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Column 1 type mismatch - received type 3, test.t5 has type 4
+Last_Error	Table definition on master and slave does not match: Column 1 type mismatch -
received type 3, test.t5 has type 4
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -265,7 +265,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Column 1 type mismatch - received type 3, test.t5 has type 4
+Last_SQL_Error	Table definition on master and slave does not match: Column 1 type
mismatch - received type 3, test.t5 has type 4
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 START SLAVE;
 INSERT INTO t9 VALUES (6);
@@ -290,7 +290,7 @@
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1522
-Last_Error	Column 2 type mismatch - received type 3, test.t6 has type 4
+Last_Error	Table definition on master and slave does not match: Column 2 type mismatch -
received type 3, test.t6 has type 4
 Skip_Counter	0
 Exec_Master_Log_Pos	#
 Relay_Log_Space	#
@@ -307,7 +307,7 @@
 Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	1522
-Last_SQL_Error	Column 2 type mismatch - received type 3, test.t6 has type 4
+Last_SQL_Error	Table definition on master and slave does not match: Column 2 type
mismatch - received type 3, test.t6 has type 4
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 START SLAVE;
 INSERT INTO t9 VALUES (6);
Thread
bk commit into 5.1 tree (mats:1.2362) BUG#24954Mats Kindahl2 Jun