Second patch to fix skipping code. Moving relay and binary log
position changing code from do_apply_event [old exec_event()] into
do_update_pos() and doing other changes necessary to support that.
Fixing a bug that can cause deadlock if rotating binary log when committing
a changes to a transactional table that is not inside a transaction and
cause a rotate log.
sql/log.cc:
Changing condition in binlog_commit() to skip calling
binlog_end_trans() twice to match condition in binlog_end_trans().
sql/log_event.cc:
Name change: apply_event_impl() -> do_apply_event()
Name change: advance_coord_impl() -> do_update_pos()
do_apply_event() now uses pointer to constant RELAY_LOG_INFO to prevent
inadvertandly changing the position in the code. Doing this would make
the skipping code loose track of where it is. All position changing code
shall now be in do_update_pos().
Factoring out relay and binary log position updating code from
do_apply_event() [previously exec_event()] into do_update_pos().
Using a safe approach to make it work: will refine the refactoring
when the skipping code is implemented.
Adding const casts where needed.
Changing signature to use pointers to constant objects where needed.
sql/rpl_rli.cc:
Making cached_charset_compare() const to work with constant instances of RELAY_LOG_INFO.
Debriding code.
sql/rpl_rli.h:
Making cached_charset_compare() const to work with constant instances of RELAY_LOG_INFO.
Debriding code.
sql/rpl_utility.cc:
Using pointer to const RELAY_LOG_INFO to make it work with other code.
sql/rpl_utility.h:
Using pointer to const RELAY_LOG_INFO to make it work with other code.
sql/slave.cc:
Using pointer to const RELAY_LOG_INFO to make it work with other code.
Adding const cast where necessary.
sql/slave.h:
Using pointer to const RELAY_LOG_INFO to make it work with other code.
Incorporating changes from review.
Fixing one bug that surfaced.
mysql-test/extra/rpl_tests/rpl_row_tabledefs.test:
Adding tests that UPDATE and DELETE does not generate an error.
mysql-test/r/rpl_row_tabledefs_2myisam.result:
Result change.
mysql-test/r/rpl_row_tabledefs_3innodb.result:
Result change.
mysql-test/t/disabled.def:
Enabling rpl_sp_effects (even though it gives a result mismatch currently).
sql/field.cc:
Using constant to denote undefined last null byte.
sql/field.h:
Using constant to denote undefined last null byte.
Adding documentation.
sql/log_event.cc:
Not generating error for non-NULL no-DEFAULT columns when updating or deleting row.
Better documentation and comments.
sql/rpl_utility.cc:
Moving documentation to header file.
sql/rpl_utility.h:
Documenting class and members.
Extended replication to allow extra columns added last on slave
as compared with table on master.
mysql-test/extra/rpl_tests/rpl_row_tabledefs.test:
Testing that replication can handle extra extra columns on slave.
mysql-test/r/rpl_row_tabledefs.result:
Result file change
sql/Makefile.am:
Adding new files.
sql/field.cc:
Implementing missing Field_bit::set_default()
sql/field.h:
Implementing missing Field_bit::set_default()
sql/log_event.cc:
Extending unpack_row() and replace_record() to handle the case when there are more columns
on the slave than on the master. Especially handle BIT columns correctly.
Using newly introduced table_def class to perform comparison.
sql/log_event.h:
Adding field to table_map_log_event. Changing prototype for do_prepare_row().
sql/mysql_priv.h:
Adding include guards
mysql-test/t/rpl_row_tabledefs.test:
New BitKeeper file ``mysql-test/t/rpl_row_tabledefs.test''
sql/rpl_utility.cc:
New BitKeeper file ``sql/rpl_utility.cc''
sql/rpl_utility.h:
New BitKeeper file ``sql/rpl_utility.h''