From: Date: March 1 2007 5:09pm Subject: bk commit into 5.1 tree (mats:1.2410) BUG#23171 List-Archive: http://lists.mysql.com/commits/20919 X-Bug: 23171 Message-Id: <20070301160943.A3D4A10CEB@romeo> 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-03-01 17:09:33+01:00, mats@romeo.(none) +7 -0 BUG#23171 (Illegal group log position): Moving body of exec_event() into exec_relay_log_event(). Making shall_skip()/apply_event()/update_pos() inteface public. mysql-test/extra/rpl_tests/rpl_skip.test@stripped, 2007-03-01 17:09:25+01:00, mats@romeo.(none) +11 -11 Disabling statements added for debug purposes. Commenting out uninteresting columns from SHOW SLAVE STATUS. mysql-test/r/rpl_skip_innodb.result@stripped, 2007-03-01 17:09:25+01:00, mats@romeo.(none) +44 -99 Result change. mysql-test/r/rpl_skip_myisam.result@stripped, 2007-03-01 17:09:25+01:00, mats@romeo.(none) +40 -87 Result change. sql/log_event.cc@stripped, 2007-03-01 17:09:26+01:00, mats@romeo.(none) +13 -12 Renaming shall_skip() to do_shall_skip() to keep a consistent naming for virtual non-public functions (and let the public interface use the shall_skip() function). sql/log_event.h@stripped, 2007-03-01 17:09:26+01:00, mats@romeo.(none) +55 -100 Renaming shall_skip() to do_shall_skip() to keep a consistent naming for virtual non-public functions (and let the public interface use the shall_skip() function). Moving body of exec_event() into exec_relay_log_event(). Making shall_skip(), update_pos(), and apply_event() public. sql/slave.cc@stripped, 2007-03-01 17:09:26+01:00, mats@romeo.(none) +77 -5 Moving the body of exec_event() into exec_relay_log_event() sql/sql_binlog.cc@stripped, 2007-03-01 17:09:26+01:00, mats@romeo.(none) +10 -4 Using apply_event() instead of the removed existant exec_event(). Removing now unecessary boilerplate code. # 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: romeo.(none) # Root: /home/bk/b23171-mysql-5.1-new-rpl --- 1.265/sql/log_event.cc 2007-03-01 17:09:43 +01:00 +++ 1.266/sql/log_event.cc 2007-03-01 17:09:43 +01:00 @@ -610,12 +610,13 @@ Log_event::enum_skip_reason -Log_event::shall_skip(RELAY_LOG_INFO *rli) +Log_event::do_shall_skip(RELAY_LOG_INFO *rli) { - DBUG_PRINT("info", ("ev->server_id=%u, ::server_id=%u," + DBUG_PRINT("info", ("ev->server_id=%lu, ::server_id=%lu," " rli->replicate_same_server_id=%d," " rli->slave_skip_counter=%d", - server_id, ::server_id, rli->replicate_same_server_id, + (ulong) server_id, (ulong) ::server_id, + rli->replicate_same_server_id, rli->slave_skip_counter)); if (server_id == ::server_id && !rli->replicate_same_server_id) return EVENT_SKIP_IGNORE; @@ -2638,7 +2639,7 @@ } Log_event::enum_skip_reason -Format_description_log_event::shall_skip(RELAY_LOG_INFO *rli) +Format_description_log_event::do_shall_skip(RELAY_LOG_INFO *rli) { return Log_event::EVENT_SKIP_NOT; } @@ -3641,9 +3642,9 @@ Log_event::enum_skip_reason -Rotate_log_event::shall_skip(RELAY_LOG_INFO *rli) +Rotate_log_event::do_shall_skip(RELAY_LOG_INFO *rli) { - enum_skip_reason reason= Log_event::shall_skip(rli); + enum_skip_reason reason= Log_event::do_shall_skip(rli); switch (reason) { case Log_event::EVENT_SKIP_NOT: @@ -3788,7 +3789,7 @@ Log_event::enum_skip_reason -Intvar_log_event::shall_skip(RELAY_LOG_INFO *rli) +Intvar_log_event::do_shall_skip(RELAY_LOG_INFO *rli) { /* It is a common error to set the slave skip counter to 1 instead of @@ -3801,7 +3802,7 @@ if (rli->slave_skip_counter == 1) return Log_event::EVENT_SKIP_IGNORE; else - return Log_event::shall_skip(rli); + return Log_event::do_shall_skip(rli); } #endif @@ -3881,7 +3882,7 @@ Log_event::enum_skip_reason -Rand_log_event::shall_skip(RELAY_LOG_INFO *rli) +Rand_log_event::do_shall_skip(RELAY_LOG_INFO *rli) { /* It is a common error to set the slave skip counter to 1 instead of @@ -3894,7 +3895,7 @@ if (rli->slave_skip_counter == 1) return Log_event::EVENT_SKIP_IGNORE; else - return Log_event::shall_skip(rli); + return Log_event::do_shall_skip(rli); } #endif /* !MYSQL_CLIENT */ @@ -4322,7 +4323,7 @@ } Log_event::enum_skip_reason -User_var_log_event::shall_skip(RELAY_LOG_INFO *rli) +User_var_log_event::do_shall_skip(RELAY_LOG_INFO *rli) { /* It is a common error to set the slave skip counter to 1 instead @@ -4335,7 +4336,7 @@ if (rli->slave_skip_counter == 1) return Log_event::EVENT_SKIP_IGNORE; else - return Log_event::shall_skip(rli); + return Log_event::do_shall_skip(rli); } #endif /* !MYSQL_CLIENT */ --- 1.141/sql/log_event.h 2007-03-01 17:09:43 +01:00 +++ 1.142/sql/log_event.h 2007-03-01 17:09:43 +01:00 @@ -592,6 +592,7 @@ occur when the slave executes an event. @see shall_skip + @see do_shall_skip */ enum enum_skip_reason { /** @@ -695,93 +696,6 @@ #ifdef HAVE_REPLICATION int net_send(Protocol *protocol, const char* log_name, my_off_t pos); - /** - Execute the event to change the database and update the binary - log coordinates. - - The event will be executed unless it is supposed to be skipped. - - Queries originating from this server must be skipped. Low-level - events (Format_description_log_event, Rotate_log_event, - Stop_log_event) from this server must also be skipped. But for - those we don't want to modify group_master_log_pos, - because these events did not exist on the master. - Format_description_log_event is not completely skipped. - - Skip queries specified by the user in - slave_skip_counter. We can't however skip events - that has something to do with the log files themselves. - - Filtering on own server id is extremely important, to ignore - execution of events created by the creation/rotation of the relay - log (remember that now the relay log starts with its Format_desc, - has a Rotate etc). - - @pre The rli->data_lock shall be locked. - - @post The rli->data_lock will be unlocked. - - @note It is assumed that the @c rli->data_lock is locked before - calling this routine. This is because the lock has to be released - after performing any necessary changes during the skip section of - the code. The mutex is locked in exec_relay_log_event() to check - some until conditions, so this is why it's needed here. - - @todo Move the until condition checking into the Log_event class - to eliminate the need for pre-locking the mutex. - - @see exec_relay_log_event - @see shall_skip - @see do_apply_event - @see do_update_pos - - @param rli Pointer to relay log information - - @retval 0 The event was successfully executed. - @retval errno Error code when the execution failed - */ - - int exec_event(RELAY_LOG_INFO *rli) - { - DBUG_ENTER("exec_event"); - safe_mutex_assert_owner(&rli->data_lock); -#ifndef DBUG_OFF - static const char *const explain[] = { - "event was not skipped", // EVENT_SKIP_NOT, - "event originated from this server", // EVENT_SKIP_IGNORE, - "event skip counter was non-zero" // EVENT_SKIP_COUNT - }; -#endif - int reason= shall_skip(rli); - int error= 0; - char buf[22]; - if (reason == EVENT_SKIP_COUNT) - --rli->slave_skip_counter; - pthread_mutex_unlock(&rli->data_lock); - if (reason == EVENT_SKIP_NOT) - { - if ((error= do_apply_event(rli))) - { - DBUG_PRINT("info", ("apply_event error = %d", error)); - DBUG_RETURN(error); - } - } - else - DBUG_PRINT("info", ("%s was skipped because %s", - get_type_str(), explain[reason])); - DBUG_PRINT("info", ("apply_event error = %d", error)); - error= do_update_pos(rli); - DBUG_PRINT("info", ("update_pos error = %d", error)); - DBUG_PRINT("info", ("group %s %s", - llstr(rli->group_relay_log_pos, buf), - rli->group_relay_log_name)); - DBUG_PRINT("info", ("event %s %s", - llstr(rli->event_relay_log_pos, buf), - rli->event_relay_log_name)); - DBUG_RETURN(error); - } - - /* pack_info() is used by SHOW BINLOG EVENTS; as print() it prepares and sends a string to display to the user, so it resembles print(). @@ -862,8 +776,47 @@ /* returns the human readable name of the event's type */ const char* get_type_str(); -protected: #if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) +public: + + /** + Apply the event to the database. + + This function represents the public interface for applying an + event. + + @see do_apply_event + */ + int apply_event(RELAY_LOG_INFO const *rli) { + return do_apply_event(rli); + } + + + /** + Update the relay log position. + + This function represents the public interface for "stepping over" + the event and will update the relay log information. + + @see do_update_pos + */ + int update_pos(RELAY_LOG_INFO *rli) + { + return do_update_pos(rli); + } + + /** + Decide if the event shall be skipped, and the reason for skipping + it. + + @see do_shall_skip + */ + enum_skip_reason shall_skip(RELAY_LOG_INFO *rli) + { + return do_shall_skip(rli); + } + +protected: /** Primitive to apply an event to the database. @@ -894,7 +847,9 @@ @param rli Pointer to relay log info structure @retval 0 Coordinates changed successfully - @retval errno Error code if advancing failed + @retval errno Error code if advancing failed (usually just + 1). Observe that handler errors are returned by the + do_apply_event() function, and not by this one. */ virtual int do_update_pos(RELAY_LOG_INFO *rli); @@ -914,20 +869,20 @@ @see do_apply_event @see do_update_pos - @retval ERR_EVENT_SKIP_NOT + @retval Log_event::EVENT_SKIP_NOT The event shall not be skipped and should be applied. - @retval ERR_EVENT_SKIP_IGNORE + @retval Log_event::EVENT_SKIP_IGNORE The event shall be skipped by just ignoring it, i.e., the slave skip counter shall not be changed. This happends if, for example, the originating server id of the event is the same as the server id of the slave. - @retval ERR_EVENT_SKIP_COUNT + @retval Log_event::EVENT_SKIP_COUNT The event shall be skipped because the slave skip counter was non-zero. The caller shall decrease the counter by one. */ - virtual enum_skip_reason shall_skip(RELAY_LOG_INFO *rli); + virtual enum_skip_reason do_shall_skip(RELAY_LOG_INFO *rli); #endif }; @@ -1331,7 +1286,7 @@ protected: #if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) virtual int do_apply_event(RELAY_LOG_INFO const *rli); - virtual enum_skip_reason shall_skip(RELAY_LOG_INFO*) + virtual enum_skip_reason do_shall_skip(RELAY_LOG_INFO*) { /* Events from ourself should be skipped, but they should not @@ -1397,7 +1352,7 @@ #if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) virtual int do_apply_event(RELAY_LOG_INFO const *rli); virtual int do_update_pos(RELAY_LOG_INFO *rli); - virtual enum_skip_reason shall_skip(RELAY_LOG_INFO *rli); + virtual enum_skip_reason do_shall_skip(RELAY_LOG_INFO *rli); #endif }; @@ -1441,7 +1396,7 @@ #if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) virtual int do_apply_event(RELAY_LOG_INFO const *rli); virtual int do_update_pos(RELAY_LOG_INFO *rli); - virtual enum_skip_reason shall_skip(RELAY_LOG_INFO *rli); + virtual enum_skip_reason do_shall_skip(RELAY_LOG_INFO *rli); #endif }; @@ -1487,7 +1442,7 @@ #if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) virtual int do_apply_event(RELAY_LOG_INFO const *rli); virtual int do_update_pos(RELAY_LOG_INFO *rli); - virtual enum_skip_reason shall_skip(RELAY_LOG_INFO *rli); + virtual enum_skip_reason do_shall_skip(RELAY_LOG_INFO *rli); #endif }; @@ -1575,7 +1530,7 @@ #if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) virtual int do_apply_event(RELAY_LOG_INFO const *rli); virtual int do_update_pos(RELAY_LOG_INFO *rli); - virtual enum_skip_reason shall_skip(RELAY_LOG_INFO *rli); + virtual enum_skip_reason do_shall_skip(RELAY_LOG_INFO *rli); #endif }; @@ -1605,7 +1560,7 @@ private: #if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) virtual int do_update_pos(RELAY_LOG_INFO *rli); - virtual enum_skip_reason shall_skip(RELAY_LOG_INFO *rli) + virtual enum_skip_reason do_shall_skip(RELAY_LOG_INFO *rli) { /* Events from ourself should be skipped, but they should not @@ -1665,7 +1620,7 @@ private: #if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) virtual int do_update_pos(RELAY_LOG_INFO *rli); - virtual enum_skip_reason shall_skip(RELAY_LOG_INFO *rli); + virtual enum_skip_reason do_shall_skip(RELAY_LOG_INFO *rli); #endif }; --- 1.298/sql/slave.cc 2007-03-01 17:09:43 +01:00 +++ 1.299/sql/slave.cc 2007-03-01 17:09:43 +01:00 @@ -1729,7 +1729,7 @@ if (ev) { int type_code = ev->get_type_code(); - int exec_res; + int exec_res= 0; /* */ @@ -1739,8 +1739,27 @@ /* - Execute the event, but first we set some data that is needed for + Execute the event to change the database and update the binary + log coordinates, but first we set some data that is needed for the thread. + + The event will be executed unless it is supposed to be skipped. + + Queries originating from this server must be skipped. Low-level + events (Format_description_log_event, Rotate_log_event, + Stop_log_event) from this server must also be skipped. But for + those we don't want to modify 'group_master_log_pos', because + these events did not exist on the master. + Format_description_log_event is not completely skipped. + + Skip queries specified by the user in 'slave_skip_counter'. We + can't however skip events that has something to do with the log + files themselves. + + Filtering on own server id is extremely important, to ignore + execution of events created by the creation/rotation of the relay + log (remember that now the relay log starts with its Format_desc, + has a Rotate etc). */ thd->server_id = ev->server_id; // use the original server id for logging @@ -1753,9 +1772,62 @@ FLAGSTR(thd->options, OPTION_NOT_AUTOCOMMIT), FLAGSTR(thd->options, OPTION_BEGIN))); - exec_res= ev->exec_event(rli); - DBUG_PRINT("info", ("exec_event result = %d", exec_res)); - DBUG_ASSERT(rli->sql_thd==thd); + int reason= ev->shall_skip(rli); + if (reason == Log_event::EVENT_SKIP_COUNT) + --rli->slave_skip_counter; + pthread_mutex_unlock(&rli->data_lock); + if (reason == Log_event::EVENT_SKIP_NOT) + exec_res= ev->apply_event(rli); +#ifndef DBUG_OFF + else + { + /* + This only prints information to the debug trace. + + TODO: Print an informational message to the error log? + */ + static const char *const explain[] = { + "event was not skipped", // EVENT_SKIP_NOT, + "event originated from this server", // EVENT_SKIP_IGNORE, + "event skip counter was non-zero" // EVENT_SKIP_COUNT + }; + DBUG_PRINT("info", ("%s was skipped because %s", + ev->get_type_str(), explain[reason])); + } +#endif + + DBUG_PRINT("info", ("apply_event error = %d", exec_res)); + if (exec_res == 0) + { + int error= ev->update_pos(rli); + char buf[22]; + DBUG_PRINT("info", ("update_pos error = %d", error)); + DBUG_PRINT("info", ("group %s %s", + llstr(rli->group_relay_log_pos, buf), + rli->group_relay_log_name)); + DBUG_PRINT("info", ("event %s %s", + llstr(rli->event_relay_log_pos, buf), + rli->event_relay_log_name)); + /* + The update should not fail, so print an error message and + return an error code. + + TODO: Replace this with a decent error message when merged + with BUG#24954 (which adds several new error message). + */ + 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)); + DBUG_RETURN(1); + } + } + /* Format_description_log_event should not be deleted because it will be used to read info about the relay log's format; it will be deleted when --- 1.9/sql/sql_binlog.cc 2007-03-01 17:09:43 +01:00 +++ 1.10/sql/sql_binlog.cc 2007-03-01 17:09:43 +01:00 @@ -71,7 +71,6 @@ thd->rli_fake->sql_thd= thd; thd->rli_fake->no_storage= TRUE; - thd->rli_fake->replicate_same_server_id= TRUE; for (char const *strptr= thd->lex->comment.str ; strptr < thd->lex->comment.str + thd->lex->comment.length ; ) @@ -164,10 +163,17 @@ (ulong) uint4korr(bufptr+EVENT_LEN_OFFSET))); #endif ev->thd= thd; - pthread_mutex_lock(&thd->rli_fake->data_lock); - if (int err= ev->exec_event(thd->rli_fake)) + /* + We go directly to the application phase, since we don't need + to check if the event shall be skipped or not. + + Neither do we have to update the log positions, since that is + not used at all: the rli_fake instance is used only for error + reporting. + */ + if (int err= ev->apply_event(thd->rli_fake)) { - DBUG_PRINT("error", ("exec_event() returned: %d", err)); + DBUG_PRINT("error", ("apply_event() returned: %d", err)); /* TODO: Maybe a better error message since the BINLOG statement now contains several events. --- 1.1/mysql-test/extra/rpl_tests/rpl_skip.test 2007-03-01 17:09:43 +01:00 +++ 1.2/mysql-test/extra/rpl_tests/rpl_skip.test 2007-03-01 17:09:43 +01:00 @@ -38,12 +38,12 @@ INSERT INTO t2 VALUES (1,@blob); # For debug purposes -SHOW BINLOG EVENTS; +# SHOW BINLOG EVENTS; save_master_pos; connection slave; wait_for_slave_to_stop; ---replace_column 1 # 23 # 33 # +--replace_column 1 # 7 # 8 # 9 # 16 # 23 # 33 # --replace_result $MASTER_MYPORT MASTER_MYPORT --query_vertical SHOW SLAVE STATUS SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; @@ -51,7 +51,7 @@ sync_with_master; SHOW TABLES; SELECT a FROM t2 ORDER BY a; ---replace_column 1 # 23 # 33 # +--replace_column 1 # 7 # 8 # 9 # 16 # 23 # 33 # --replace_result $MASTER_MYPORT MASTER_MYPORT --query_vertical SHOW SLAVE STATUS @@ -77,7 +77,7 @@ SELECT a FROM t2 ORDER BY a; # For debug purposes -SHOW BINLOG EVENTS; +# SHOW BINLOG EVENTS; save_master_pos; connection slave; @@ -92,7 +92,7 @@ while ($1) { wait_for_slave_to_stop; - --replace_column 1 # 23 # 33 # + --replace_column 1 # 7 # 8 # 9 # 16 # 23 # 33 # --replace_result $MASTER_MYPORT MASTER_MYPORT --query_vertical SHOW SLAVE STATUS SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; @@ -101,7 +101,7 @@ } sync_with_master; ---replace_column 1 # 23 # 33 # +--replace_column 1 # 7 # 8 # 9 # 16 # 23 # 33 # --replace_result $MASTER_MYPORT MASTER_MYPORT --query_vertical SHOW SLAVE STATUS @@ -148,21 +148,21 @@ # For debug purposes -SHOW BINLOG EVENTS; +# SHOW BINLOG EVENTS; --echo **** On Slave **** real_sleep 3; connection slave; +--replace_column 1 # 7 # 8 # 9 # 16 # 23 # 33 # --replace_result $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 23 # 33 # --query_vertical SHOW SLAVE STATUS STOP SLAVE; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; real_sleep 3; +--replace_column 1 # 7 # 8 # 9 # 16 # 23 # 33 # --replace_result $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 23 # 33 # --query_vertical SHOW SLAVE STATUS SELECT a FROM t2 ORDER BY a; @@ -170,8 +170,8 @@ SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; real_sleep 3; +--replace_column 1 # 7 # 8 # 9 # 16 # 23 # 33 # --replace_result $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 23 # 33 # --query_vertical SHOW SLAVE STATUS SELECT a FROM t2 ORDER BY a; @@ -179,8 +179,8 @@ SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; real_sleep 3; +--replace_column 1 # 7 # 8 # 9 # 16 # 23 # 33 # --replace_result $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 23 # 33 # --query_vertical SHOW SLAVE STATUS SELECT a FROM t2 ORDER BY a; --- 1.1/mysql-test/r/rpl_skip_innodb.result 2007-03-01 17:09:43 +01:00 +++ 1.2/mysql-test/r/rpl_skip_innodb.result 2007-03-01 17:09:43 +01:00 @@ -15,17 +15,6 @@ DROP TABLE t1; INSERT INTO t1 VALUES (1,@blob); INSERT INTO t2 VALUES (1,@blob); -SHOW BINLOG EVENTS; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 102 Server ver: 5.1.15-beta-debug-log, Binlog ver: 4 -master-bin.000001 102 Query 1 210 use `test`; CREATE TABLE t1 (a INT, b BLOB) ENGINE=innodb -master-bin.000001 210 Query 1 318 use `test`; CREATE TABLE t2 (a INT, b BLOB) ENGINE=innodb -master-bin.000001 318 Table_map 1 40 table_id: 17 (test.t1) -master-bin.000001 358 Write_rows 1 332 table_id: 17 flags: STMT_END_F -master-bin.000001 650 Xid 1 677 COMMIT /* xid=44 */ -master-bin.000001 677 Table_map 1 40 table_id: 18 (test.t2) -master-bin.000001 717 Write_rows 1 332 table_id: 18 flags: STMT_END_F -master-bin.000001 1009 Xid 1 1036 COMMIT /* xid=45 */ SHOW SLAVE STATUS; Slave_IO_State # Master_Host 127.0.0.1 @@ -33,16 +22,16 @@ Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 1036 -Relay_Log_File slave-relay-bin.000003 -Relay_Log_Pos 460 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 Slave_IO_Running Yes Slave_SQL_Running No Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table -Replicate_Ignore_Table +Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 1146 @@ -75,16 +64,16 @@ Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 1036 -Relay_Log_File slave-relay-bin.000003 -Relay_Log_Pos 1178 +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 -Replicate_Ignore_Table +Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 0 @@ -116,31 +105,6 @@ 2 3 4 -SHOW BINLOG EVENTS; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 102 Server ver: 5.1.15-beta-debug-log, Binlog ver: 4 -master-bin.000001 102 Query 1 210 use `test`; CREATE TABLE t1 (a INT, b BLOB) ENGINE=innodb -master-bin.000001 210 Query 1 318 use `test`; CREATE TABLE t2 (a INT, b BLOB) ENGINE=innodb -master-bin.000001 318 Table_map 1 40 table_id: 17 (test.t1) -master-bin.000001 358 Write_rows 1 332 table_id: 17 flags: STMT_END_F -master-bin.000001 650 Xid 1 677 COMMIT /* xid=44 */ -master-bin.000001 677 Table_map 1 40 table_id: 18 (test.t2) -master-bin.000001 717 Write_rows 1 332 table_id: 18 flags: STMT_END_F -master-bin.000001 1009 Xid 1 1036 COMMIT /* xid=45 */ -master-bin.000001 1036 Query 1 1104 use `test`; BEGIN -master-bin.000001 1104 Table_map 1 40 table_id: 17 (test.t1) -master-bin.000001 1144 Write_rows 1 332 table_id: 17 flags: STMT_END_F -master-bin.000001 1436 Table_map 1 372 table_id: 18 (test.t2) -master-bin.000001 1476 Write_rows 1 664 table_id: 18 flags: STMT_END_F -master-bin.000001 1768 Table_map 1 704 table_id: 17 (test.t1) -master-bin.000001 1808 Write_rows 1 996 table_id: 17 flags: STMT_END_F -master-bin.000001 2100 Table_map 1 1036 table_id: 18 (test.t2) -master-bin.000001 2140 Write_rows 1 1328 table_id: 18 flags: STMT_END_F -master-bin.000001 2432 Table_map 1 1368 table_id: 17 (test.t1) -master-bin.000001 2472 Write_rows 1 1660 table_id: 17 flags: STMT_END_F -master-bin.000001 2764 Table_map 1 1700 table_id: 18 (test.t2) -master-bin.000001 2804 Write_rows 1 1992 table_id: 18 flags: STMT_END_F -master-bin.000001 3096 Xid 1 3123 COMMIT /* xid=50 */ SHOW SLAVE STATUS; Slave_IO_State # Master_Host 127.0.0.1 @@ -148,16 +112,16 @@ Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 3123 -Relay_Log_File slave-relay-bin.000003 -Relay_Log_Pos 1178 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 Slave_IO_Running Yes Slave_SQL_Running No Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table -Replicate_Ignore_Table +Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 1146 @@ -184,16 +148,16 @@ Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 3123 -Relay_Log_File slave-relay-bin.000003 -Relay_Log_Pos 1246 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 Slave_IO_Running Yes Slave_SQL_Running No Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table -Replicate_Ignore_Table +Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 1146 @@ -220,16 +184,16 @@ Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 3123 -Relay_Log_File slave-relay-bin.000003 -Relay_Log_Pos 1910 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 Slave_IO_Running Yes Slave_SQL_Running No Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table -Replicate_Ignore_Table +Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 1146 @@ -256,16 +220,16 @@ Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 3123 -Relay_Log_File slave-relay-bin.000003 -Relay_Log_Pos 2574 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 Slave_IO_Running Yes Slave_SQL_Running No Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table -Replicate_Ignore_Table +Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 1146 @@ -292,16 +256,16 @@ Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 3123 -Relay_Log_File slave-relay-bin.000003 -Relay_Log_Pos 3265 +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 -Replicate_Ignore_Table +Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 0 @@ -345,25 +309,6 @@ a 1 2 -SHOW BINLOG EVENTS; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 102 Server ver: 5.1.15-beta-debug-log, Binlog ver: 4 -master-bin.000001 102 Query 1 204 use `test`; CREATE TABLE t1 ( a INT ) ENGINE=innodb -master-bin.000001 204 Query 1 330 use `test`; CREATE TABLE t2 ( a INT AUTO_INCREMENT, KEY (a) ) ENGINE=innodb -master-bin.000001 330 Query 1 512 use `test`; CREATE DEFINER=`root`@`localhost` trigger t1_ai after insert on t1 for each row -begin -insert into t2 values (NULL); -end -master-bin.000001 512 Query 1 580 use `test`; BEGIN -master-bin.000001 580 Table_map 1 39 table_id: 20 (test.t1) -master-bin.000001 619 Table_map 1 78 table_id: 21 (test.t2) -master-bin.000001 658 Write_rows 1 112 table_id: 20 -master-bin.000001 692 Write_rows 1 146 table_id: 21 flags: STMT_END_F -master-bin.000001 726 Table_map 1 185 table_id: 20 (test.t1) -master-bin.000001 765 Table_map 1 224 table_id: 21 (test.t2) -master-bin.000001 804 Write_rows 1 258 table_id: 20 -master-bin.000001 838 Write_rows 1 292 table_id: 21 flags: STMT_END_F -master-bin.000001 872 Xid 1 899 COMMIT /* xid=76 */ **** On Slave **** SHOW SLAVE STATUS; Slave_IO_State # @@ -372,16 +317,16 @@ Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 899 -Relay_Log_File slave-relay-bin.000003 -Relay_Log_Pos 654 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 Slave_IO_Running Yes Slave_SQL_Running No Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table -Replicate_Ignore_Table +Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 1146 @@ -409,16 +354,16 @@ Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 899 -Relay_Log_File slave-relay-bin.000003 -Relay_Log_Pos 722 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 Slave_IO_Running Yes Slave_SQL_Running No Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table -Replicate_Ignore_Table +Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 1146 @@ -448,16 +393,16 @@ Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 899 -Relay_Log_File slave-relay-bin.000003 -Relay_Log_Pos 868 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 Slave_IO_Running Yes Slave_SQL_Running No Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table -Replicate_Ignore_Table +Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 1146 @@ -488,16 +433,16 @@ Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 899 -Relay_Log_File slave-relay-bin.000006 -Relay_Log_Pos 244 +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 -Replicate_Ignore_Table +Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 0 --- 1.1/mysql-test/r/rpl_skip_myisam.result 2007-03-01 17:09:43 +01:00 +++ 1.2/mysql-test/r/rpl_skip_myisam.result 2007-03-01 17:09:43 +01:00 @@ -15,15 +15,6 @@ DROP TABLE t1; INSERT INTO t1 VALUES (1,@blob); INSERT INTO t2 VALUES (1,@blob); -SHOW BINLOG EVENTS; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 102 Server ver: 5.1.15-beta-debug-log, Binlog ver: 4 -master-bin.000001 102 Query 1 210 use `test`; CREATE TABLE t1 (a INT, b BLOB) ENGINE=myisam -master-bin.000001 210 Query 1 318 use `test`; CREATE TABLE t2 (a INT, b BLOB) ENGINE=myisam -master-bin.000001 318 Table_map 1 358 table_id: 22 (test.t1) -master-bin.000001 358 Write_rows 1 650 table_id: 22 flags: STMT_END_F -master-bin.000001 650 Table_map 1 690 table_id: 23 (test.t2) -master-bin.000001 690 Write_rows 1 982 table_id: 23 flags: STMT_END_F SHOW SLAVE STATUS; Slave_IO_State # Master_Host 127.0.0.1 @@ -31,16 +22,16 @@ Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 982 -Relay_Log_File slave-relay-bin.000003 -Relay_Log_Pos 460 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 Slave_IO_Running Yes Slave_SQL_Running No Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table -Replicate_Ignore_Table +Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 1146 @@ -73,16 +64,16 @@ Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 982 -Relay_Log_File slave-relay-bin.000003 -Relay_Log_Pos 1124 +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 -Replicate_Ignore_Table +Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 0 @@ -114,27 +105,6 @@ 2 3 4 -SHOW BINLOG EVENTS; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 102 Server ver: 5.1.15-beta-debug-log, Binlog ver: 4 -master-bin.000001 102 Query 1 210 use `test`; CREATE TABLE t1 (a INT, b BLOB) ENGINE=myisam -master-bin.000001 210 Query 1 318 use `test`; CREATE TABLE t2 (a INT, b BLOB) ENGINE=myisam -master-bin.000001 318 Table_map 1 358 table_id: 22 (test.t1) -master-bin.000001 358 Write_rows 1 650 table_id: 22 flags: STMT_END_F -master-bin.000001 650 Table_map 1 690 table_id: 23 (test.t2) -master-bin.000001 690 Write_rows 1 982 table_id: 23 flags: STMT_END_F -master-bin.000001 982 Table_map 1 1022 table_id: 22 (test.t1) -master-bin.000001 1022 Write_rows 1 1314 table_id: 22 flags: STMT_END_F -master-bin.000001 1314 Table_map 1 1354 table_id: 23 (test.t2) -master-bin.000001 1354 Write_rows 1 1646 table_id: 23 flags: STMT_END_F -master-bin.000001 1646 Table_map 1 1686 table_id: 22 (test.t1) -master-bin.000001 1686 Write_rows 1 1978 table_id: 22 flags: STMT_END_F -master-bin.000001 1978 Table_map 1 2018 table_id: 23 (test.t2) -master-bin.000001 2018 Write_rows 1 2310 table_id: 23 flags: STMT_END_F -master-bin.000001 2310 Table_map 1 2350 table_id: 22 (test.t1) -master-bin.000001 2350 Write_rows 1 2642 table_id: 22 flags: STMT_END_F -master-bin.000001 2642 Table_map 1 2682 table_id: 23 (test.t2) -master-bin.000001 2682 Write_rows 1 2974 table_id: 23 flags: STMT_END_F SHOW SLAVE STATUS; Slave_IO_State # Master_Host 127.0.0.1 @@ -142,16 +112,16 @@ Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 2974 -Relay_Log_File slave-relay-bin.000003 -Relay_Log_Pos 1124 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 Slave_IO_Running Yes Slave_SQL_Running No Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table -Replicate_Ignore_Table +Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 1146 @@ -178,16 +148,16 @@ Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 2974 -Relay_Log_File slave-relay-bin.000003 -Relay_Log_Pos 1788 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 Slave_IO_Running Yes Slave_SQL_Running No Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table -Replicate_Ignore_Table +Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 1146 @@ -214,16 +184,16 @@ Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 2974 -Relay_Log_File slave-relay-bin.000003 -Relay_Log_Pos 2452 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 Slave_IO_Running Yes Slave_SQL_Running No Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table -Replicate_Ignore_Table +Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 1146 @@ -250,16 +220,16 @@ Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 2974 -Relay_Log_File slave-relay-bin.000003 -Relay_Log_Pos 3116 +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 -Replicate_Ignore_Table +Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 0 @@ -303,23 +273,6 @@ a 1 2 -SHOW BINLOG EVENTS; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 102 Server ver: 5.1.15-beta-debug-log, Binlog ver: 4 -master-bin.000001 102 Query 1 204 use `test`; CREATE TABLE t1 ( a INT ) ENGINE=myisam -master-bin.000001 204 Query 1 330 use `test`; CREATE TABLE t2 ( a INT AUTO_INCREMENT, KEY (a) ) ENGINE=myisam -master-bin.000001 330 Query 1 512 use `test`; CREATE DEFINER=`root`@`localhost` trigger t1_ai after insert on t1 for each row -begin -insert into t2 values (NULL); -end -master-bin.000001 512 Table_map 1 551 table_id: 25 (test.t1) -master-bin.000001 551 Table_map 1 590 table_id: 26 (test.t2) -master-bin.000001 590 Write_rows 1 624 table_id: 25 -master-bin.000001 624 Write_rows 1 658 table_id: 26 flags: STMT_END_F -master-bin.000001 658 Table_map 1 697 table_id: 25 (test.t1) -master-bin.000001 697 Table_map 1 736 table_id: 26 (test.t2) -master-bin.000001 736 Write_rows 1 770 table_id: 25 -master-bin.000001 770 Write_rows 1 804 table_id: 26 flags: STMT_END_F **** On Slave **** SHOW SLAVE STATUS; Slave_IO_State # @@ -328,16 +281,16 @@ Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 804 -Relay_Log_File slave-relay-bin.000003 -Relay_Log_Pos 654 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 Slave_IO_Running Yes Slave_SQL_Running No Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table -Replicate_Ignore_Table +Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 1146 @@ -365,16 +318,16 @@ Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 804 -Relay_Log_File slave-relay-bin.000003 -Relay_Log_Pos 800 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 Slave_IO_Running Yes Slave_SQL_Running No Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table -Replicate_Ignore_Table +Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 1146 @@ -405,16 +358,16 @@ Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 804 -Relay_Log_File slave-relay-bin.000005 -Relay_Log_Pos 244 +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 -Replicate_Ignore_Table +Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 0 @@ -446,16 +399,16 @@ Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 804 -Relay_Log_File slave-relay-bin.000006 -Relay_Log_Pos 244 +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 -Replicate_Ignore_Table +Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 0