From: Alexander Nozdrin Date: December 22 2010 1:25pm Subject: bzr push into mysql-trunk-bugfixing branch (alexander.nozdrin:3466 to 3469) Bug#59022 List-Archive: http://lists.mysql.com/commits/127508 X-Bug: 59022 Message-Id: <201012221325.oBMDPUp3018716@rcsinet13.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3469 Alexander Nozdrin 2010-12-22 A patch for Bug#59022 (Valgrind warning in write_delayed() after InnoDB merge). Fix memory leak introduced by WL#5092 'RBR: Options for writing partial or full row images in RBR events'. Free memory which is allocated for column bitmap associated with each row to be processed by delayed insert handler thread. modified: sql/sql_insert.cc 3468 He Zhenxing 2010-12-22 [merge] Auto merge modified: sql/mysqld.cc 3467 He Zhenxing 2010-12-22 BUG#59079 rpl_binlog_errors.test fails when enables binlog-checksum The test case dependent on the size of incident event to calculate the event offset, howerver, the size of Incident_log_event is different when binlog-checksum is enabled, and caused the test case to fail. Fixed the problem by use the event sequence number instead event log file position to locate the incident event. modified: mysql-test/suite/rpl/r/rpl_binlog_errors.result mysql-test/suite/rpl/t/rpl_binlog_errors.test 3466 Alfranio Correia 2010-12-21 [merge] merge mysql-trunk-bugfixing (local) --> mysql-trunk-bugfixing modified: sql/rpl_info.cc sql/rpl_info.h sql/rpl_info_factory.cc sql/rpl_mi.cc sql/rpl_mi.h sql/rpl_rli.cc sql/rpl_rli.h === modified file 'mysql-test/suite/rpl/r/rpl_binlog_errors.result' --- a/mysql-test/suite/rpl/r/rpl_binlog_errors.result 2010-12-19 17:07:28 +0000 +++ b/mysql-test/suite/rpl/r/rpl_binlog_errors.result 2010-12-22 09:17:12 +0000 @@ -98,10 +98,9 @@ count(*) 1 ### check that the incident event is written to the current log SET GLOBAL debug="-d,error_unique_log_filename"; -FLUSH LOGS; -SHOW BINLOG EVENTS IN 'BINLOG_FILE' FROM LIMIT 1; +show binlog events from limit 4,1; Log_name Pos Event_type Server_id End_log_pos Info -BINLOG_FILE # Incident # # #1 (LOST_EVENTS) +master-bin.000001 # Incident # # #1 (LOST_EVENTS) DELETE FROM t4; RESET MASTER; ###################### TEST #8 === modified file 'mysql-test/suite/rpl/t/rpl_binlog_errors.test' --- a/mysql-test/suite/rpl/t/rpl_binlog_errors.test 2010-12-19 17:07:28 +0000 +++ b/mysql-test/suite/rpl/t/rpl_binlog_errors.test 2010-12-22 09:17:12 +0000 @@ -186,16 +186,8 @@ SELECT count(*) FROM t4; -- echo ### check that the incident event is written to the current log SET GLOBAL debug="-d,error_unique_log_filename"; --- let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1) --- let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1) - -# 53 is the size of the incident event, so we start from 22 bytes before the -# current position --- let $binlog_start = `SELECT $binlog_start - 53` -FLUSH LOGS; --- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $binlog_start $binlog_file BINLOG_FILE --- replace_column 2 # 4 # 5 # --- eval SHOW BINLOG EVENTS IN '$binlog_file' FROM $binlog_start LIMIT 1 +-- let $binlog_limit= 4,1 +-- source include/show_binlog_events.inc # clean up and move to next test DELETE FROM t4; === modified file 'sql/mysqld.cc' --- a/sql/mysqld.cc 2010-12-21 15:27:40 +0000 +++ b/sql/mysqld.cc 2010-12-22 09:28:27 +0000 @@ -3409,8 +3409,10 @@ static int init_common_variables() default_collation= get_charset_by_name(default_collation_name, MYF(0)); if (!default_collation) { +#ifdef WITH_PERFSCHEMA_STORAGE_ENGINE buffered_logs.print(); buffered_logs.cleanup(); +#endif sql_print_error(ER_DEFAULT(ER_UNKNOWN_COLLATION), default_collation_name); return 1; } === modified file 'sql/sql_insert.cc' --- a/sql/sql_insert.cc 2010-11-29 16:27:58 +0000 +++ b/sql/sql_insert.cc 2010-12-22 13:23:59 +0000 @@ -1843,11 +1843,14 @@ public: : record(0), dup(dup_arg), ignore(ignore_arg), log_query(log_query_arg), binlog_rows_query_log_events(FALSE), forced_insert_id(0), query(query_arg), time_zone(0) - {} + { + write_set.bitmap= NULL; + } ~delayed_row() { my_free(query.str); my_free(record); + my_free(write_set.bitmap); } }; No bundle (reason: useless for push emails).