List:Commits« Previous MessageNext Message »
From:Mats Kindahl Date:June 11 2007 10:15pm
Subject:bk commit into 5.1 tree (mats:1.2551) 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-11 22:15:39+02:00, mats@stripped +69 -0
  BUG#24954 (Last_errno and Last_error not set after master_retry_count has
  been reached):
  
  Post-merge patch to handle all the changes to the tree since the tree
  was cloned.

  mysql-test/extra/rpl_tests/rpl_log.test@stripped, 2007-06-11 22:15:16+02:00,
mats@stripped +1 -3
    Replacing SHOW SLAVE STATUS with include file.

  mysql-test/extra/rpl_tests/rpl_max_relay_size.test@stripped, 2007-06-11 22:15:16+02:00,
mats@stripped +9 -27
    Replacing SHOW SLAVE STATUS with include file.

  mysql-test/extra/rpl_tests/rpl_reset_slave.test@stripped, 2007-06-11 22:15:16+02:00,
mats@stripped +4 -12
    Replacing SHOW SLAVE STATUS with include file.

  mysql-test/include/show_slave_status.inc@stripped, 2007-06-11 22:15:17+02:00,
mats@stripped +1 -1
    Column change.

  mysql-test/r/rpl_000015.result@stripped, 2007-06-11 22:15:17+02:00,
mats@stripped +118 -11
    Result file change.

  mysql-test/r/rpl_change_master.result@stripped, 2007-06-11 22:15:17+02:00,
mats@stripped +78 -6
    Result file change.

  mysql-test/r/rpl_empty_master_crash.result@stripped, 2007-06-11 22:15:17+02:00,
mats@stripped +1 -2
    Result file change.

  mysql-test/r/rpl_extraCol_innodb.result@stripped, 2007-06-11 22:15:17+02:00,
mats@stripped +7 -7
    Result file change.

  mysql-test/r/rpl_extraCol_myisam.result@stripped, 2007-06-11 22:15:18+02:00,
mats@stripped +7 -7
    Result file change.

  mysql-test/r/rpl_flushlog_loop.result@stripped, 2007-06-11 22:15:18+02:00,
mats@stripped +2 -2
    Result file change.

  mysql-test/r/rpl_incident.result@stripped, 2007-06-11 22:15:18+02:00,
mats@stripped +8 -0
    Result file change.

  mysql-test/r/rpl_known_bugs_detection.result@stripped, 2007-06-11 22:15:18+02:00,
mats@stripped +12 -0
    Result file change.

  mysql-test/r/rpl_loaddata.result@stripped, 2007-06-11 22:15:18+02:00,
mats@stripped +6 -6
    Result file change.

  mysql-test/r/rpl_loaddata_fatal.result@stripped, 2007-06-11 22:15:18+02:00,
mats@stripped +8 -6
    Result file change.

  mysql-test/r/rpl_log_pos.result@stripped, 2007-06-11 22:15:19+02:00,
mats@stripped +156 -12
    Result file change.

  mysql-test/r/rpl_ndb_basic.result@stripped, 2007-06-11 22:15:19+02:00,
mats@stripped +2 -2
    Result file change.

  mysql-test/r/rpl_ndb_circular.result@stripped, 2007-06-11 22:15:19+02:00,
mats@stripped +8 -0
    Result file change.

  mysql-test/r/rpl_ndb_extraCol.result@stripped, 2007-06-11 22:15:19+02:00,
mats@stripped +7 -7
    Result file change.

  mysql-test/r/rpl_ndb_idempotent.result@stripped, 2007-06-11 22:15:19+02:00,
mats@stripped +32 -6
    Result file change.

  mysql-test/r/rpl_ndb_log.result@stripped, 2007-06-11 22:15:20+02:00,
mats@stripped +39 -3
    Result file change.

  mysql-test/r/rpl_ndb_sync.result@stripped, 2007-06-11 22:15:20+02:00,
mats@stripped +38 -2
    Result file change.

  mysql-test/r/rpl_rbr_to_sbr.result@stripped, 2007-06-11 22:15:20+02:00,
mats@stripped +2 -2
    Result file change.

  mysql-test/r/rpl_redirect.result@stripped, 2007-06-11 22:15:20+02:00,
mats@stripped +0 -1
    Result file change.

  mysql-test/r/rpl_replicate_do.result@stripped, 2007-06-11 22:15:20+02:00,
mats@stripped +39 -3
    Result file change.

  mysql-test/r/rpl_rotate_logs.result@stripped, 2007-06-11 22:15:20+02:00,
mats@stripped +117 -9
    Result file change.

  mysql-test/r/rpl_row_inexist_tbl.result@stripped, 2007-06-11 22:15:21+02:00,
mats@stripped +4 -4
    Result file change.

  mysql-test/r/rpl_row_log.result@stripped, 2007-06-11 22:15:21+02:00,
mats@stripped +39 -3
    Result file change.

  mysql-test/r/rpl_row_log_innodb.result@stripped, 2007-06-11 22:15:21+02:00,
mats@stripped +39 -3
    Result file change.

  mysql-test/r/rpl_row_max_relay_size.result@stripped, 2007-06-11 22:15:21+02:00,
mats@stripped +6 -6
    Result file change.

  mysql-test/r/rpl_row_reset_slave.result@stripped, 2007-06-11 22:15:21+02:00,
mats@stripped +156 -12
    Result file change.

  mysql-test/r/rpl_row_tabledefs_2myisam.result@stripped, 2007-06-11 22:15:21+02:00,
mats@stripped +5 -5
    Result file change.

  mysql-test/r/rpl_row_tabledefs_3innodb.result@stripped, 2007-06-11 22:15:22+02:00,
mats@stripped +5 -5
    Result file change.

  mysql-test/r/rpl_row_until.result@stripped, 2007-06-11 22:15:22+02:00,
mats@stripped +35 -19
    Result file change.

  mysql-test/r/rpl_server_id1.result@stripped, 2007-06-11 22:15:22+02:00,
mats@stripped +38 -2
    Result file change.

  mysql-test/r/rpl_server_id2.result@stripped, 2007-06-11 22:15:23+02:00,
mats@stripped +38 -2
    Result file change.

  mysql-test/r/rpl_slave_skip.result@stripped, 2007-06-11 22:15:23+02:00,
mats@stripped +8 -0
    Result file change.

  mysql-test/r/rpl_ssl.result@stripped, 2007-06-11 22:15:23+02:00,
mats@stripped +8 -0
    Result file change.

  mysql-test/r/rpl_ssl1.result@stripped, 2007-06-11 22:15:23+02:00,
mats@stripped +12 -0
    Result file change.

  mysql-test/r/rpl_stm_log.result@stripped, 2007-06-11 22:15:24+02:00,
mats@stripped +39 -3
    Result file change.

  mysql-test/r/rpl_stm_max_relay_size.result@stripped, 2007-06-11 22:15:24+02:00,
mats@stripped +6 -6
    Result file change.

  mysql-test/r/rpl_stm_reset_slave.result@stripped, 2007-06-11 22:15:24+02:00,
mats@stripped +156 -12
    Result file change.

  mysql-test/r/rpl_stm_until.result@stripped, 2007-06-11 22:15:24+02:00,
mats@stripped +15 -15
    Result file change.

  mysql-test/t/rpl_000015.test@stripped, 2007-06-11 22:15:24+02:00,
mats@stripped +4 -12
    Replacing SHOW SLAVE STATUS with include file.

  mysql-test/t/rpl_change_master.test@stripped, 2007-06-11 22:15:25+02:00,
mats@stripped +6 -6
    Column position change.
    Making result of SHOW SLAVE STATUS vertical.

  mysql-test/t/rpl_empty_master_crash.test@stripped, 2007-06-11 22:15:25+02:00,
mats@stripped +1 -2
    Replacing SHOW SLAVE STATUS with include file.

  mysql-test/t/rpl_log_pos.test@stripped, 2007-06-11 22:15:25+02:00,
mats@stripped +4 -12
    Replacing SHOW SLAVE STATUS with include file.

  mysql-test/t/rpl_ndb_basic.test@stripped, 2007-06-11 22:15:25+02:00,
mats@stripped +1 -1
    Column position change.

  mysql-test/t/rpl_ndb_idempotent.test@stripped, 2007-06-11 22:15:25+02:00,
mats@stripped +2 -2
    Column position change.

  mysql-test/t/rpl_ndb_sync.test@stripped, 2007-06-11 22:15:25+02:00,
mats@stripped +2 -2
    Column position change.
    Making result of SHOW SLAVE STATUS vertical.

  mysql-test/t/rpl_redirect.test@stripped, 2007-06-11 22:15:26+02:00,
mats@stripped +1 -3
    Replacing SHOW SLAVE STATUS with include file.

  mysql-test/t/rpl_replicate_do.test@stripped, 2007-06-11 22:15:26+02:00,
mats@stripped +2 -2
    Column position change.
    Making result of SHOW SLAVE STATUS vertical.

  mysql-test/t/rpl_rotate_logs.test@stripped, 2007-06-11 22:15:26+02:00,
mats@stripped +3 -9
    Replacing SHOW SLAVE STATUS with include file.

  mysql-test/t/rpl_row_inexist_tbl.test@stripped, 2007-06-11 22:15:26+02:00,
mats@stripped +2 -3
    Replacing SHOW SLAVE STATUS with include file.

  mysql-test/t/rpl_row_until.test@stripped, 2007-06-11 22:15:26+02:00,
mats@stripped +5 -12
    Replacing SHOW SLAVE STATUS with include file.

  mysql-test/t/rpl_server_id1.test@stripped, 2007-06-11 22:15:26+02:00,
mats@stripped +2 -2
    Column position change.
    Making result of SHOW SLAVE STATUS vertical.

  mysql-test/t/rpl_server_id2.test@stripped, 2007-06-11 22:15:27+02:00,
mats@stripped +2 -2
    Column position change.
    Making result of SHOW SLAVE STATUS vertical.

  mysql-test/t/rpl_slave_status.test@stripped, 2007-06-11 22:15:27+02:00,
mats@stripped +1 -1
    Column position change.

  mysql-test/t/rpl_ssl.test@stripped, 2007-06-11 22:15:27+02:00,
mats@stripped +2 -2
    Column position change.

  mysql-test/t/rpl_ssl1.test@stripped, 2007-06-11 22:15:27+02:00,
mats@stripped +3 -3
    Column position change.

  mysql-test/t/rpl_stm_until.test@stripped, 2007-06-11 22:15:27+02:00,
mats@stripped +5 -12
    Replacing SHOW SLAVE STATUS with include file.

  sql/log_event.cc@stripped, 2007-06-11 22:15:28+02:00, mats@stripped +41
-24
    Using member function last_error() instead of member variable.
    Replacing use of 'table' with 'm_table'.
    Suppressing warnings in debug printout.
    Setting thd->net.last_error on error return from unpack_row() to get
    a non-zero error message.  The error codes for are being harmonized
    in another worklog.
    Replacing use of slave_print_msg() with RELAY_LOG_INFO::report().

  sql/rpl_mi.h@stripped, 2007-06-11 22:15:28+02:00, mats@stripped +1 -1
    Moving order of include files since they are dependent (!).

  sql/rpl_record.cc@stripped, 2007-06-11 22:15:28+02:00, mats@stripped +6 -5
    Adding missing include file.
    Replacing use of slave_print_msg() with RELAY_LOG_INFO::report().

  sql/rpl_record_old.cc@stripped, 2007-06-11 22:15:28+02:00, mats@stripped
+6 -5
    Adding missing include file.
    Replacing use of slave_print_msg() with RELAY_LOG_INFO::report().

  sql/rpl_reporting.cc@stripped, 2007-06-11 22:15:28+02:00, mats@stripped +5
-4
    Adding const modifier to member function.
    Using renamed member variable m_last_error.

  sql/rpl_reporting.h@stripped, 2007-06-11 22:15:29+02:00, mats@stripped +11
-4
    Adding missing constant MAX_SLAVE_ERRMSG.
    Adding const modifier to Slave_reporting_capability::report().
    Hiding and renaming member variable last_error and incorporating
    member function for access in order to make it mutable.

  sql/rpl_rli.h@stripped, 2007-06-11 22:15:29+02:00, mats@stripped +0 -2
    Moving constant MAX_SLAVE_ERRMSG.

  sql/rpl_utility.cc@stripped, 2007-06-11 22:15:29+02:00, mats@stripped +1
-0
    Adding missing include file rpl_rli.h.

  sql/slave.cc@stripped, 2007-06-11 22:15:29+02:00, mats@stripped +17 -17
    Replacing use of member variable last_error with call to member function
    last_error().
    Replacing use of slave_print_msg() with RELAY_LOG_INFO::report().

# 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.282/sql/log_event.cc	2007-06-11 22:15:50 +02:00
+++ 1.283/sql/log_event.cc	2007-06-11 22:15:50 +02:00
@@ -5279,10 +5279,10 @@
       don't want to overwrite it with the filename.
       What we want instead is add the filename to the current error message.
     */
-    char *tmp= my_strdup(rli->last_error.message, MYF(MY_WME));
+    char *tmp= my_strdup(rli->last_error().message, MYF(MY_WME));
     if (tmp)
     {
-      rli->report(ERROR_LEVEL, rli->last_error.number,
+      rli->report(ERROR_LEVEL, rli->last_error().number,
                   "%s. Failed executing load from '%s'", tmp, fname);
       my_free(tmp,MYF(0));
     }
@@ -5757,7 +5757,7 @@
 
   size_t const data_size= event_len - (ptr_rows_data - (const uchar *) buf);
   DBUG_PRINT("info",("m_table_id: %lu  m_flags: %d  m_width: %lu  data_size: %lu",
-                     m_table_id, m_flags, m_width, data_size));
+                     m_table_id, m_flags, m_width, (ulong) data_size));
 
   m_rows_buf= (uchar*) my_malloc(data_size, MYF(MY_WME));
   if (likely((bool)m_rows_buf))
@@ -6131,7 +6131,7 @@
                 get_type_str(), table->s->db.str,
                 table->s->table_name.str);
 
-     /*
+    /*
       If one day we honour --skip-slave-errors in row-based replication, and
       the error should be skipped, then we would clear mappings, rollback,
       close tables, but the slave SQL thread would not stop and then may
@@ -6266,8 +6266,8 @@
       rli->report(ERROR_LEVEL, error,
                   "Error in %s event: commit of row events failed, "
                   "table `%s`.`%s`",
-                  get_type_str(), table->s->db.str,
-                  table->s->table_name.str);
+                  get_type_str(), m_table->s->db.str,
+                  m_table->s->table_name.str);
   }
   else
   {
@@ -6485,8 +6485,8 @@
   m_colcnt= net_field_length(&ptr_after_colcnt);
 
   DBUG_PRINT("info",("m_dblen: %lu  off: %ld  m_tbllen: %lu  off: %ld  m_colcnt: %lu 
off: %ld",
-                     m_dblen, (long) (ptr_dblen-(const uchar*)vpart), 
-                     m_tbllen, (long) (ptr_tbllen-(const uchar*)vpart),
+                     (ulong) m_dblen, (long) (ptr_dblen-(const uchar*)vpart), 
+                     (ulong) m_tbllen, (long) (ptr_tbllen-(const uchar*)vpart),
                      m_colcnt, (long) (ptr_colcnt-(const uchar*)vpart)));
 
   /* Allocate mem for all fields in one go. If fails, catched in is_valid() */
@@ -6874,11 +6874,14 @@
   DBUG_ASSERT(table != NULL);
   DBUG_ASSERT(row_start && row_end);
 
-  int error;
-  error= unpack_row(rli, table, m_width, row_start, &m_cols, row_end,
-                    &m_master_reclength, table->write_set, WRITE_ROWS_EVENT);
+  if (int error= unpack_row(rli, table, m_width, row_start, &m_cols, row_end,
+                            &m_master_reclength, table->write_set,
WRITE_ROWS_EVENT))
+  {
+    thd->net.last_errno= error;
+    return error;
+  }
   bitmap_copy(table->read_set, table->write_set);
-  return error;
+  return 0;
 }
 
 /*
@@ -7586,7 +7589,6 @@
                                           uchar const *const row_start,
                                           uchar const **const row_end)
 {
-  int error;
   DBUG_ASSERT(row_start && row_end);
   /*
     This assertion actually checks that there is at least as many
@@ -7594,8 +7596,13 @@
   */
   DBUG_ASSERT(table->s->fields >= m_width);
 
-  error= unpack_row(rli, table, m_width, row_start, &m_cols, row_end,
-                    &m_master_reclength, table->read_set, DELETE_ROWS_EVENT);
+  if (int error= unpack_row(rli, table, m_width, row_start, &m_cols, row_end,
+                            &m_master_reclength, table->read_set,
DELETE_ROWS_EVENT))
+  {
+    thd->net.last_errno= error;
+    return error;
+  }
+
   /*
     If we will access rows using the random access method, m_key will
     be set to NULL, so we do not need to make a key copy in that case.
@@ -7607,7 +7614,7 @@
     key_copy(m_key, table->record[0], key_info, 0);
   }
 
-  return error;
+  return 0;
 }
 
 int Delete_rows_log_event::do_exec_row(TABLE *table)
@@ -7776,13 +7783,23 @@
   */
 
   /* record[0] is the before image for the update */
-  error= unpack_row(rli, table, m_width, row_start, &m_cols, row_end,
-                    &m_master_reclength, table->read_set, UPDATE_ROWS_EVENT);
+  if ((error= unpack_row(rli, table, m_width, row_start, &m_cols, row_end,
+                         &m_master_reclength, table->read_set,
UPDATE_ROWS_EVENT)))
+  {
+    thd->net.last_errno= error;
+    return error;
+  }
+
   store_record(table, record[1]);
   uchar const *next_start = *row_end;
   /* m_after_image is the after image for the update */
-  error= unpack_row(rli, table, m_width, next_start, &m_cols_ai, row_end,
-                    &m_master_reclength, table->write_set, UPDATE_ROWS_EVENT);
+  if ((error= unpack_row(rli, table, m_width, next_start, &m_cols_ai, row_end,
+                         &m_master_reclength, table->write_set,
UPDATE_ROWS_EVENT)))
+  {
+    thd->net.last_errno= error;
+    return error;
+  }
+
   bmove_align(m_after_image, table->record[0], table->s->reclength);
   restore_record(table, record[1]);
 
@@ -7937,10 +7954,10 @@
 Incident_log_event::do_apply_event(RELAY_LOG_INFO const *rli)
 {
   DBUG_ENTER("Incident_log_event::do_apply_event");
-  slave_print_msg(ERROR_LEVEL, rli, ER_SLAVE_INCIDENT,
-                  ER(ER_SLAVE_INCIDENT),
-                  description(),
-                  m_message.length > 0 ? m_message.str : "<none>");
+  rli->report(ERROR_LEVEL, ER_SLAVE_INCIDENT,
+              ER(ER_SLAVE_INCIDENT),
+              description(),
+              m_message.length > 0 ? m_message.str : "<none>");
   DBUG_RETURN(1);
 }
 #endif

--- 1.311/sql/slave.cc	2007-06-11 22:15:50 +02:00
+++ 1.312/sql/slave.cc	2007-06-11 22:15:50 +02:00
@@ -1253,8 +1253,8 @@
     rpl_filter->get_wild_ignore_table(&tmp);
     protocol->store(&tmp);
 
-    protocol->store(mi->rli.last_error.number);
-    protocol->store(mi->rli.last_error.message, &my_charset_bin);
+    protocol->store(mi->rli.last_error().number);
+    protocol->store(mi->rli.last_error().message, &my_charset_bin);
     protocol->store((uint32) mi->rli.slave_skip_counter);
     protocol->store((ulonglong) mi->rli.group_master_log_pos);
     protocol->store((ulonglong) mi->rli.log_space_total);
@@ -1316,13 +1316,13 @@
     protocol->store(mi->ssl_verify_server_cert? "Yes":"No", &my_charset_bin);
 
     // Last_IO_Errno
-    protocol->store(mi->last_error.number);
+    protocol->store(mi->last_error().number);
     // Last_IO_Error
-    protocol->store(mi->last_error.message, &my_charset_bin);
+    protocol->store(mi->last_error().message, &my_charset_bin);
     // Last_SQL_Errno
-    protocol->store(mi->rli.last_error.number);
+    protocol->store(mi->rli.last_error().number);
     // Last_SQL_Error
-    protocol->store(mi->rli.last_error.message, &my_charset_bin);
+    protocol->store(mi->rli.last_error().message, &my_charset_bin);
 
     pthread_mutex_unlock(&mi->rli.data_lock);
     pthread_mutex_unlock(&mi->data_lock);
@@ -1780,13 +1780,13 @@
       */
       if (error)
       {
-        slave_print_msg(ERROR_LEVEL, rli, ER_UNKNOWN_ERROR,
-                        "It was not possible to update the positions"
-                        " of the relay log information: the slave may"
-                        " be in an inconsistent state."
-                        " Stopped in %s position %s",
-                        rli->group_relay_log_name,
-                        llstr(rli->group_relay_log_pos, buf));
+        rli->report(ERROR_LEVEL, ER_UNKNOWN_ERROR,
+                    "It was not possible to update the positions"
+                    " of the relay log information: the slave may"
+                    " be in an inconsistent state."
+                    " Stopped in %s position %s",
+                    rli->group_relay_log_name,
+                    llstr(rli->group_relay_log_pos, buf));
         DBUG_RETURN(1);
       }
     }
@@ -2377,7 +2377,7 @@
           codes and warnings and print this to the error log as to
           allow the user to locate the error
         */
-        uint32 const last_errno= rli->last_error.number;
+        uint32 const last_errno= rli->last_error().number;
 
         DBUG_PRINT("info", ("thd->net.last_errno=%d; rli->last_error.number=%d",
                             thd->net.last_errno, last_errno));
@@ -3732,9 +3732,9 @@
                       " so slave stops; check error log on slave"
                       " for more info", MYF(0), bug_id);
       // a verbose message for the error log
-      slave_print_msg(ERROR_LEVEL, rli, ER_UNKNOWN_ERROR,
-                      "According to the master's version ('%s'),"
-                      " it is probable that master suffers from this bug:"
+      rli->report(ERROR_LEVEL, ER_UNKNOWN_ERROR,
+                  "According to the master's version ('%s'),"
+                  " it is probable that master suffers from this bug:"
                       " http://bugs.mysql.com/bug.php?id=%u"
                       " and thus replicating the current binary log event"
                       " may make the slave's data become different from the"

--- 1.18/mysql-test/r/rpl_ssl1.result	2007-06-11 22:15:50 +02:00
+++ 1.19/mysql-test/r/rpl_ssl1.result	2007-06-11 22:15:50 +02:00
@@ -53,6 +53,10 @@
 Master_SSL_Key	MYSQL_TEST_DIR/std_data/client-key.pem
 Seconds_Behind_Master	#
 Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 stop slave;
 change master to master_user='root',master_password='', master_ssl=0;
 start slave;
@@ -93,6 +97,10 @@
 Master_SSL_Key	MYSQL_TEST_DIR/std_data/client-key.pem
 Seconds_Behind_Master	#
 Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 stop slave;
 change master to
 master_host="localhost",
@@ -143,4 +151,8 @@
 Master_SSL_Key	MYSQL_TEST_DIR/std_data/client-key.pem
 Seconds_Behind_Master	#
 Master_SSL_Verify_Server_Cert	Yes
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 drop table t1;

--- 1.31/mysql-test/r/rpl_stm_until.result	2007-06-11 22:15:50 +02:00
+++ 1.32/mysql-test/r/rpl_stm_until.result	2007-06-11 22:15:50 +02:00
@@ -23,19 +23,19 @@
 Slave_IO_State	#
 Master_Host	127.0.0.1
 Master_User	root
-Master_Port	MASTER_MYPORT
+Master_Port	MASTER_PORT
 Connect_Retry	1
 Master_Log_File	master-bin.000001
 Read_Master_Log_Pos	784
-Relay_Log_File	slave-relay-bin.000004
+Relay_Log_File	#
 Relay_Log_Pos	#
 Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	#
+Slave_IO_Running	Yes
 Slave_SQL_Running	No
 Replicate_Do_DB	
 Replicate_Ignore_DB	
 Replicate_Do_Table	
-Replicate_Ignore_Table	
+Replicate_Ignore_Table	#
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	0
@@ -69,19 +69,19 @@
 Slave_IO_State	#
 Master_Host	127.0.0.1
 Master_User	root
-Master_Port	MASTER_MYPORT
+Master_Port	MASTER_PORT
 Connect_Retry	1
 Master_Log_File	master-bin.000001
 Read_Master_Log_Pos	784
-Relay_Log_File	slave-relay-bin.000004
+Relay_Log_File	#
 Relay_Log_Pos	#
 Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	#
+Slave_IO_Running	Yes
 Slave_SQL_Running	No
 Replicate_Do_DB	
 Replicate_Ignore_DB	
 Replicate_Do_Table	
-Replicate_Ignore_Table	
+Replicate_Ignore_Table	#
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	0
@@ -113,19 +113,19 @@
 Slave_IO_State	#
 Master_Host	127.0.0.1
 Master_User	root
-Master_Port	MASTER_MYPORT
+Master_Port	MASTER_PORT
 Connect_Retry	1
 Master_Log_File	master-bin.000001
 Read_Master_Log_Pos	784
-Relay_Log_File	slave-relay-bin.000004
+Relay_Log_File	#
 Relay_Log_Pos	#
 Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	#
+Slave_IO_Running	Yes
 Slave_SQL_Running	No
 Replicate_Do_DB	
 Replicate_Ignore_DB	
 Replicate_Do_Table	
-Replicate_Ignore_Table	
+Replicate_Ignore_Table	#
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	0
@@ -155,11 +155,11 @@
 Slave_IO_State	#
 Master_Host	127.0.0.1
 Master_User	root
-Master_Port	MASTER_MYPORT
+Master_Port	MASTER_PORT
 Connect_Retry	1
 Master_Log_File	master-bin.000001
 Read_Master_Log_Pos	784
-Relay_Log_File	slave-relay-bin.000004
+Relay_Log_File	#
 Relay_Log_Pos	#
 Relay_Master_Log_File	master-bin.000001
 Slave_IO_Running	Yes
@@ -167,7 +167,7 @@
 Replicate_Do_DB	
 Replicate_Ignore_DB	
 Replicate_Do_Table	
-Replicate_Ignore_Table	
+Replicate_Ignore_Table	#
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	0

--- 1.28/mysql-test/t/rpl_ssl1.test	2007-06-11 22:15:50 +02:00
+++ 1.29/mysql-test/t/rpl_ssl1.test	2007-06-11 22:15:50 +02:00
@@ -45,7 +45,7 @@
 
 #checking show slave status
 --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # 34 # 35 #
+--replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # 35 # 36 #
 query_vertical show slave status;
 
 #checking if replication works without ssl also performing clean up
@@ -59,7 +59,7 @@
 connection slave;
 sync_with_master;
 --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # 34 # 35 #
+--replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # 35 # 36 #
 query_vertical show slave status;
 
 # End of 4.1 tests
@@ -89,7 +89,7 @@
 
 #checking show slave status
 --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 #
+--replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # 35 # 36 #
 query_vertical show slave status;
 
 connection master;

--- 1.26/mysql-test/t/rpl_stm_until.test	2007-06-11 22:15:50 +02:00
+++ 1.27/mysql-test/t/rpl_stm_until.test	2007-06-11 22:15:50 +02:00
@@ -30,9 +30,7 @@
 wait_for_slave_to_stop;
 # here table should be still not deleted
 select * from t1;
---replace_result $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 9 # 11 # 23 # 33 # 34 # 35 #
---query_vertical SHOW SLAVE STATUS
+source include/show_slave_status.inc;
 
 # this should fail right after start
 start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
@@ -40,18 +38,14 @@
 select * from t1;
 sleep 2;
 wait_for_slave_to_stop;
---replace_result $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 9 # 11 # 23 # 33 # 34 # 35 #
---query_vertical SHOW SLAVE STATUS
+source include/show_slave_status.inc;
 
 # try replicate all up to and not including the second insert to t2;
 start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746;
 sleep 2;
 wait_for_slave_to_stop;
 select * from t2;
---replace_result $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 9 # 11 # 23 # 33 # 34 # 35 #
---query_vertical SHOW SLAVE STATUS
+source include/show_slave_status.inc;
 
 # clean up
 start slave;
@@ -66,9 +60,8 @@
 sleep 2;
 wait_for_slave_to_stop;
 # here the sql slave thread should be stopped
---replace_result $MASTER_MYPORT MASTER_MYPORT bin.000005 bin.000004 bin.000006 bin.000004
bin.000007 bin.000004
---replace_column 1 # 9 # 23 # 33 # 34 # 35 #
---query_vertical SHOW SLAVE STATUS
+--replace_result bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004
+source include/show_slave_status.inc;
 
 #testing various error conditions
 --error 1277

--- 1.5/mysql-test/r/rpl_known_bugs_detection.result	2007-06-11 22:15:50 +02:00
+++ 1.6/mysql-test/r/rpl_known_bugs_detection.result	2007-06-11 22:15:50 +02:00
@@ -46,6 +46,10 @@
 Master_SSL_Key	
 Seconds_Behind_Master	#
 Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	0
+Last_IO_Error	
+Last_SQL_Errno	1105
+Last_SQL_Error	Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so
slave stops; check error log on slave for more info' on query. Default database: 'test'.
Query: 'INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10'
 SELECT * FROM t1;
 a	b
 stop slave;
@@ -129,6 +133,14 @@
 Master_SSL_Key	
 Seconds_Behind_Master	#
 Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	0
+Last_IO_Error	
+Last_SQL_Errno	1105
+Last_SQL_Error	Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so
slave stops; check error log on slave for more info' on query. Default database: 'test'.
Query: 'INSERT INTO t1 (field_1, field_2, field_3)
+SELECT t2.field_a, t2.field_b, t2.field_c
+FROM t2
+ON DUPLICATE KEY UPDATE
+t1.field_3 = t2.field_c'
 SELECT * FROM t1;
 id	field_1	field_2	field_3
 drop table t1, t2;

--- 1.25/mysql-test/r/rpl_change_master.result	2007-06-11 22:15:50 +02:00
+++ 1.26/mysql-test/r/rpl_change_master.result	2007-06-11 22:15:50 +02:00
@@ -11,13 +11,85 @@
 insert into t1 values(1);
 insert into t1 values(2);
 stop slave;
-show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-#	127.0.0.1	root	MASTER_MYPORT	1	master-bin.000001	#	#	#	master-bin.000001	No	No							0		0	187	#	None		0	No						#	#	#	0	
+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	#
+Relay_Log_File	#
+Relay_Log_Pos	#
+Relay_Master_Log_File	master-bin.000001
+Slave_IO_Running	No
+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	0
+Last_Error	
+Skip_Counter	0
+Exec_Master_Log_Pos	191
+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	#
+Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 change master to master_user='root';
-show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-#	127.0.0.1	root	MASTER_MYPORT	1	master-bin.000001	#	#	#	master-bin.000001	No	No							0		0	187	#	None		0	No						#	#	#	0	
+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	#
+Relay_Log_File	#
+Relay_Log_Pos	#
+Relay_Master_Log_File	master-bin.000001
+Slave_IO_Running	No
+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	0
+Last_Error	
+Skip_Counter	0
+Exec_Master_Log_Pos	191
+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	#
+Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 start slave;
 select * from t1;
 n

--- 1.31/mysql-test/r/rpl_stm_max_relay_size.result	2007-06-11 22:15:50 +02:00
+++ 1.32/mysql-test/r/rpl_stm_max_relay_size.result	2007-06-11 22:15:50 +02:00
@@ -21,7 +21,7 @@
 @@global.max_relay_log_size
 4096
 start slave;
-show slave status;
+SHOW SLAVE STATUS;
 Slave_IO_State	#
 Master_Host	127.0.0.1
 Master_User	root
@@ -69,7 +69,7 @@
 select @@global.max_relay_log_size;
 @@global.max_relay_log_size	20480
 start slave;
-show slave status;
+SHOW SLAVE STATUS;
 Slave_IO_State	#
 Master_Host	127.0.0.1
 Master_User	root
@@ -117,7 +117,7 @@
 select @@global.max_relay_log_size;
 @@global.max_relay_log_size	0
 start slave;
-show slave status;
+SHOW SLAVE STATUS;
 Slave_IO_State	#
 Master_Host	127.0.0.1
 Master_User	root
@@ -162,7 +162,7 @@
 stop slave;
 reset slave;
 flush logs;
-show slave status;
+SHOW SLAVE STATUS;
 Slave_IO_State	#
 Master_Host	127.0.0.1
 Master_User	root
@@ -208,7 +208,7 @@
 start slave;
 flush logs;
 create table t1 (a int);
-show slave status;
+SHOW SLAVE STATUS;
 Slave_IO_State	#
 Master_Host	127.0.0.1
 Master_User	root
@@ -252,7 +252,7 @@
 #
 flush logs;
 drop table t1;
-show slave status;
+SHOW SLAVE STATUS;
 Slave_IO_State	#
 Master_Host	127.0.0.1
 Master_User	root

--- 1.19/mysql-test/r/rpl_stm_reset_slave.result	2007-06-11 22:15:50 +02:00
+++ 1.20/mysql-test/r/rpl_stm_reset_slave.result	2007-06-11 22:15:50 +02:00
@@ -4,22 +4,166 @@
 reset slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
-show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	102	#	#	master-bin.000001	Yes	Yes				#			0		0	102	#	None		0	No						#	0		0	
+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	106
+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	106
+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	#
+Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 stop slave;
 change master to master_user='test';
-show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-#	127.0.0.1	test	MASTER_PORT	1	master-bin.000001	102	#	#	master-bin.000001	No	No				#			0		0	102	#	None		0	No						#	0		0	
+SHOW SLAVE STATUS;
+Slave_IO_State	#
+Master_Host	127.0.0.1
+Master_User	test
+Master_Port	MASTER_PORT
+Connect_Retry	1
+Master_Log_File	master-bin.000001
+Read_Master_Log_Pos	106
+Relay_Log_File	#
+Relay_Log_Pos	#
+Relay_Master_Log_File	master-bin.000001
+Slave_IO_Running	No
+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	0
+Last_Error	
+Skip_Counter	0
+Exec_Master_Log_Pos	106
+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	#
+Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 reset slave;
-show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-#	127.0.0.1	root	MASTER_PORT	1		4	#	#		No	No				#			0		0	0	#	None		0	No						#	0		0	
+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	
+Read_Master_Log_Pos	4
+Relay_Log_File	#
+Relay_Log_Pos	#
+Relay_Master_Log_File	
+Slave_IO_Running	No
+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	0
+Last_Error	
+Skip_Counter	0
+Exec_Master_Log_Pos	0
+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	#
+Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 start slave;
-show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	102	#	#	master-bin.000001	Yes	Yes				#			0		0	102	#	None		0	No						#	0		0	
+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	106
+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	106
+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	#
+Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 stop slave;
 reset slave;
 start slave;

--- 1.16/mysql-test/r/rpl_server_id1.result	2007-06-11 22:15:50 +02:00
+++ 1.17/mysql-test/r/rpl_server_id1.result	2007-06-11 22:15:50 +02:00
@@ -9,8 +9,44 @@
 stop slave;
 change master to master_port=SLAVE_PORT;
 show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-	127.0.0.1	root	SLAVE_PORT	1		4	slave-relay-bin.000001	4		No	No				#		#	0		0	0	102	None		0	No						NULL	#	#	0	
+Slave_IO_State	
+Master_Host	127.0.0.1
+Master_User	root
+Master_Port	SLAVE_PORT
+Connect_Retry	1
+Master_Log_File	
+Read_Master_Log_Pos	4
+Relay_Log_File	slave-relay-bin.000001
+Relay_Log_Pos	4
+Relay_Master_Log_File	
+Slave_IO_Running	No
+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	0
+Last_Error	
+Skip_Counter	0
+Exec_Master_Log_Pos	0
+Relay_Log_Space	106
+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	NULL
+Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 start slave;
 insert into t1 values (1);
 show status like "slave_running";

--- 1.17/mysql-test/r/rpl_server_id2.result	2007-06-11 22:15:50 +02:00
+++ 1.18/mysql-test/r/rpl_server_id2.result	2007-06-11 22:15:50 +02:00
@@ -9,8 +9,44 @@
 stop slave;
 change master to master_port=SLAVE_PORT;
 show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-	127.0.0.1	root	SLAVE_PORT	1		4	slave-relay-bin.000001	4		No	No						#	0		0	0	102	None		0	No						NULL	#	#	0	
+Slave_IO_State	
+Master_Host	127.0.0.1
+Master_User	root
+Master_Port	SLAVE_PORT
+Connect_Retry	1
+Master_Log_File	
+Read_Master_Log_Pos	4
+Relay_Log_File	slave-relay-bin.000001
+Relay_Log_Pos	4
+Relay_Master_Log_File	
+Slave_IO_Running	No
+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	0
+Last_Error	
+Skip_Counter	0
+Exec_Master_Log_Pos	0
+Relay_Log_Space	106
+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	NULL
+Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 start slave;
 insert into t1 values (1);
 select * from t1;

--- 1.18/mysql-test/t/rpl_change_master.test	2007-06-11 22:15:50 +02:00
+++ 1.19/mysql-test/t/rpl_change_master.test	2007-06-11 22:15:50 +02:00
@@ -18,13 +18,13 @@
 connection slave;
 --real_sleep 3 # wait for I/O thread to have read updates
 stop slave;
---replace_result $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 7 # 8 # 9 # 23 # 33 # 34 # 35 #
-show slave status;
+--replace_result $MASTER_MYPORT MASTER_PORT
+--replace_column 1 # 7 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
+query_vertical SHOW SLAVE STATUS;
 change master to master_user='root';
---replace_result $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 7 # 8 # 9 # 23 # 33 # 34 # 35 #
-show slave status;
+--replace_result $MASTER_MYPORT MASTER_PORT
+--replace_column 1 # 7 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
+query_vertical SHOW SLAVE STATUS;
 start slave;
 sync_with_master;
 select * from t1;

--- 1.23/mysql-test/extra/rpl_tests/rpl_max_relay_size.test	2007-06-11 22:15:50 +02:00
+++ 1.24/mysql-test/extra/rpl_tests/rpl_max_relay_size.test	2007-06-11 22:15:50 +02:00
@@ -43,10 +43,7 @@
 select @@global.max_relay_log_size;
 start slave;
 sync_with_master;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 16 # 23 # 33 # 34 # 35 #
---vertical_results
-show slave status;
+source include/show_slave_status.inc;
 
 --echo #
 --echo # Test 2
@@ -55,13 +52,10 @@
 stop slave;
 reset slave;
 set global max_relay_log_size=(5*4096);
-select @@global.max_relay_log_size;
+query_vertical select @@global.max_relay_log_size;
 start slave;
 sync_with_master;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 16 # 23 # 33 # 34 # 35 #
---vertical_results
-show slave status;
+source include/show_slave_status.inc;
 
 --echo #
 --echo # Test 3: max_relay_log_size = 0
@@ -70,13 +64,10 @@
 stop slave;
 reset slave;
 set global max_relay_log_size=0;
-select @@global.max_relay_log_size;
+query_vertical select @@global.max_relay_log_size;
 start slave;
 sync_with_master;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 16 # 23 # 33 # 34 # 35 #
---vertical_results
-show slave status;
+source include/show_slave_status.inc;
 
 --echo #
 --echo # Test 4: Tests below are mainly to ensure that we have not coded with wrong
assumptions
@@ -87,10 +78,7 @@
 # test of relay log rotation when the slave is stopped
 # (to make sure it does not crash).
 flush logs;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 16 # 23 # 33 # 34 # 35 #
---vertical_results
-show slave status;
+source include/show_slave_status.inc;
 
 --echo #
 --echo # Test 5
@@ -108,10 +96,7 @@
 save_master_pos;
 connection slave;
 sync_with_master;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 16 # 23 # 33 # 34 # 35 #
---vertical_results
-show slave status;
+source include/show_slave_status.inc;
 
 --echo #
 --echo # Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
@@ -123,16 +108,13 @@
 save_master_pos;
 connection slave;
 sync_with_master;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 16 # 23 # 33 # 34 # 35 #
---vertical_results
-show slave status;
+source include/show_slave_status.inc;
 
 connection master;
 # test that the absence of relay logs does not make a master crash
 flush logs;
 -- replace_column 3 <Binlog_Ignore_DB>
-show master status;
+query_vertical show master status;
 
 # Restore max_binlog_size
 connection slave;

--- 1.12/mysql-test/extra/rpl_tests/rpl_reset_slave.test	2007-06-11 22:15:50 +02:00
+++ 1.13/mysql-test/extra/rpl_tests/rpl_reset_slave.test	2007-06-11 22:15:50 +02:00
@@ -13,26 +13,18 @@
 save_master_pos;
 connection slave;
 sync_with_master;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 16 # 23 # 33 #
-show slave status;
+source include/show_slave_status.inc;
 
 stop slave;
 change master to master_user='test';
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 16 # 23 # 33 #
-show slave status;
+source include/show_slave_status.inc;
 
 reset slave;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 16 # 23 # 33 #
-show slave status;
+source include/show_slave_status.inc;
 
 start slave;
 sync_with_master;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 16 # 23 # 33 #
-show slave status;
+source include/show_slave_status.inc;
 
 # test of crash with temp tables & RESET SLAVE
 # (test to see if RESET SLAVE clears temp tables in memory and disk)

--- 1.9/mysql-test/t/rpl_server_id1.test	2007-06-11 22:15:50 +02:00
+++ 1.10/mysql-test/t/rpl_server_id1.test	2007-06-11 22:15:50 +02:00
@@ -13,8 +13,8 @@
 --replace_result $SLAVE_MYPORT SLAVE_PORT
 eval change master to master_port=$SLAVE_MYPORT;
 --replace_result $SLAVE_MYPORT SLAVE_PORT
---replace_column 16 # 18 # 34 # 35 #
-show slave status;
+--replace_column 16 # 18 # 35 # 36 #
+query_vertical show slave status;
 start slave;
 insert into t1 values (1);
 # can't MASTER_POS_WAIT(), it does not work in this weird setup

--- 1.10/mysql-test/t/rpl_server_id2.test	2007-06-11 22:15:50 +02:00
+++ 1.11/mysql-test/t/rpl_server_id2.test	2007-06-11 22:15:50 +02:00
@@ -10,8 +10,8 @@
 --replace_result $SLAVE_MYPORT SLAVE_PORT
 eval change master to master_port=$SLAVE_MYPORT;
 --replace_result $SLAVE_MYPORT SLAVE_PORT
---replace_column 18 # 34 # 35 #
-show slave status;
+--replace_column 18 # 35 # 36 #
+query_vertical show slave status;
 start slave;
 insert into t1 values (1);
 save_master_pos;

--- 1.4/mysql-test/r/rpl_extraCol_innodb.result	2007-06-11 22:15:50 +02:00
+++ 1.5/mysql-test/r/rpl_extraCol_innodb.result	2007-06-11 22:15:50 +02:00
@@ -90,7 +90,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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;
@@ -152,7 +152,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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;
@@ -214,7 +214,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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;
@@ -275,7 +275,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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  ***
@@ -387,7 +387,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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;
@@ -448,7 +448,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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;
@@ -773,7 +773,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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;

--- 1.4/mysql-test/r/rpl_extraCol_myisam.result	2007-06-11 22:15:50 +02:00
+++ 1.5/mysql-test/r/rpl_extraCol_myisam.result	2007-06-11 22:15:50 +02:00
@@ -90,7 +90,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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;
@@ -152,7 +152,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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;
@@ -214,7 +214,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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;
@@ -275,7 +275,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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  ***
@@ -387,7 +387,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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;
@@ -448,7 +448,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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;
@@ -773,7 +773,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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;

--- 1.5/mysql-test/r/rpl_ndb_extraCol.result	2007-06-11 22:15:50 +02:00
+++ 1.6/mysql-test/r/rpl_ndb_extraCol.result	2007-06-11 22:15:50 +02:00
@@ -90,7 +90,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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;
@@ -152,7 +152,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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;
@@ -214,7 +214,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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;
@@ -275,7 +275,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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  ***
@@ -387,7 +387,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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;
@@ -448,7 +448,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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;
@@ -774,7 +774,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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;

--- 1.26/mysql-test/r/rpl_ndb_log.result	2007-06-11 22:15:50 +02:00
+++ 1.27/mysql-test/r/rpl_ndb_log.result	2007-06-11 22:15:50 +02:00
@@ -126,9 +126,45 @@
 slave-bin.000002	#	Write_rows	2	#	table_id: #
 slave-bin.000002	#	Write_rows	1	#	table_id: # flags: STMT_END_F
 slave-bin.000002	#	Query	2	#	COMMIT
-show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000002	593	#	#	master-bin.000002	Yes	Yes				#			0		0	593	#	None		0	No						#	0		0	
+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.000002
+Read_Master_Log_Pos	617
+Relay_Log_File	#
+Relay_Log_Pos	#
+Relay_Master_Log_File	master-bin.000002
+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	617
+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	#
+Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 show binlog events in 'slave-bin.000005' from 4;
 ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
 DROP TABLE t1;

--- 1.18/mysql-test/r/rpl_row_log_innodb.result	2007-06-11 22:15:50 +02:00
+++ 1.19/mysql-test/r/rpl_row_log_innodb.result	2007-06-11 22:15:50 +02:00
@@ -99,9 +99,45 @@
 slave-bin.000002	#	Table_map	1	#	table_id: # (test.t2)
 slave-bin.000002	#	Write_rows	1	#	table_id: # flags: STMT_END_F
 slave-bin.000002	#	Xid	1	#	COMMIT /* XID */
-show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000002	400	#	#	master-bin.000002	Yes	Yes				#			0		0	400	#	None		0	No						#	0		0	
+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.000002
+Read_Master_Log_Pos	404
+Relay_Log_File	#
+Relay_Log_Pos	#
+Relay_Master_Log_File	master-bin.000002
+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	404
+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	#
+Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 show binlog events in 'slave-bin.000005' from 4;
 ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
 DROP TABLE t1;

--- 1.5/sql/rpl_mi.h	2007-06-11 22:15:50 +02:00
+++ 1.6/sql/rpl_mi.h	2007-06-11 22:15:50 +02:00
@@ -18,8 +18,8 @@
 
 #ifdef HAVE_REPLICATION
 
-#include "rpl_reporting.h"
 #include "rpl_rli.h"
+#include "rpl_reporting.h"
 
 
 /*****************************************************************************

--- 1.8/mysql-test/r/rpl_row_inexist_tbl.result	2007-06-11 22:15:50 +02:00
+++ 1.9/mysql-test/r/rpl_row_inexist_tbl.result	2007-06-11 22:15:50 +02:00
@@ -17,14 +17,14 @@
 0
 drop table t1;
 insert into t1 values (1);
-show slave status;
+SHOW SLAVE STATUS;
 Slave_IO_State	#
 Master_Host	127.0.0.1
 Master_User	root
-Master_Port	MASTER_MYPORT
+Master_Port	MASTER_PORT
 Connect_Retry	1
 Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
+Read_Master_Log_Pos	597
 Relay_Log_File	#
 Relay_Log_Pos	#
 Relay_Master_Log_File	master-bin.000001
@@ -33,7 +33,7 @@
 Replicate_Do_DB	
 Replicate_Ignore_DB	
 Replicate_Do_Table	
-Replicate_Ignore_Table	test.t2
+Replicate_Ignore_Table	#
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	1146

--- 1.18/mysql-test/r/rpl_row_log.result	2007-06-11 22:15:50 +02:00
+++ 1.19/mysql-test/r/rpl_row_log.result	2007-06-11 22:15:50 +02:00
@@ -91,9 +91,45 @@
 slave-bin.000002	#	Query	1	#	use `test`; create table t2 (n int)ENGINE=MyISAM
 slave-bin.000002	#	Table_map	1	#	table_id: # (test.t2)
 slave-bin.000002	#	Write_rows	1	#	table_id: # flags: STMT_END_F
-show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000002	373	#	#	master-bin.000002	Yes	Yes				#			0		0	373	#	None		0	No						#	0		0	
+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.000002
+Read_Master_Log_Pos	377
+Relay_Log_File	#
+Relay_Log_Pos	#
+Relay_Master_Log_File	master-bin.000002
+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	377
+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	#
+Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 show binlog events in 'slave-bin.000005' from 4;
 ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
 DROP TABLE t1;

--- 1.10/mysql-test/r/rpl_row_max_relay_size.result	2007-06-11 22:15:50 +02:00
+++ 1.11/mysql-test/r/rpl_row_max_relay_size.result	2007-06-11 22:15:50 +02:00
@@ -23,7 +23,7 @@
 @@global.max_relay_log_size
 4096
 start slave;
-show slave status;
+SHOW SLAVE STATUS;
 Slave_IO_State	#
 Master_Host	127.0.0.1
 Master_User	root
@@ -71,7 +71,7 @@
 select @@global.max_relay_log_size;
 @@global.max_relay_log_size	20480
 start slave;
-show slave status;
+SHOW SLAVE STATUS;
 Slave_IO_State	#
 Master_Host	127.0.0.1
 Master_User	root
@@ -119,7 +119,7 @@
 select @@global.max_relay_log_size;
 @@global.max_relay_log_size	0
 start slave;
-show slave status;
+SHOW SLAVE STATUS;
 Slave_IO_State	#
 Master_Host	127.0.0.1
 Master_User	root
@@ -164,7 +164,7 @@
 stop slave;
 reset slave;
 flush logs;
-show slave status;
+SHOW SLAVE STATUS;
 Slave_IO_State	#
 Master_Host	127.0.0.1
 Master_User	root
@@ -210,7 +210,7 @@
 start slave;
 flush logs;
 create table t1 (a int);
-show slave status;
+SHOW SLAVE STATUS;
 Slave_IO_State	#
 Master_Host	127.0.0.1
 Master_User	root
@@ -254,7 +254,7 @@
 #
 flush logs;
 drop table t1;
-show slave status;
+SHOW SLAVE STATUS;
 Slave_IO_State	#
 Master_Host	127.0.0.1
 Master_User	root

--- 1.6/mysql-test/r/rpl_row_reset_slave.result	2007-06-11 22:15:50 +02:00
+++ 1.7/mysql-test/r/rpl_row_reset_slave.result	2007-06-11 22:15:50 +02:00
@@ -4,22 +4,166 @@
 reset slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
-show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	102	#	#	master-bin.000001	Yes	Yes				#			0		0	102	#	None		0	No						#	0		0	
+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	106
+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	106
+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	#
+Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 stop slave;
 change master to master_user='test';
-show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-#	127.0.0.1	test	MASTER_PORT	1	master-bin.000001	102	#	#	master-bin.000001	No	No				#			0		0	102	#	None		0	No						#	0		0	
+SHOW SLAVE STATUS;
+Slave_IO_State	#
+Master_Host	127.0.0.1
+Master_User	test
+Master_Port	MASTER_PORT
+Connect_Retry	1
+Master_Log_File	master-bin.000001
+Read_Master_Log_Pos	106
+Relay_Log_File	#
+Relay_Log_Pos	#
+Relay_Master_Log_File	master-bin.000001
+Slave_IO_Running	No
+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	0
+Last_Error	
+Skip_Counter	0
+Exec_Master_Log_Pos	106
+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	#
+Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 reset slave;
-show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-#	127.0.0.1	root	MASTER_PORT	1		4	#	#		No	No				#			0		0	0	#	None		0	No						#	0		0	
+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	
+Read_Master_Log_Pos	4
+Relay_Log_File	#
+Relay_Log_Pos	#
+Relay_Master_Log_File	
+Slave_IO_Running	No
+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	0
+Last_Error	
+Skip_Counter	0
+Exec_Master_Log_Pos	0
+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	#
+Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 start slave;
-show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	102	#	#	master-bin.000001	Yes	Yes				#			0		0	102	#	None		0	No						#	0		0	
+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	106
+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	106
+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	#
+Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 stop slave;
 reset slave;
 start slave;

--- 1.12/mysql-test/r/rpl_row_tabledefs_2myisam.result	2007-06-11 22:15:50 +02:00
+++ 1.13/mysql-test/r/rpl_row_tabledefs_2myisam.result	2007-06-11 22:15:50 +02:00
@@ -122,7 +122,7 @@
 Replicate_Ignore_Table	
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
-Last_Errno	1105
+Last_Errno	1364
 Last_Error	Error in Write_rows event: error during transaction execution on table
test.t1_nodef
 Skip_Counter	0
 Exec_Master_Log_Pos	#
@@ -183,7 +183,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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;
@@ -226,7 +226,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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;
@@ -269,7 +269,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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;
@@ -312,7 +312,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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;

--- 1.7/mysql-test/r/rpl_row_until.result	2007-06-11 22:15:50 +02:00
+++ 1.8/mysql-test/r/rpl_row_until.result	2007-06-11 22:15:50 +02:00
@@ -19,23 +19,23 @@
 2
 3
 4
-SHOW SLAVE STATUS;;
+SHOW SLAVE STATUS;
 Slave_IO_State	#
 Master_Host	127.0.0.1
 Master_User	root
-Master_Port	MASTER_MYPORT
+Master_Port	MASTER_PORT
 Connect_Retry	1
 Master_Log_File	master-bin.000001
 Read_Master_Log_Pos	744
-Relay_Log_File	slave-relay-bin.000004
+Relay_Log_File	#
 Relay_Log_Pos	#
 Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	#
+Slave_IO_Running	Yes
 Slave_SQL_Running	No
 Replicate_Do_DB	
 Replicate_Ignore_DB	
 Replicate_Do_Table	
-Replicate_Ignore_Table	
+Replicate_Ignore_Table	#
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	0
@@ -54,6 +54,10 @@
 Master_SSL_Key	
 Seconds_Behind_Master	#
 Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
 select * from t1;
 n
@@ -61,23 +65,23 @@
 2
 3
 4
-SHOW SLAVE STATUS;;
+SHOW SLAVE STATUS;
 Slave_IO_State	#
 Master_Host	127.0.0.1
 Master_User	root
-Master_Port	MASTER_MYPORT
+Master_Port	MASTER_PORT
 Connect_Retry	1
 Master_Log_File	master-bin.000001
 Read_Master_Log_Pos	744
-Relay_Log_File	slave-relay-bin.000004
+Relay_Log_File	#
 Relay_Log_Pos	#
 Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	#
+Slave_IO_Running	Yes
 Slave_SQL_Running	No
 Replicate_Do_DB	
 Replicate_Ignore_DB	
 Replicate_Do_Table	
-Replicate_Ignore_Table	
+Replicate_Ignore_Table	#
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	0
@@ -96,28 +100,32 @@
 Master_SSL_Key	
 Seconds_Behind_Master	#
 Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728;
 select * from t2;
 n
 1
 2
-SHOW SLAVE STATUS;;
+SHOW SLAVE STATUS;
 Slave_IO_State	#
 Master_Host	127.0.0.1
 Master_User	root
-Master_Port	MASTER_MYPORT
+Master_Port	MASTER_PORT
 Connect_Retry	1
 Master_Log_File	master-bin.000001
 Read_Master_Log_Pos	744
-Relay_Log_File	slave-relay-bin.000004
+Relay_Log_File	#
 Relay_Log_Pos	#
 Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	#
+Slave_IO_Running	Yes
 Slave_SQL_Running	No
 Replicate_Do_DB	
 Replicate_Ignore_DB	
 Replicate_Do_Table	
-Replicate_Ignore_Table	
+Replicate_Ignore_Table	#
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	0
@@ -136,18 +144,22 @@
 Master_SSL_Key	
 Seconds_Behind_Master	#
 Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 start slave;
 stop slave;
 start slave until master_log_file='master-bin.000001', master_log_pos=740;
-SHOW SLAVE STATUS;;
+SHOW SLAVE STATUS;
 Slave_IO_State	#
 Master_Host	127.0.0.1
 Master_User	root
-Master_Port	MASTER_MYPORT
+Master_Port	MASTER_PORT
 Connect_Retry	1
 Master_Log_File	master-bin.000001
 Read_Master_Log_Pos	744
-Relay_Log_File	slave-relay-bin.000004
+Relay_Log_File	#
 Relay_Log_Pos	#
 Relay_Master_Log_File	master-bin.000001
 Slave_IO_Running	Yes
@@ -155,7 +167,7 @@
 Replicate_Do_DB	
 Replicate_Ignore_DB	
 Replicate_Do_Table	
-Replicate_Ignore_Table	
+Replicate_Ignore_Table	#
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	0
@@ -174,6 +186,10 @@
 Master_SSL_Key	
 Seconds_Behind_Master	#
 Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 start slave until master_log_file='master-bin', master_log_pos=561;
 ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
 start slave until master_log_file='master-bin.000001', master_log_pos=561,
relay_log_pos=12;

--- 1.3/mysql-test/t/rpl_row_inexist_tbl.test	2007-06-11 22:15:50 +02:00
+++ 1.4/mysql-test/t/rpl_row_inexist_tbl.test	2007-06-11 22:15:50 +02:00
@@ -25,9 +25,8 @@
 # slave should have stopped because can't find table t1
 wait_for_slave_to_stop;
 # see if we have a good error message:
---replace_result $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 7 # 8 # 9 # 23 # 33 # 34 # 35 #
---query_vertical show slave status
+--replace_column 7 #
+source include/show_slave_status.inc;
 
 # cleanup
 connection master;

--- 1.4/mysql-test/t/rpl_row_until.test	2007-06-11 22:15:50 +02:00
+++ 1.5/mysql-test/t/rpl_row_until.test	2007-06-11 22:15:50 +02:00
@@ -31,9 +31,7 @@
 wait_for_slave_to_stop;
 # here table should be still not deleted
 select * from t1;
---replace_result $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 9 # 11 # 23 # 33 # 34 # 35 #
---query_vertical SHOW SLAVE STATUS;
+source include/show_slave_status.inc;
 
 # this should fail right after start
 start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
@@ -41,18 +39,14 @@
 select * from t1;
 sleep 2;
 wait_for_slave_to_stop;
---replace_result $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 9 # 11 # 23 # 33 # 34 # 35 #
---query_vertical SHOW SLAVE STATUS;
+source include/show_slave_status.inc;
 
 # try replicate all up to and not including the second insert to t2;
 start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728;
 sleep 2;
 wait_for_slave_to_stop;
 select * from t2;
---replace_result $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 9 # 11 # 23 # 33 # 34 # 35 #
---query_vertical SHOW SLAVE STATUS;
+source include/show_slave_status.inc;
 
 # clean up
 start slave;
@@ -67,9 +61,8 @@
 sleep 2;
 wait_for_slave_to_stop;
 # here the sql slave thread should be stopped
---replace_result $MASTER_MYPORT MASTER_MYPORT bin.000005 bin.000004 bin.000006 bin.000004
bin.000007 bin.000004
---replace_column 1 # 9 # 23 # 33 # 34 # 35 #
---query_vertical SHOW SLAVE STATUS;
+--replace_result bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004
+source include/show_slave_status.inc;
 
 #testing various error conditions
 --error 1277

--- 1.15/sql/rpl_rli.h	2007-06-11 22:15:50 +02:00
+++ 1.16/sql/rpl_rli.h	2007-06-11 22:15:50 +02:00
@@ -16,8 +16,6 @@
 #ifndef RPL_RLI_H
 #define RPL_RLI_H
 
-#define MAX_SLAVE_ERRMSG      1024
-
 #include "rpl_tblmap.h"
 #include "rpl_reporting.h"
 

--- 1.1/mysql-test/include/show_slave_status.inc	2007-06-11 22:15:50 +02:00
+++ 1.2/mysql-test/include/show_slave_status.inc	2007-06-11 22:15:50 +02:00
@@ -2,5 +2,5 @@
 # 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 #
+--replace_column 1 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
 query_vertical SHOW SLAVE STATUS;

--- 1.1/mysql-test/r/rpl_loaddata_fatal.result	2007-06-11 22:15:50 +02:00
+++ 1.2/mysql-test/r/rpl_loaddata_fatal.result	2007-06-11 22:15:50 +02:00
@@ -13,7 +13,7 @@
 Master_Port	MASTER_PORT
 Connect_Retry	1
 Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	286
+Read_Master_Log_Pos	290
 Relay_Log_File	#
 Relay_Log_Pos	#
 Relay_Master_Log_File	master-bin.000001
@@ -28,7 +28,7 @@
 Last_Errno	0
 Last_Error	
 Skip_Counter	0
-Exec_Master_Log_Pos	286
+Exec_Master_Log_Pos	290
 Relay_Log_Space	#
 Until_Condition	None
 Until_Log_File	
@@ -40,6 +40,7 @@
 Master_SSL_Cipher	
 Master_SSL_Key	
 Seconds_Behind_Master	#
+Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	0
@@ -52,7 +53,7 @@
 Master_Port	MASTER_PORT
 Connect_Retry	1
 Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	461
+Read_Master_Log_Pos	465
 Relay_Log_File	#
 Relay_Log_Pos	#
 Relay_Master_Log_File	master-bin.000001
@@ -64,10 +65,10 @@
 Replicate_Ignore_Table	#
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
-Last_Errno	1581
+Last_Errno	1589
 Last_Error	Fatal error: Not enough memory
 Skip_Counter	0
-Exec_Master_Log_Pos	321
+Exec_Master_Log_Pos	325
 Relay_Log_Space	#
 Until_Condition	None
 Until_Log_File	
@@ -79,7 +80,8 @@
 Master_SSL_Cipher	
 Master_SSL_Key	
 Seconds_Behind_Master	#
+Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	#
 Last_IO_Error	#
-Last_SQL_Errno	1581
+Last_SQL_Errno	1589
 Last_SQL_Error	Fatal error: Not enough memory

--- 1.1/sql/rpl_reporting.cc	2007-06-11 22:15:50 +02:00
+++ 1.2/sql/rpl_reporting.cc	2007-06-11 22:15:50 +02:00
@@ -3,7 +3,8 @@
 #include "rpl_reporting.h"
 
 void
-Slave_reporting_capability::report(loglevel level, int err_code, const char *msg, ...)
+Slave_reporting_capability::report(loglevel level, int err_code,
+                                   const char *msg, ...) const
 {
   void (*report_function)(const char *, ...);
   char buff[MAX_SLAVE_ERRMSG];
@@ -19,9 +20,9 @@
       It's an error, it must be reported in Last_error and Last_errno in SHOW
       SLAVE STATUS.
     */
-    pbuff= last_error.message;
-    pbuffsize= sizeof(last_error.message);
-    last_error.number = err_code;
+    pbuff= m_last_error.message;
+    pbuffsize= sizeof(m_last_error.message);
+    m_last_error.number = err_code;
     report_function= sql_print_error;
     break;
   case WARNING_LEVEL:

--- 1.1/sql/rpl_reporting.h	2007-06-11 22:15:50 +02:00
+++ 1.2/sql/rpl_reporting.h	2007-06-11 22:15:50 +02:00
@@ -2,6 +2,11 @@
 #define RPL_REPORTING_H
 
 /**
+   Maximum size of an error message from a slave thread.
+ */
+#define MAX_SLAVE_ERRMSG      1024
+
+/**
    Mix-in to handle the message logging and reporting for relay log
    info and master log info structures.
 
@@ -31,7 +36,7 @@
                         code, but can contain more information), in
                         printf() format.
   */
-  void report(loglevel level, int err_code, const char *msg, ...)
+  void report(loglevel level, int err_code, const char *msg, ...) const
     ATTRIBUTE_FORMAT(printf, 4, 5);
 
   /**
@@ -39,7 +44,7 @@
      STATUS</code>.
    */
   void clear_error() {
-    last_error.clear();
+    m_last_error.clear();
   }
 
   /**
@@ -65,12 +70,14 @@
     char message[MAX_SLAVE_ERRMSG];
   };
 
+  Error const& last_error() const { return m_last_error; }
+
+private:
   /**
      Last error produced by the I/O or SQL thread respectively.
    */
-  Error last_error;
+  mutable Error m_last_error;
 
-private:
   char const *const m_thread_name;
 };
 

--- 1.8/mysql-test/r/rpl_rbr_to_sbr.result	2007-06-11 22:15:50 +02:00
+++ 1.9/mysql-test/r/rpl_rbr_to_sbr.result	2007-06-11 22:15:50 +02:00
@@ -55,9 +55,9 @@
 Master_SSL_Cipher	
 Master_SSL_Key	
 Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
+Master_SSL_Verify_Server_Cert	#
 Last_IO_Errno	#
-Last_IO_Error	#
+Last_IO_Error	
 Last_SQL_Errno	0
 Last_SQL_Error	
 SHOW BINLOG EVENTS;

--- 1.9/mysql-test/r/rpl_row_tabledefs_3innodb.result	2007-06-11 22:15:50 +02:00
+++ 1.10/mysql-test/r/rpl_row_tabledefs_3innodb.result	2007-06-11 22:15:50 +02:00
@@ -122,7 +122,7 @@
 Replicate_Ignore_Table	
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
-Last_Errno	1105
+Last_Errno	1364
 Last_Error	Error in Write_rows event: error during transaction execution on table
test.t1_nodef
 Skip_Counter	0
 Exec_Master_Log_Pos	#
@@ -183,7 +183,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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;
@@ -226,7 +226,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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;
@@ -269,7 +269,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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;
@@ -312,7 +312,7 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	0
 Last_IO_Error	
-Last_SQL_Errno	1522
+Last_SQL_Errno	1523
 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;

--- 1.7/sql/rpl_utility.cc	2007-06-11 22:15:50 +02:00
+++ 1.8/sql/rpl_utility.cc	2007-06-11 22:15:50 +02:00
@@ -14,6 +14,7 @@
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
 
 #include "rpl_utility.h"
+#include "rpl_rli.h"
 
 uint32
 field_length_from_packed(enum_field_types const field_type, 

--- 1.6/mysql-test/r/rpl_incident.result	2007-06-11 22:15:50 +02:00
+++ 1.7/mysql-test/r/rpl_incident.result	2007-06-11 22:15:50 +02:00
@@ -60,6 +60,10 @@
 Master_SSL_Key	
 Seconds_Behind_Master	#
 Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	0
+Last_IO_Error	
+Last_SQL_Errno	1586
+Last_SQL_Error	The incident LOST_EVENTS occured on the master. Message: <none>
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
 START SLAVE;
 SELECT * FROM t1;
@@ -103,4 +107,8 @@
 Master_SSL_Key	
 Seconds_Behind_Master	#
 Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	0
+Last_IO_Error	
+Last_SQL_Errno	0
+Last_SQL_Error	
 DROP TABLE t1;

--- 1.3/sql/rpl_record.cc	2007-06-11 22:15:50 +02:00
+++ 1.4/sql/rpl_record.cc	2007-06-11 22:15:50 +02:00
@@ -14,6 +14,7 @@
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
 #include "mysql_priv.h"
+#include "rpl_rli.h"
 #include "rpl_record.h"
 #include "slave.h"                  // Need to pull in slave_print_msg
 
@@ -263,11 +264,11 @@
     if (event_type == WRITE_ROWS_EVENT &&
         ((*field_ptr)->flags & mask) == mask)
     {
-      slave_print_msg(ERROR_LEVEL, rli, ER_NO_DEFAULT_FOR_FIELD,
-                      "Field `%s` of table `%s`.`%s` "
-                      "has no default value and cannot be NULL",
-                      (*field_ptr)->field_name, table->s->db.str,
-                      table->s->table_name.str);
+      rli->report(ERROR_LEVEL, ER_NO_DEFAULT_FOR_FIELD,
+                  "Field `%s` of table `%s`.`%s` "
+                  "has no default value and cannot be NULL",
+                  (*field_ptr)->field_name, table->s->db.str,
+                  table->s->table_name.str);
       error = ER_NO_DEFAULT_FOR_FIELD;
     }
     else

--- 1.3/sql/rpl_record_old.cc	2007-06-11 22:15:50 +02:00
+++ 1.4/sql/rpl_record_old.cc	2007-06-11 22:15:50 +02:00
@@ -1,5 +1,6 @@
 
 #include "mysql_priv.h"
+#include "rpl_rli.h"
 #include "rpl_record_old.h"
 
 size_t
@@ -157,11 +158,11 @@
     if (event_type == WRITE_ROWS_EVENT &&
         ((*field_ptr)->flags & mask) == mask)
     {
-      slave_print_msg(ERROR_LEVEL, rli, ER_NO_DEFAULT_FOR_FIELD,
-                      "Field `%s` of table `%s`.`%s` "
-                      "has no default value and cannot be NULL",
-                      (*field_ptr)->field_name, table->s->db.str,
-                      table->s->table_name.str);
+      rli->report(ERROR_LEVEL, ER_NO_DEFAULT_FOR_FIELD,
+                  "Field `%s` of table `%s`.`%s` "
+                  "has no default value and cannot be NULL",
+                  (*field_ptr)->field_name, table->s->db.str,
+                  table->s->table_name.str);
       error = ER_NO_DEFAULT_FOR_FIELD;
     }
     else

--- 1.1/mysql-test/r/rpl_slave_skip.result	2007-06-11 22:15:50 +02:00
+++ 1.2/mysql-test/r/rpl_slave_skip.result	2007-06-11 22:15:50 +02:00
@@ -72,6 +72,10 @@
 Master_SSL_Key	
 Seconds_Behind_Master	#
 Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	0
+Last_IO_Error	
+Last_SQL_Errno	0
+Last_SQL_Error	
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
 START SLAVE;
 SELECT * FROM t1;
@@ -132,5 +136,9 @@
 Master_SSL_Key	
 Seconds_Behind_Master	#
 Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	0
+Last_IO_Error	
+Last_SQL_Errno	0
+Last_SQL_Error	
 **** On Master ****
 DROP TABLE t1, t2;

--- 1.31/mysql-test/r/rpl_flushlog_loop.result	2007-06-11 22:15:50 +02:00
+++ 1.32/mysql-test/r/rpl_flushlog_loop.result	2007-06-11 22:15:50 +02:00
@@ -51,8 +51,8 @@
 Master_SSL_Cipher	
 Master_SSL_Key	
 Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
+Master_SSL_Verify_Server_Cert	#
 Last_IO_Errno	#
-Last_IO_Error	#
+Last_IO_Error	
 Last_SQL_Errno	0
 Last_SQL_Error	

--- 1.45/mysql-test/r/rpl_loaddata.result	2007-06-11 22:15:50 +02:00
+++ 1.46/mysql-test/r/rpl_loaddata.result	2007-06-11 22:15:50 +02:00
@@ -38,8 +38,8 @@
 set global sql_slave_skip_counter=1;
 start slave;
 show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	1793	#	#	master-bin.000001	Yes	Yes				#			0		0	1793	#	None		0	No						#	0		0	
+Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert	Last_IO_Errno	Last_IO_Error	Last_SQL_Errno	Last_SQL_Error
+#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	1797	#	#	master-bin.000001	Yes	Yes				#			0		0	1797	#	None		0	No						#	No	0		0	
 set sql_log_bin=0;
 delete from t1;
 set sql_log_bin=1;
@@ -48,8 +48,8 @@
 change master to master_user='test';
 change master to master_user='root';
 show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	1828	#	#	master-bin.000001	No	No				#			0		0	1828	#	None		0	No						#	0		0	
+Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert	Last_IO_Errno	Last_IO_Error	Last_SQL_Errno	Last_SQL_Error
+#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	1832	#	#	master-bin.000001	No	No				#			0		0	1832	#	None		0	No						#	No	0		0	
 set global sql_slave_skip_counter=1;
 start slave;
 set sql_log_bin=0;
@@ -59,8 +59,8 @@
 stop slave;
 reset slave;
 show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-#	127.0.0.1	root	MASTER_PORT	1		4	#	#		No	No				#			0		0	0	#	None		0	No						#	0		0	
+Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert	Last_IO_Errno	Last_IO_Error	Last_SQL_Errno	Last_SQL_Error
+#	127.0.0.1	root	MASTER_PORT	1		4	#	#		No	No				#			0		0	0	#	None		0	No						#	No	0		0	
 reset master;
 create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60),
 unique(day)) engine=MyISAM;

--- 1.8/mysql-test/r/rpl_ssl.result	2007-06-11 22:15:50 +02:00
+++ 1.9/mysql-test/r/rpl_ssl.result	2007-06-11 22:15:50 +02:00
@@ -54,6 +54,10 @@
 Master_SSL_Key	MYSQL_TEST_DIR/std_data/client-key.pem
 Seconds_Behind_Master	#
 Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 STOP SLAVE;
 select * from t1;
 t
@@ -94,5 +98,9 @@
 Master_SSL_Key	MYSQL_TEST_DIR/std_data/client-key.pem
 Seconds_Behind_Master	#
 Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 drop user replssl@localhost;
 drop table t1;

--- 1.6/mysql-test/t/rpl_ssl.test	2007-06-11 22:15:50 +02:00
+++ 1.7/mysql-test/t/rpl_ssl.test	2007-06-11 22:15:50 +02:00
@@ -31,7 +31,7 @@
 # The slave is synced and waiting/reading from master
 # SHOW SLAVE STATUS will show "Waiting for master to send event"
 --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 #
+--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
 query_vertical show slave status;
 
 # Stop the slave, as reported in bug#21871 it would hang
@@ -59,7 +59,7 @@
 insert into t1 values (NULL);
 sync_slave_with_master;
 --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 #
+--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
 query_vertical show slave status;
 
 connection master;

--- 1.16/mysql-test/r/rpl_empty_master_crash.result	2007-06-11 22:15:50 +02:00
+++ 1.17/mysql-test/r/rpl_empty_master_crash.result	2007-06-11 22:15:50 +02:00
@@ -4,8 +4,7 @@
 reset slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
-show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
+SHOW SLAVE STATUS;
 load table t1 from master;
 ERROR 08S01: Error connecting to master: Master is not configured
 load table t1 from master;

--- 1.14/mysql-test/t/rpl_empty_master_crash.test	2007-06-11 22:15:50 +02:00
+++ 1.15/mysql-test/t/rpl_empty_master_crash.test	2007-06-11 22:15:50 +02:00
@@ -1,7 +1,6 @@
 source include/master-slave.inc;
 
---replace_column 1 # 8 # 9 # 16 # 23 # 33 # 34 # 35 #
-show slave status;
+source include/show_slave_status.inc;
 
 #
 # Load table should not succeed on the master as this is not a slave

--- 1.11/mysql-test/t/rpl_slave_status.test	2007-06-11 22:15:50 +02:00
+++ 1.12/mysql-test/t/rpl_slave_status.test	2007-06-11 22:15:50 +02:00
@@ -42,7 +42,7 @@
 --replace_result $MASTER_MYPORT MASTER_MYPORT
 # Column 1 is replaced, since the output can be either
 # "Connecting to master" or "Waiting for master update"
---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 34 # 35 #
+--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 35 # 36 #
 --vertical_results
 show slave status;
 

--- 1.40/mysql-test/r/rpl_replicate_do.result	2007-06-11 22:15:50 +02:00
+++ 1.41/mysql-test/r/rpl_replicate_do.result	2007-06-11 22:15:50 +02:00
@@ -26,9 +26,45 @@
 select * from t11;
 ERROR 42S02: Table 'test.t11' doesn't exist
 drop table if exists t1,t2,t11;
-show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	#	#	#	master-bin.000001	Yes	Yes			test.t1	#			0		0	#	#	None		0	No						#	#	#	0	
+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	#
+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	test.t1
+Replicate_Ignore_Table	
+Replicate_Wild_Do_Table	
+Replicate_Wild_Ignore_Table	
+Last_Errno	0
+Last_Error	
+Skip_Counter	0
+Exec_Master_Log_Pos	#
+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	#
+Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 create table t1 (ts timestamp);
 set one_shot time_zone='met';
 insert into t1 values('2005-08-12 00:00:00');

--- 1.50/mysql-test/r/rpl_log_pos.result	2007-06-11 22:15:50 +02:00
+++ 1.51/mysql-test/r/rpl_log_pos.result	2007-06-11 22:15:50 +02:00
@@ -7,27 +7,171 @@
 show master status;
 File	Position	Binlog_Do_DB	Binlog_Ignore_DB
 master-bin.000001	106	<Binlog_Ignore_DB>	
-show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	102	#	#	master-bin.000001	Yes	Yes							0		0	102	#	None		0	No						#	#	#	0	
+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	106
+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	106
+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	#
+Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 stop slave;
 change master to master_log_pos=75;
 start slave;
 stop slave;
 change master to master_log_pos=75;
-show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	74	#	#	master-bin.000001	No	No							0		0	74	#	None		0	No						#	#	#	0	
+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	75
+Relay_Log_File	#
+Relay_Log_Pos	#
+Relay_Master_Log_File	master-bin.000001
+Slave_IO_Running	No
+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	0
+Last_Error	
+Skip_Counter	0
+Exec_Master_Log_Pos	75
+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	#
+Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 start slave;
-show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	74	#	#	master-bin.000001	No	Yes							0		0	74	#	None		0	No						#	#	#	0	
+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	75
+Relay_Log_File	#
+Relay_Log_Pos	#
+Relay_Master_Log_File	master-bin.000001
+Slave_IO_Running	No
+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	75
+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	#
+Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 stop slave;
 change master to master_log_pos=178;
 start slave;
-show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	177	#	#	master-bin.000001	No	Yes							0		0	177	#	None		0	No						#	#	#	0	
+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	178
+Relay_Log_File	#
+Relay_Log_Pos	#
+Relay_Master_Log_File	master-bin.000001
+Slave_IO_Running	No
+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	178
+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	#
+Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 show master status;
 File	Position	Binlog_Do_DB	Binlog_Ignore_DB
 master-bin.000001	106	<Binlog_Ignore_DB>	

--- 1.46/mysql-test/r/rpl_000015.result	2007-06-11 22:15:50 +02:00
+++ 1.47/mysql-test/r/rpl_000015.result	2007-06-11 22:15:50 +02:00
@@ -3,21 +3,128 @@
 File	Position	Binlog_Do_DB	Binlog_Ignore_DB
 master-bin.000001	106		
 reset slave;
-show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
+SHOW SLAVE STATUS;
 change master to master_host='127.0.0.1';
-show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-#	127.0.0.1	test	DEFAULT_MASTER_PORT	7		4	#	#		No	No							0		0	0	#	None		0	No						#	#	#	0	
+SHOW SLAVE STATUS;
+Slave_IO_State	#
+Master_Host	127.0.0.1
+Master_User	test
+Master_Port	3306
+Connect_Retry	7
+Master_Log_File	
+Read_Master_Log_Pos	4
+Relay_Log_File	#
+Relay_Log_Pos	#
+Relay_Master_Log_File	
+Slave_IO_Running	No
+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	0
+Last_Error	
+Skip_Counter	0
+Exec_Master_Log_Pos	0
+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	#
+Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 change master to master_host='127.0.0.1',master_user='root',
 master_password='',master_port=MASTER_PORT;
-show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-#	127.0.0.1	root	MASTER_PORT	7		4	#	#		No	No							0		0	0	#	None		0	No						#	#	#	0	
+SHOW SLAVE STATUS;
+Slave_IO_State	#
+Master_Host	127.0.0.1
+Master_User	root
+Master_Port	MASTER_PORT
+Connect_Retry	7
+Master_Log_File	
+Read_Master_Log_Pos	4
+Relay_Log_File	#
+Relay_Log_Pos	#
+Relay_Master_Log_File	
+Slave_IO_Running	No
+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	0
+Last_Error	
+Skip_Counter	0
+Exec_Master_Log_Pos	0
+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	#
+Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 start slave;
-show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-#	127.0.0.1	root	MASTER_PORT	7	master-bin.000001	102	#	#	master-bin.000001	Yes	Yes							0		0	102	#	None		0	No						#	#	#	0	
+SHOW SLAVE STATUS;
+Slave_IO_State	#
+Master_Host	127.0.0.1
+Master_User	root
+Master_Port	MASTER_PORT
+Connect_Retry	7
+Master_Log_File	master-bin.000001
+Read_Master_Log_Pos	106
+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	106
+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	#
+Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 drop table if exists t1;
 create table t1 (n int, PRIMARY KEY(n));
 insert into t1 values (10),(45),(90);

--- 1.78/mysql-test/r/rpl_rotate_logs.result	2007-06-11 22:15:50 +02:00
+++ 1.79/mysql-test/r/rpl_rotate_logs.result	2007-06-11 22:15:50 +02:00
@@ -14,9 +14,45 @@
 insert into temp_table values ("testing temporary tables");
 create table t1 (s text);
 insert into t1 values('Could not break slave'),('Tried hard');
-show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-#	127.0.0.1	root	MASTER_PORT	60	master-bin.000001	552	#	#	master-bin.000001	Yes	Yes				#			0		0	552	#	None		0	No						#	#	#	0	
+SHOW SLAVE STATUS;
+Slave_IO_State	#
+Master_Host	127.0.0.1
+Master_User	root
+Master_Port	MASTER_PORT
+Connect_Retry	60
+Master_Log_File	master-bin.000001
+Read_Master_Log_Pos	556
+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	556
+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	#
+Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 select * from t1;
 s
 Could not break slave
@@ -55,9 +91,45 @@
 Log_name	File_size
 master-bin.000003	415
 insert into t2 values (65);
-show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-#	127.0.0.1	root	MASTER_PORT	60	master-bin.000003	500	#	#	master-bin.000003	Yes	Yes				#			0		0	500	#	None		0	No						#	#	#	0	
+SHOW SLAVE STATUS;
+Slave_IO_State	#
+Master_Host	127.0.0.1
+Master_User	root
+Master_Port	MASTER_PORT
+Connect_Retry	60
+Master_Log_File	master-bin.000003
+Read_Master_Log_Pos	504
+Relay_Log_File	#
+Relay_Log_Pos	#
+Relay_Master_Log_File	master-bin.000003
+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	504
+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	#
+Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 select * from t2;
 m
 34
@@ -83,9 +155,45 @@
 select * from t4;
 a
 testing temporary tables part 2
-show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-#	127.0.0.1	root	MASTER_PORT	60	master-bin.000005	2036	#	#	master-bin.000005	Yes	Yes				#			0		0	2036	#	None		0	No						#	#	#	0	
+SHOW SLAVE STATUS;
+Slave_IO_State	#
+Master_Host	127.0.0.1
+Master_User	root
+Master_Port	MASTER_PORT
+Connect_Retry	60
+Master_Log_File	master-bin.000005
+Read_Master_Log_Pos	2040
+Relay_Log_File	#
+Relay_Log_Pos	#
+Relay_Master_Log_File	master-bin.000005
+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	2040
+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	#
+Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 lock tables t3 read;
 select count(*) from t3 where n >= 4;
 count(*)

--- 1.80/mysql-test/r/rpl_stm_log.result	2007-06-11 22:15:50 +02:00
+++ 1.81/mysql-test/r/rpl_stm_log.result	2007-06-11 22:15:50 +02:00
@@ -89,9 +89,45 @@
 slave-bin.000002	#	Format_desc	2	#	Server ver: VERSION, Binlog ver: 4
 slave-bin.000002	#	Query	1	#	use `test`; create table t2 (n int)ENGINE=MyISAM
 slave-bin.000002	#	Query	1	#	use `test`; insert into t2 values (1)
-show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000002	388	#	#	master-bin.000002	Yes	Yes				#			0		0	388	#	None		0	No						#	0		0	
+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.000002
+Read_Master_Log_Pos	392
+Relay_Log_File	#
+Relay_Log_Pos	#
+Relay_Master_Log_File	master-bin.000002
+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	392
+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	#
+Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	#
+Last_IO_Error	#
+Last_SQL_Errno	0
+Last_SQL_Error	
 show binlog events in 'slave-bin.000005' from 4;
 ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
 DROP TABLE t1;

--- 1.18/mysql-test/r/rpl_redirect.result	2007-06-11 22:15:50 +02:00
+++ 1.19/mysql-test/r/rpl_redirect.result	2007-06-11 22:15:50 +02:00
@@ -5,7 +5,6 @@
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
 SHOW SLAVE STATUS;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
 SHOW SLAVE HOSTS;
 Server_id	Host	Port	Rpl_recovery_rank	Master_id
 2	127.0.0.1	SLAVE_PORT	2	1

--- 1.31/mysql-test/t/rpl_replicate_do.test	2007-06-11 22:15:50 +02:00
+++ 1.32/mysql-test/t/rpl_replicate_do.test	2007-06-11 22:15:50 +02:00
@@ -32,8 +32,8 @@
 sync_with_master;
 # show slave status, just to see of it prints replicate-do-table
 --replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 34 # 35 #
-show slave status;
+--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
+query_vertical SHOW SLAVE STATUS;
 
 #
 # BUG#12542

--- 1.40/mysql-test/t/rpl_log_pos.test	2007-06-11 22:15:50 +02:00
+++ 1.41/mysql-test/t/rpl_log_pos.test	2007-06-11 22:15:50 +02:00
@@ -14,9 +14,7 @@
 --replace_column 3 <Binlog_Ignore_DB>
 show master status;
 sync_slave_with_master;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 23 # 33 # 34 # 35 #
-show slave status;
+source include/show_slave_status.inc;
 stop slave;
 change master to master_log_pos=75;
 start slave;
@@ -24,21 +22,15 @@
 stop slave;
 
 change master to master_log_pos=75;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 23 # 33 # 34 # 35 #
-show slave status;
+source include/show_slave_status.inc;
 start slave;
 sleep 5;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 23 # 33 # 34 # 35 #
-show slave status;
+source include/show_slave_status.inc;
 stop slave;
 change master to master_log_pos=178;
 start slave;
 sleep 2;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 11 # 23 # 33 # 35 # 36 #
-show slave status;
+source include/show_slave_status.inc;
 connection master;
 --replace_column 3 <Binlog_Ignore_DB>
 show master status;

--- 1.42/mysql-test/t/rpl_000015.test	2007-06-11 22:15:50 +02:00
+++ 1.43/mysql-test/t/rpl_000015.test	2007-06-11 22:15:50 +02:00
@@ -12,26 +12,18 @@
 save_master_pos;
 connection slave;
 reset slave;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 23 # 33 # 34 # 35 #
-show slave status;
+source include/show_slave_status.inc;
 
 change master to master_host='127.0.0.1';
 # The following needs to be cleaned up when change master is fixed
---replace_result $DEFAULT_MASTER_PORT DEFAULT_MASTER_PORT
---replace_column 1 # 8 # 9 # 23 # 33 # 34 # 35 #
-show slave status;
+source include/show_slave_status.inc;
 --replace_result $MASTER_MYPORT MASTER_PORT
 eval change master to master_host='127.0.0.1',master_user='root',
  master_password='',master_port=$MASTER_MYPORT;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 23 # 33 # 34 # 35 #
-show slave status;
+source include/show_slave_status.inc;
 start slave;
 sync_with_master;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 23 # 33 # 34 # 35 #
-show slave status;
+source include/show_slave_status.inc;
 connection master;
 --disable_warnings
 drop table if exists t1;

--- 1.70/mysql-test/t/rpl_rotate_logs.test	2007-06-11 22:15:50 +02:00
+++ 1.71/mysql-test/t/rpl_rotate_logs.test	2007-06-11 22:15:50 +02:00
@@ -63,9 +63,7 @@
 create table t1 (s text);
 insert into t1 values('Could not break slave'),('Tried hard');
 sync_slave_with_master;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 16 # 23 # 33 # 34 # 35 #
-show slave status;
+source include/show_slave_status.inc;
 select * from t1;
 connection master;
 flush logs;
@@ -116,9 +114,7 @@
 show binary logs;
 insert into t2 values (65);
 sync_slave_with_master;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 16 # 23 # 33 # 34 # 35 #
-show slave status;
+source include/show_slave_status.inc;
 select * from t2;
 
 #
@@ -148,9 +144,7 @@
 sync_with_master;
 select * from t4;
 
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 16 # 23 # 33 # 34 # 35 #
-show slave status;
+source include/show_slave_status.inc;
 # because of concurrent insert, the table may not be up to date
 # if we do not lock
 lock tables t3 read;

--- 1.45/mysql-test/extra/rpl_tests/rpl_log.test	2007-06-11 22:15:50 +02:00
+++ 1.46/mysql-test/extra/rpl_tests/rpl_log.test	2007-06-11 22:15:50 +02:00
@@ -107,9 +107,7 @@
 --replace_column 2 # 5 #
 --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
 show binlog events in 'slave-bin.000002' from 4;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 16 # 23 # 33 #
-show slave status;
+source include/show_slave_status.inc;
 
 # Need to recode the following
 

--- 1.16/mysql-test/t/rpl_redirect.test	2007-06-11 22:15:50 +02:00
+++ 1.17/mysql-test/t/rpl_redirect.test	2007-06-11 22:15:50 +02:00
@@ -13,9 +13,7 @@
 
 #discover slaves
 connection master;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 16 # 23 # 33 # 34 # 35 #
-SHOW SLAVE STATUS;
+source include/show_slave_status.inc;
 --replace_result $SLAVE_MYPORT SLAVE_PORT
 SHOW SLAVE HOSTS;
 rpl_probe;

--- 1.12/mysql-test/r/rpl_ndb_basic.result	2007-06-11 22:15:50 +02:00
+++ 1.13/mysql-test/r/rpl_ndb_basic.result	2007-06-11 22:15:50 +02:00
@@ -177,8 +177,8 @@
 Master_SSL_Verify_Server_Cert	No
 Last_IO_Errno	<Last_IO_Errno>
 Last_IO_Error	<Last_IO_Error>
-Last_SQL_Errno	146
-Last_SQL_Error	Error in Write_rows event: error during transaction execution on table
test.t1
+Last_SQL_Errno	<Last_SQL_Errno>
+Last_SQL_Error	<Last_SQL_Error>
 set GLOBAL slave_transaction_retries=10;
 START SLAVE;
 select * from t1 order by nid;

--- 1.7/mysql-test/r/rpl_ndb_idempotent.result	2007-06-11 22:15:50 +02:00
+++ 1.8/mysql-test/r/rpl_ndb_idempotent.result	2007-06-11 22:15:50 +02:00
@@ -33,15 +33,41 @@
 row3	C	3
 row4	D	4
 SHOW SLAVE STATUS;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-<Slave_IO_State>	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	<Read_Master_Log_Pos>	<Relay_Log_File>	<Relay_Log_Pos>	master-bin.000001	Yes	Yes				<Replicate_Ignore_Table>			0		0	<Exec_Master_Log_Pos>	<Relay_Log_Space>	None		0	No						<Seconds_Behind_Master>	<Last_IO_Errno>	<Last_IO_Error>	0	
+Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert	Last_IO_Errno	Last_IO_Error	Last_SQL_Errno	Last_SQL_Error
+<Slave_IO_State>	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	<Read_Master_Log_Pos>	<Relay_Log_File>	<Relay_Log_Pos>	master-bin.000001	Yes	Yes				<Replicate_Ignore_Table>			0		0	<Exec_Master_Log_Pos>	<Relay_Log_Space>	None		0	No						<Seconds_Behind_Master>	No	<Last_IO_Errno>	<Last_IO_Error>	0	
 STOP SLAVE;
 CHANGE MASTER TO
 master_log_file = 'master-bin.000001',
 master_log_pos = <the_pos> ;
 SHOW SLAVE STATUS;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-<Slave_IO_State>	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	<Read_Master_Log_Pos>	<Relay_Log_File>	<Relay_Log_Pos>	master-bin.000001	No	No				<Replicate_Ignore_Table>			0		0	<Exec_Master_Log_Pos>	<Relay_Log_Space>	None		0	No						<Seconds_Behind_Master>	<Last_IO_Errno>	<Last_IO_Error>	0	
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	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	Last_SQL_Error
-<Slave_IO_State>	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	<Read_Master_Log_Pos>	<Relay_Log_File>	<Relay_Log_Pos>	master-bin.000001	Yes	Yes				<Replicate_Ignore_Table>			0		0	<Exec_Master_Log_Pos>	<Relay_Log_Space>	None		0	No						<Seconds_Behind_Master>	<Last_IO_Errno>	<Last_IO_Error>	0	
+Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert	Last_IO_Errno	Last_IO_Error	Last_SQL_Errno	Last_SQL_Error
+<Slave_IO_State>	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	<Read_Master_Log_Pos>	<Relay_Log_File>	<Relay_Log_Pos>	master-bin.000001	No	No				<Replicate_Ignore_Table>			0		0	<Exec_Master_Log_Pos>	<Relay_Log_Space>	None		0	No						<Seconds_Behind_Master>	No	<Last_IO_Errno>	<Last_IO_Error>	0	
+START SLAVE;
+SELECT * FROM t1 ORDER BY c3;
+c1	c2	c3
+row3	C	3
+row4	D	4
+SELECT * FROM t1 ORDER BY c3;
+c1	c2	c3
+row3	C	3
+row4	D	4
+STOP SLAVE;
+DROP TABLE t1;
+RESET master;
+DROP TABLE t1;
+RESET slave;
+START SLAVE;
+CREATE TABLE t1 (c1 CHAR(15) NOT NULL, c2 CHAR(15) NOT NULL, c3 INT NOT NULL, PRIMARY KEY
(c3)) ENGINE = NDB ;
+INSERT INTO t1 VALUES ("row1","remove on slave",1);
+DELETE FROM t1;
+BEGIN;
+UPDATE t1 SET c2="does not exist" WHERE c3=1;
+INSERT INTO t1 VALUES ("row2","new on slave",2);
+COMMIT;
+SELECT * FROM t1;
+c1	c2	c3
+row2	new on slave	2
+SHOW SLAVE STATUS;
+Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert	Last_IO_Errno	Last_IO_Error	Last_SQL_Errno	Last_SQL_Error
+<Slave_IO_State>	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	<Read_Master_Log_Pos>	<Relay_Log_File>	<Relay_Log_Pos>	master-bin.000001	Yes	Yes				<Replicate_Ignore_Table>			0		0	<Exec_Master_Log_Pos>	<Relay_Log_Space>	None		0	No						<Seconds_Behind_Master>	<Last_IO_Errno>	<Last_IO_Error>		0	
 DROP TABLE IF EXISTS t1;

--- 1.11/mysql-test/r/rpl_ndb_sync.result	2007-06-11 22:15:50 +02:00
+++ 1.12/mysql-test/r/rpl_ndb_sync.result	2007-06-11 22:15:50 +02:00
@@ -72,8 +72,44 @@
 master_log_pos = <the_pos> ;
 START SLAVE;
 SHOW SLAVE STATUS;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert
-<Slave_IO_State>	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	<Read_Master_Log_Pos>	<Relay_Log_File>	<Relay_Log_Pos>	master-bin.000001	Yes	Yes				<Replicate_Ignore_Table>			0		0	<Exec_Master_Log_Pos>	<Relay_Log_Space>	None		0	No						<Seconds_Behind_Master>	No
+Slave_IO_State	<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	<Read_Master_Log_Pos>
+Relay_Log_File	<Relay_Log_File>
+Relay_Log_Pos	<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_Ignore_Table>
+Replicate_Wild_Do_Table	
+Replicate_Wild_Ignore_Table	
+Last_Errno	0
+Last_Error	
+Skip_Counter	0
+Exec_Master_Log_Pos	<Exec_Master_Log_Pos>
+Relay_Log_Space	<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	<Seconds_Behind_Master>
+Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	<Last_IO_Errno>
+Last_IO_Error	<Last_IO_Error>
+Last_SQL_Errno	0
+Last_SQL_Error	
 SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3;
 hex(c1)	hex(c2)	c3
 1	1	row1

--- 1.12/mysql-test/t/rpl_ndb_basic.test	2007-06-11 22:15:50 +02:00
+++ 1.13/mysql-test/t/rpl_ndb_basic.test	2007-06-11 22:15:50 +02:00
@@ -197,7 +197,7 @@
 --connection slave
 --echo **** On Slave ****
 --replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8
<Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22
<Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master>
35 <Last_IO_Errno> 36 <Last_IO_Error>
+--replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8
<Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 19
<Last_Errno> 20 <Last_Error> 22 <Exec_Master_Log_Pos> 23
<Relay_Log_Space> 33 <Seconds_Behind_Master> 35 <Last_IO_Errno> 36
<Last_IO_Error> 37 <Last_SQL_Errno> 38 <Last_SQL_Error>
 --query_vertical SHOW SLAVE STATUS;
 
 # now set max retries high enough to succeed, and start slave again

--- 1.7/mysql-test/t/rpl_ndb_idempotent.test	2007-06-11 22:15:50 +02:00
+++ 1.8/mysql-test/t/rpl_ndb_idempotent.test	2007-06-11 22:15:50 +02:00
@@ -43,7 +43,7 @@
 SELECT * FROM t1 ORDER BY c3;
 
 --replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8
<Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22
<Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master>
34 <Last_IO_Errno> 35 <Last_IO_Error>
+--replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8
<Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22
<Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master>
35 <Last_IO_Errno> 36 <Last_IO_Error>
 SHOW SLAVE STATUS;
 
 # stop slave and reset position to before the last changes
@@ -54,7 +54,7 @@
   master_log_pos = $the_pos ;
 
 --replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8
<Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22
<Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master>
34 <Last_IO_Errno> 35 <Last_IO_Error>
+--replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8
<Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22
<Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master>
35 <Last_IO_Errno> 36 <Last_IO_Error>
 SHOW SLAVE STATUS;
 
 # start the slave again

--- 1.12/mysql-test/t/rpl_ndb_sync.test	2007-06-11 22:15:50 +02:00
+++ 1.13/mysql-test/t/rpl_ndb_sync.test	2007-06-11 22:15:50 +02:00
@@ -72,8 +72,8 @@
 --sync_slave_with_master
 --connection slave
 --replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8
<Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22
<Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master>
34 <Last_IO_Errno> 35 <Last_IO_Error>
-SHOW SLAVE STATUS;
+--replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8
<Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22
<Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master>
35 <Last_IO_Errno> 36 <Last_IO_Error>
+query_vertical SHOW SLAVE STATUS;
 
 SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3;
 SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1;

--- 1.1/mysql-test/r/rpl_ndb_circular.result	2007-06-11 22:15:50 +02:00
+++ 1.2/mysql-test/r/rpl_ndb_circular.result	2007-06-11 22:15:50 +02:00
@@ -52,6 +52,10 @@
 Master_SSL_Key	
 Seconds_Behind_Master	#
 Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	0
+Last_IO_Error	
+Last_SQL_Errno	0
+Last_SQL_Error	
 SELECT * FROM t1 ORDER BY a;
 a	b
 1	2
@@ -91,5 +95,9 @@
 Master_SSL_Key	
 Seconds_Behind_Master	#
 Master_SSL_Verify_Server_Cert	No
+Last_IO_Errno	0
+Last_IO_Error	
+Last_SQL_Errno	0
+Last_SQL_Error	
 STOP SLAVE;
 DROP TABLE t1;
Thread
bk commit into 5.1 tree (mats:1.2551) BUG#24954Mats Kindahl11 Jun