From e962f35cc02e46ca0bc72d7fa00041d603741d0f Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 22 Mar 2007 20:32:07 +0200 Subject: Fixed compiler warnings. mysys/default.c: Fixed bug. ndb/src/mgmclient/CommandInterpreter.cpp: Added parenthesis around the expression. sql/mysqld.cc: Fixed compiler warnings. Added a missing component in options struct (bug). sql-common/my_time.c: Removed garbage. sql/sql_table.cc: A possible use of a variable uninitialized. support-files/compiler_warnings.supp: BitKeeper file /home/my/bk/mysql-4.1-main/support-files/compiler_warnings.supp --- client/mysqlbinlog.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client/mysqlbinlog.cc') diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 77240a2c750..3f3771e6441 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -834,7 +834,7 @@ static int dump_remote_log_entries(const char* logname) } if (len < 8 && net->read_pos[0] == 254) break; // end of data - DBUG_PRINT("info",( "len= %u, net->read_pos[5] = %d\n", + DBUG_PRINT("info",( "len: %lu net->read_pos[5]: %d\n", len, net->read_pos[5])); Log_event *ev = Log_event::read_log_event((const char*) net->read_pos + 1 , len - 1, &error_msg, old_format); -- cgit v1.2.1 From 8c76bd956d2cf099b834d5c3d7818468e77c2ec2 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 22 Mar 2007 20:55:59 +0200 Subject: Bug#27171 mysqlbinlog produces different output depends from option -R Server starts any binlog dump from Format_description_log_event, this shifted all offset calculations in mysqlbinlog and made it to stop the dump earlier than --stop-position. Now mysqlbinlog takes Format_description_log_event into account mysql-test/r/mysqlbinlog2.result: Bug#27171 mysqlbinlog produces different output depends from option -R mysql-test/t/mysqlbinlog2.test: Bug#27171 mysqlbinlog produces different output depends from option -R --- client/mysqlbinlog.cc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'client/mysqlbinlog.cc') diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 7489cdb334c..d8ea3d5f255 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -1040,7 +1040,7 @@ static int dump_remote_log_entries(PRINT_EVENT_INFO *print_event_info, uint logname_len; NET* net; int error= 0; - my_off_t old_off= start_position_mot; + my_off_t old_off= min(start_position_mot, BIN_LOG_HEADER_SIZE); char fname[FN_REFLEN+1]; DBUG_ENTER("dump_remote_log_entries"); @@ -1192,10 +1192,17 @@ could be out of memory"); } } /* - Let's adjust offset for remote log as for local log to produce - similar text. + Let's adjust offset for remote log as for local log to produce + similar text and to have --stop-position to work identically. + + Exception - the server sends Format_description_log_event + in the beginning of the dump, and only after it the event from + start_position. Let the old_off reflect it. */ - old_off+= len-1; + if (old_off < start_position_mot) + old_off= start_position_mot; + else + old_off+= len-1; } err: -- cgit v1.2.1