Post-push fix: updated some result files that were affected
by the previous fix to this bug.
mysql-test/suite/binlog/r/binlog_killed_simulate.result:
Updated result file.
mysql-test/suite/binlog/r/binlog_row_binlog.result:
Updated result file.
mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result:
Updated result file.
mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result:
Updated result file.
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
Updated result file.
mysql-test/suite/rpl/r/rpl_stm_log.result:
Updated result file.
the reason for the failure is that io thread passes through a sequence of state
changes before it eventually got stuck at the expect running state as NO.
It's unreasonble to wait for the running status while the whole idea of the test is
to get to the IO thread error.
Fixed with changing the waiting condition.
mysql-test/suite/rpl/r/rpl_server_id1.result:
results changed
mysql-test/suite/rpl/t/disabled.def:
re-enabling rpl_server_id1
mysql-test/suite/rpl/t/rpl_server_id1.test:
deploying the exact waiting condition i.e to wait for the slave io error.
Problem: master binlog has 'create table t1'. Master binlog
was removed before slave could replicate it. In test's cleanup
code, master did 'drop table t1', which caused slave sql
thread to stop with an error since slave sql thread did not
know about t1.
Fix: t1 is just an auxiliary construction, only needed on
master. Hence, we turn off binlogging before t1 is created,
drop t1 as soon as we don't need it anymore, and then turn
on binlogging again.
mysql-test/include/show_binlog_events.inc:
Filter out directories and block_len from
LOAD DATA INFILE events.
mysql-test/suite/rpl/r/rpl_loaddata_map.result:
updated result file
mysql-test/suite/rpl/t/rpl_loaddata_map.test:
Turn off binlogging while t1 is used, drop t1 as soon
as we don't need it anymore, and turn on binlogging again.
Also added some comments and replaced 'show binlog events'
by 'source include/show_binlog_events.inc'.
Many dump threads can exist due to a way the new version of mtr governs suites.
For this immediate problem the test is refined not to use I_S but rather to reconnect
explicitly with preserving logics of a an old target bug fixes verification.
mysql-test/suite/rpl/r/rpl_temporary.result:
results changed
mysql-test/suite/rpl/t/rpl_temporary.test:
refining the bug#17284 test to avoid counting dump threads in favor to reconnect
explicitly with preserving the orig logics.
Problem: the test set @@global.init_slave to garbage at a time
which was not guaranteed to be after the time when the slave's
SQL thread used it. That would cause the slave's SQL thread to
stop in rare cases.
Fix: The test does not care about the value of
@@global.init_slave, except that it should be different on
master and slave. Hence, we set @@global.init_slave to
something that is valid SQL.
mysql-test/suite/rpl/r/rpl_variables.result:
updated result file.
mysql-test/suite/rpl/t/rpl_variables.test:
Set @@global.init_slave to something that is valid SQL.
In order to handle CHAR() fields, 8 bits were reserved for
the size of the CHAR field. However, instead of denoting the
number of characters in the field, field_length was used which
denotes the number of bytes in the field.
Since UTF-8 fields can have three bytes per character (and
has been extended to have four bytes per character in 6.0),
an extra two bits have been encoded in the field metadata
work for fields of type Field_string (i.e., CHAR fields).
Since the metadata word is filled, the extra bits have been
encoded in the upper 4 bits of the real type (the most
significant byte of the metadata word) by computing the
bitwise xor of the extra two bits. Since the upper 4 bits
of the real type always is 1111 for Field_string, this
means that for fields of length <256, the encoding is
identical to the encoding used in pre-5.1.26 servers, but
for lengths of 256 or more, an unrecognized type is formed,
causing an old slave (that does not handle lengths of 256
or more) to stop.
mysql-test/extra/rpl_tests/rpl_row_basic.test:
Adding test cases for replicating UTF-8 fields of lengths
of 256 or more (bytes).
mysql-test/suite/binlog/r/binlog_base64_flag.result:
Result file change.
mysql-test/suite/binlog/t/binlog_base64_flag.test:
Adding tests to trigger check that an error is generated when replicating from a
5.1.25 server for tables with a CHAR(128) but not when replicating a table with a
CHAR(63). Although the bug indicates that the limit is 83, we elected to use CHAR(63)
since 6.0 uses 4-byte UTF-8, and anything exceeding 63 would then cause the test to fail
when the patch is merged to 6.0.
mysql-test/suite/bugs/combinations:
Adding combinations file to run all bug reports in all binlog modes (where
applicable).
mysql-test/suite/bugs/r/rpl_bug37426.result:
Result file change.
mysql-test/suite/bugs/t/rpl_bug37426.test:
Added test for reported bug.
mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result:
Result file change.
mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result:
Result file change.
sql/field.cc:
Encoding an extra two bits in the most significant nibble (4 bits)
of the metadata word. Adding assertions to ensure that no attempt
is made to use lengths longer than supported.
Extending compatible_field_size() function with an extra parameter
holding a Relay_log_instace for error reporting.
Field_string::compatible_field_size() now reports an error if field
size for a CHAR is >255.
sql/field.h:
Field length is now computed from most significant 4 bits
of metadata word, or is equal to the row pack length if
there is no metadata.
Extending compatible_field_size() function with an extra parameter
holding a Relay_log_instace for error reporting.
sql/rpl_utility.cc:
Adding relay log parameter to compatible_field_size().
Minor refactoring to eliminate duplicate code.
sql/slave.cc:
Extending rpl_master_has_bug() with a single-argument predicate function and
a parameter to the predicate function. The predicate function can be used to
test for extra conditions for the bug before writing an error message.
sql/slave.h:
Extending rpl_master_has_bug() with a single-argument predicate function and
a parameter to the predicate function. The predicate function can be used to
test for extra conditions for the bug before writing an error message.
Also removing gratuitous default argument.
sql/sql_insert.cc:
Changing calls to rpl_master_has_bug() to adapt to changed signature.
replicated correctly between machines with
mixed endiannes
mysql-test/extra/rpl_tests/rpl_row_basic.test:
Added regression test for bug#37076.
mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result:
Added regression test for bug#37076.
mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result:
Added regression test for bug#37076.
mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result:
Added regression test for bug#37076.
sql/field.h:
Fixed bug #37076: TIMESTAMP/DATETIME/DATE values are not
replicated correctly between machines with
mixed endiannes
pack and unpack virtual methods have been overloaded for
Field_timestamp (TIMESTAMP domain), Field_datetime (DATETIME
domain) and Field_date (DATE domain) classes to replicate data
between platforms with different endiannes in a correct way
like in Field_long and Field_longlong classes.
Common code have been moved to private handle_int32 and
handle_int64 private methods.
rpl_slave_status failed on pushbuild. The slave stopped with an
error. Adding sync_slave_with_master fixes the problem. Updated
test case.
mysql-test/suite/rpl/r/rpl_slave_status.result:
Updated result file.
mysql-test/suite/rpl/t/rpl_slave_status.test:
- Added comment explaining what the test does.
- Added sync_slave_with_master in two places where it was missing. This
caused sporadic pushbuild errors.
- Added wait_for_slave_to_{start,stop} after {START,STOP} SLAVE queries.
- Removed 'drop table if exists' from setup code.
- Replaced save_master_pos;connection slave;sync_with_master by
sync_slave_with_master.
- Replaced 'delete from mysql.user' by 'drop user'.
- Wrapped 'show slave status' inside query_get_value(), so that only what
we test is in the output.
into magare.gmz:/home/kgeorge/mysql/work/B36011-5.1-bugteam
sql/sql_select.cc:
Auto merged
mysql-test/r/subselect.result:
merge of bug 36011 to 5.1-bugteam
mysql-test/t/subselect.test:
merge of bug 36011 to 5.1-bugteam
mysql-test/r/ctype_cp932_binlog_stm.result:
New offsets because of quote marks.
mysql-test/r/mysqlbinlog.result:
Re-add variables removed in merge at file-vers 1.47.
mysql-test/suite/binlog/r/binlog_database.result:
create_string() output changes the quoting and inserts newlines.
mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result:
Change in quoting.
mysql-test/suite/rpl/r/rpl_sp.result:
Adds quotes and newlines in creation of routines in binlog.
mysql-test/extra/rpl_tests/rpl_insert_id.test:
Moving save and restore of @@global.concurrent_insert into the same
session thread.
mysql-test/suite/rpl/r/rpl_insert_id.result:
Result file change.
mysql-test/suite/rpl/t/rpl_insert_id.test:
***MISSING TEXT***
into zippy.cornsilk.net:/home/cmiller/work/mysql/bug36570/my51-bug36570
mysql-test/suite/rpl/t/rpl_sp.test:
Auto merged
mysql-test/suite/rpl/r/rpl_sp.result:
manual merge.
Problem: If INSERT is immediately followed by SELECT in another thread,
the newly inserted rows may not be returned by the SELECT statement, if
ENGINE=myisam and @@concurrent_insert=1. This caused sporadic errors in
rpl_insert_id.
Fix: The test now uses ENGINE=$engine_type when creating tables (so that
innodb is used). It also turns off @@concurrent_insert around the critical
place, so that it works if someone in the future writes a test that sets
$engine_type=myisam before sourcing extra/rpl_tests/rpl_insert_id.test.
It also adds ORDER BY to all SELECTs so that the result is deterministic.
mysql-test/extra/rpl_tests/rpl_insert_id.test:
- Use ENGINE=$engine_type when creating tables, since that's expected by
suite/rpl/t/rpl_insert_id.test.
- Use ORDER BY to avoid nondeterministic results from SELECT.
- Set @@concurrent_insert=0 before doing SELECT after INSERT in another
client.
mysql-test/suite/rpl/r/rpl_insert_id.result:
Update result file.
When flushing tables, there were a slight chance that the flush was occuring
between processing of two table map events. Since the tables are opened
one by one, it might result in that the tables were not valid and that sub-
sequent locking of tables would cause the slave to crash.
The problem is solved by opening and locking all tables at once using
simple_open_n_lock_tables(). Also, the patch contain a change to open_tables()
so that pre-locking only takes place when the trg_event_map is not zero, which
was not the case before (this caused the lock to be placed in thd->locked_tables
instead of thd->lock since the assumption was that triggers would be called
later and therefore the tables should be pre-locked).
mysql-test/suite/rpl/r/rpl_found_rows.result:
Result change
mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result:
Result change
mysql-test/suite/rpl/t/rpl_found_rows.test:
Adding drop of table that was created in test.
mysql-test/suite/rpl/t/rpl_slave_status.test:
Adding waits for slave start and stop to ensure that test works.
sql/log_event.cc:
Replacing table-by-table open and lock with a single call
to simple_open_n_lock_tables(), which in turn required some
changes to other code.
sql/log_event_old.cc:
Replacing table-by-table open and lock with a single call
to simple_open_n_lock_tables(), which in turn required some
changes to other code.
sql/sql_base.cc:
Extending check inside open_tables() so that pre-locking in only done if
tables->trg_egent_map is non-zero.
mysql-test/include/wait_for_slave_sql_to_start.inc:
New BitKeeper file ``mysql-test/include/wait_for_slave_sql_to_start.inc''
test change for 5.1+ (show create view adds two columns in 5.1)
Patch only for 5.1+
mysql-test/suite/rpl/r/rpl_sp.result:
restored the original 5.1 test result
mysql-test/suite/rpl/r/rpl_view.result:
Bug#32575: Parse error of stmt with extended comments on slave side
Updated test result for show create view in 5.0 to 5.1
into client-10-129-10-147.upp.off.mysql.com:/Users/mattiasj/clones/topush-51-bugteam
mysql-test/suite/rpl/r/rpl_sp.result:
Auto merged
mysql-test/suite/rpl/t/rpl_view.test:
Auto merged
sql/sql_view.cc:
This was already fixed in 5.1
mysql-test/suite/rpl/r/rpl_view.result:
manual merge
Temporarily checking in an incorrect test case. Rationale: the impact of
this bug is negligible (it's almost a feature request). We need 5.1 to be
stable, and making a real fix is a bit risky. So the fix is postponed
to 6.0.
mysql-test/suite/rpl/r/rpl_ddl.result:
Updated result file.
mysql-test/suite/rpl/t/disabled.def:
Enabling test case rpl_ddl.test
The test suite/rpl/t/rpl_innodb_bug28430.test was disabled because of
BUG#32247, but not re-enabled when BUG#32247 was fixed. I've re-enabled
it. The test and result file needed to be updated too.
mysql-test/suite/rpl/r/rpl_innodb_bug28430.result:
Updated result file.
mysql-test/suite/rpl/t/disabled.def:
Enabled the rpl_innodb_bug28430 test case.
mysql-test/suite/rpl/t/rpl_innodb_bug28430.test:
show slave status is not needed since we have select count(*)
Select of the test could not perform deterministically, because the table remains to be
updatable by the running event handler.
Fixed with changing verification to use a logical values instead of comparison
with a pre-recorded results.
mysql-test/include/rpl_events.inc:
changing verification to use a logical values instead of comparison with a pre-recorded
results
mysql-test/suite/rpl/r/rpl_events.result:
resutls updated.
Among two claimed artifacts the critical one is in that the Table map of
a query following the failing with a duplicate key error CREATE-SELECT is skipped from
instantionating (and thus binlogging). That leads to sending a "chopped" group of the data
row-events without the table map head to the slave.
The slave can not apply the only data row events.
It's not easy to force the slave to react with an error in such a case (the second complaint
on the bug report), because the lack of a table Rows_log_event::do_apply_event the data row event
handler is a common situation which normally designates the event has to be filtered out
basing on the repliation do/ingore rules decision.
Fixed: table map creating and binlogging is restored via deploying the standard cleanup call in
select_create::abort().
No error is reported if by chance the table map was not been binlogged.
Leaving this out to resolve with considering how to combine the do/ingore rules with the situation
when erronoulsy the Table_map is not written to binlog.
mysql-test/suite/rpl/r/rpl_row_create_table.result:
results changed
mysql-test/suite/rpl/t/rpl_row_create_table.test:
regression test for the bug
sql/sql_insert.cc:
adding resetting of thd binlogging state that was missed for the particular case of failing CREATE..SELECT
Disabled 'rpl_redirect', failure is sporadic and and the test is superfluous
rpl_packet.test, rpl_packet.result:
Removing race conditions from rpl_packet causing test to fail
mysql-test/suite/rpl/t/disabled.def:
Disabled 'rpl_redirect', failure is sporadic and and the test is superfluous
mysql-test/suite/rpl/r/rpl_packet.result:
Result change.
mysql-test/suite/rpl/t/rpl_packet.test:
Setting net_buffer_length correctly for the test instead of relying on it
being set correctly. Waiting for slave to stop after issuing a SLAVE STOP
and waiting for slave to start when issuing a SLAVE START to prevent race
conditions causing test failure.
into dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl-merge
mysql-test/suite/rpl/r/rpl_packet.result:
Auto merged
mysql-test/suite/rpl/t/rpl_packet.test:
Auto merged
into magare.gmz:/home/kgeorge/mysql/work/merge-build-5.1-bugteam
sql/log.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/share/errmsg.txt:
merged 5.1-main to 5.1-bugteam
If a binlog file is manually replaced with a namesake directory the internal purging did
not handle the error of deleting the file so that eventually
a post-execution guards fires an assert.
Fixed with reusing a snippet of code for bug@18199 to tolerate lack of the file but no other error
at an attempt to delete it.
The same applied to the index file deletion.
The cset carries pieces of manual merging.
mysql-test/r/binlog_index.result:
new results
mysql-test/r/ctype_big5.result:
results changed
mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result:
new results
mysql-test/suite/binlog/r/binlog_stm_blackhole.result:
new results
mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test:
cleanup. still todo: to let the test run multiple times w/o restarting the server (just ./mtr test)
mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result:
results changed
mysql-test/suite/rpl/t/rpl_stm_auto_increment_bug33029.test:
guarding the test with statement format condition as the logics of the test requires
sql/log.cc:
two changes. One for the bug, other manual merge.
The bug change needs MYF(0) to pass to my_delete because not all error out of the function
are critical. The finer check is done on the caller of my_delete similarly how it was implemented
for bug@18199 fixes. Non-existance of a file is not a critical error.
sql/sql_class.cc:
manual merge, removing extra automatically brought hunk.
mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result:
Result change.
mysql-test/suite/rpl/r/rpl_extraCol_myisam.result:
Result change.
mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result:
Result change.
mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test:
Removing rows causing tests to be non-deterministic.
into mats-laptop.(none):/home/bk/b29020-mysql-5.1-rpl
mysql-test/suite/binlog/r/binlog_base64_flag.result:
Auto merged
mysql-test/suite/binlog/t/binlog_base64_flag.test:
Auto merged
mysql-test/suite/rpl/r/rpl_row_create_table.result:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/log_event.h:
Auto merged
sql/sql_insert.cc:
Auto merged
The bug allow multiple executing transactions working with non-transactional
to interfere with each others by interleaving the events of different trans-
actions.
Bug is fixed by writing non-transactional events to the transaction cache and
flushing the cache to the binary log at statement commit. To mimic the behavior
of normal statement-based replication, we flush the transaction cache in row-
based mode when there is no committed statements in the transaction cache,
which means we are committing the first one. This means that it will be written
to the binary log as a "mini-transaction" with just the rows for the statement.
Note that the changes here does not take effect when building the server with
HAVE_TRANSACTIONS set to false, but it is not clear if this was possible before
this patch either.
For row-based logging, we also have that when AUTOCOMMIT=1, the code now always
generates a BEGIN/COMMIT pair for single statements, or BEGIN/ROLLBACK pair in the
case of non-transactional changes in a statement that was rolled back. Note that
for the case where changes to a non-transactional table causes a rollback due
to error, the statement will now be logged with a BEGIN/ROLLBACK pair, even
though some changes has been committed to the non-transactional table.
mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test:
Removing SHOW BINLOG EVENTS causing test to be non-deterministic.
mysql-test/r/ctype_cp932_binlog_row.result:
Result change.
mysql-test/suite/binlog/r/binlog_base64_flag.result:
Result change.
mysql-test/suite/binlog/r/binlog_multi_engine.result:
Result file change.
mysql-test/suite/binlog/r/binlog_row_binlog.result:
Result file change.
mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result:
Result file change.
mysql-test/suite/binlog/r/binlog_row_insert_select.result:
Result file change.
mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result:
Result file change.
mysql-test/suite/binlog/r/binlog_stm_binlog.result:
Result file change.
mysql-test/suite/binlog/t/binlog_base64_flag.test:
Removing table that will be used in test to prevent failing if preceeding
tests forgot to drop the table.
mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result:
Result file change.
mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result:
Result file change.
mysql-test/suite/rpl/r/rpl_row_create_table.result:
Result file change.
mysql-test/suite/rpl/r/rpl_row_delayed_ins.result:
Result file change.
mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result:
Result file change.
mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result:
Result file change.
mysql-test/suite/rpl/r/rpl_row_log.result:
Result file change.
mysql-test/suite/rpl/r/rpl_row_log_innodb.result:
Result file change.
mysql-test/suite/rpl/r/rpl_row_until.result:
Result file change.
mysql-test/suite/rpl/r/rpl_slave_skip.result:
Result file change.
mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result:
Result file change.
mysql-test/suite/rpl/r/rpl_truncate_2myisam.result:
Result file change.
mysql-test/suite/rpl/t/rpl_row_create_table.test:
Binlog position change.
mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test:
Binlog position change.
mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test:
Binlog position change. Added stop position to mysqlbinlog argments to prevent
extreneous output.
mysql-test/suite/rpl/t/rpl_row_until.test:
Binlog position change.
mysql-test/suite/rpl/t/rpl_slave_skip.test:
Binlog position change.
mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test:
Removing extreneous SHOW BINLOG EVENTS causing test to be non-deterministic.
mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result:
Result change.
sql/log.cc:
Adding variable at_least_one_stmt to denote that there is at least one
statement committed to the transaction cache (but there might be more).
Removing duplicate checks from binlog_end_trans(). The transaction cache
should always be committed or rolled back when this function is called.
Correcting conditions for binlog_rollback() and binlog_commit() and removing
the previous "invisible commit" in favor of always using explicit commits
in the binary log.
sql/log_event.cc:
Marking table map event to be cached. Removing Muted_query_log_event from code.
sql/log_event.h:
Removing unused class Muted_query_log_event.
sql/sql_insert.cc:
Adding missing call to ha_autocommit_or_rollback() for delayed thread. Marking
CREATE-SELECT statements as transactional, since they don't need to be logged.
into stella.local:/home2/mydev/mysql-5.1-axmrg
mysql-test/r/ctype_big5.result:
Auto merged
mysql-test/r/ctype_euckr.result:
Auto merged
mysql-test/r/ctype_gb2312.result:
Auto merged
mysql-test/r/ctype_gbk.result:
Auto merged
mysql-test/r/ctype_uca.result:
Auto merged
mysql-test/r/ctype_ucs.result:
Auto merged
mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result:
Auto merged
mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result:
Auto merged
mysql-test/t/ctype_ucs.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/rpl_rli.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/lib/mtr_report.pl:
SCCS merged
into dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl
mysql-test/suite/binlog/r/binlog_unsafe.result:
Auto merged
mysql-test/suite/binlog/t/binlog_unsafe.test:
Auto merged
mysql-test/extra/rpl_tests/rpl_loaddata.test:
Removing SHOW MASTER STATUS that does not seem to make sense.
mysql-test/extra/rpl_tests/rpl_log.test:
Correcting test case to sync slave with master.
mysql-test/suite/binlog/r/binlog_unsafe.result:
Result change.
mysql-test/suite/binlog/t/binlog_unsafe.test:
Removing unsafe variable from list of safe variables.
mysql-test/suite/rpl/r/rpl_loaddata.result:
Result change.
mysql-test/suite/rpl/r/rpl_skip_error.result:
Result change.
mysql-test/suite/rpl/t/rpl_skip_error.test:
Correcting bad manual+automatic merge. Test is now only relevant for statement-
based replication.
sql/rpl_rli.cc:
Correcting automerge undoing previous change of return value.
Relay_log_info::wait_for_pos() should return -2 when not initialized to work
correctly.
into mysql.com:/home/svoj/devel/mysql/BUG13861/mysql-5.1-engines
mysql-test/suite/rpl/r/rpl_dual_pos_advance.result:
Auto merged
mysql-test/suite/rpl/t/rpl_dual_pos_advance.test:
SCCS merged
into dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl
mysql-test/suite/rpl/r/rpl_loaddata.result:
Auto merged
mysql-test/suite/rpl/r/rpl_master_pos_wait.result:
Auto merged
mysql-test/suite/rpl/r/rpl_slave_status.result:
Auto merged
mysql-test/suite/rpl/t/rpl_master_pos_wait.test:
Auto merged
mysql-test/suite/rpl/t/rpl_temporary.test:
Auto merged
mysql-test/suite/rpl/t/rpl_loaddata.test:
Manual merge. The rpl_loaddata.test file was moved on 5.1 by editing
the file to include the file at the new location. This causes conflicts
when merging, since the changes will not propagate to the moved file.
sql/slave.cc:
Manual merge.
mysql-test/suite/rpl/t/rpl_skip_error.test:
Manual merge.
mysql-test/suite/rpl/t/rpl_slave_status.test:
Manual merge.
Problem: rpl_variables_stm.test used a character set and a collation which
are not included on all platforms.
Fix: replace the character set and collation by ones that are included on
all platforms. (rpl_variables_stm does not rely on which character set is
used, the only important aspect is the fact that it changes.)
mysql-test/suite/rpl/r/rpl_variables_stm.result:
Updated result file.
mysql-test/suite/rpl/t/rpl_variables_stm.test:
Changed test to get rid of pushbuild errors.
into pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/merge.20080307/mysql-5.1
configure.in:
Auto merged
include/mysql/plugin.h:
Auto merged
mysql-test/r/information_schema.result:
Auto merged
mysql-test/r/partition_innodb.result:
Auto merged
mysql-test/t/information_schema.test:
Auto merged
mysql-test/t/partition_innodb.test:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/slave.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/sql_plugin.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
storage/myisam/mi_dynrec.c:
Auto merged
Problem: in mixed and statement mode, a query that refers to a
system variable will use the slave's value when replayed on
slave. So if the value of a system variable is inserted into a
table, the slave will differ from the master.
Fix: mark statements that refer to a system variable as "unsafe",
meaning they will be replicated by row in mixed mode and produce a warning
in statement mode. There are some exceptions: some variables are actually
replicated. Those should *not* be marked as unsafe.
BUG#34732: mysqlbinlog does not print default values for auto_increment variables
Problem: mysqlbinlog does not print default values for some variables,
including auto_increment_increment and others. So if a client executing
the output of mysqlbinlog has different default values, replication will
be wrong.
Fix: Always print default values for all variables that are replicated.
I need to fix the two bugs at the same time, because the test cases would
fail if I only fixed one of them.
include/m_ctype.h:
Added definition of ILLEGAL_CHARSET_INFO_NUMBER. We just need a symbol
for a number that will never be used by any charset. ~0U should be safe
since charset numbers are sequential, starting from 0.
mysql-test/include/commit.inc:
Upated test to avoid making statements unsafe.
mysql-test/r/commit_1innodb.result:
Updated test needs updated result file.
mysql-test/r/mysqlbinlog.result:
Updated result file.
mysql-test/r/mysqlbinlog2.result:
Updated result file.
mysql-test/r/user_var-binlog.result:
Updated result file.
mysql-test/suite/binlog/r/binlog_base64_flag.result:
Updated result file.
mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result:
Updated result file.
mysql-test/suite/binlog/r/binlog_unsafe.result:
Modified test file needs modified result file.
mysql-test/suite/binlog/t/binlog_base64_flag.test:
Need to filter out pseudo_thread_id from result since it is
nondeterministic.
mysql-test/suite/binlog/t/binlog_unsafe.test:
Add tests that using variables is unsafe. The 'CREATE VIEW' tests didn't
make sense, so I removed them. SHOW WARNINGS is not necessary either,
because we get warnings for each statement in the result file.
mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result:
Updated result file.
mysql-test/suite/rpl/r/rpl_skip_error.result:
Updated result file.
mysql-test/suite/rpl/t/rpl_skip_error.test:
The test used @@server_id, which is not safe to replicate, so it would
have given a warning. The way it used @@server_id was hackish (issue a
query on master that removes rows only on master), so I replaced it by a
more robust way to do the same thing (connect to slave and insert the
rows only there).
Also clarified what the test case does.
mysql-test/t/mysqlbinlog2.test:
Use --short-form instead of manually filtering out nondeterministic stuff
from mysqlbinlog (because we added the nondeterministic @@pseudo_thread_id
to the output).
sql/item_func.cc:
Added method of Item_func_get_system_var that indicates whether the given
system variable will be written to the binlog or not.
sql/item_func.h:
Added method of Item_func_get_system_var that indicates whether the given
system variable will be written to the binlog or not.
sql/log_event.cc:
- auto_increment_offset was not written to the binlog if
auto_increment_increment=1
- mysqlbinlog did not output default values for some variables
(BUG#34732). In st_print_event_info, we remember for each variable whether
it has been printed or not. This is achieved in different ways for
different variables:
- For auto_increment_*, lc_time_names, charset_database_number,
we set the default values in st_print_event_info to something
illegal, so that it will look like they have changed the first time
they are seen.
- For charset, sql_mode, pseudo_thread_id, we add a flag to
st_print_event_info which indicates whether the variable has been
printed.
- Since pseudo_thread_id is now printed more often, and its value is
not guaranteed to be constant across different runs of the same
test script, I replaced it by a constant if --short-form is used.
- Moved st_print_event_info constructor from log_event.h to log_event.cc,
since it now depends on ILLEGAL_CHARSET_NUMBER, which is defined in
m_ctype.h, which is better to include from a .cc file than from a header
file.
sql/log_event.h:
Added fields to st_print_event_info that indicate whether some of the
variables have been written or not. Since the initialization of
charset_database_number now depends on ILLEGAL_CHARSET_INFO_NUMBER, which
is defined in a header file, which we'd better not include from this
header file -- I moved the constructor from here to log_event.cc.
sql/set_var.cc:
System variables now have a flag binlog_status, which indicates if they
are written to the binlog. If nothing is specified, all variables are
marked as not written to the binlog (NOT_IN_BINLOG) when created. In this
file, the variables that are written to the binlog are marked with
SESSION_VARIABLE_IN_BINLOG.
sql/set_var.h:
Added flag binlog_status to class sys_var. Added a getter and a
constructor parameter that sets it.
Since I had to change sys_var_thd_enum constructor anyways, I simplified
it to use default values of arguments instead of three copies of the
constructor.
sql/sql_yacc.yy:
Mark statements that refer to a system variable as "unsafe",
meaning they will be replicated by row in mixed mode. Added comment to
explain strange piece of code just above.
mysql-test/include/diff_tables.inc:
New auxiliary test file that tests whether two tables (possibly one on
master and one on slave) differ.
mysql-test/suite/rpl/r/rpl_variables.result:
New test case needs new result file.
mysql-test/suite/rpl/r/rpl_variables_stm.result:
New test file needs new result file.
mysql-test/suite/rpl/t/rpl_variables.test:
Test that INSERT of @@variables is replicated correctly (by switching to
row-based mode).
mysql-test/suite/rpl/t/rpl_variables_stm.test:
Test that replication of @@variables which are replicated explicitly works
as expected in statement mode (without giving warnings).
merging and post-make-test changes.
mysql-test/suite/rpl/r/rpl_report.result:
results changed
mysql-test/suite/rpl/t/rpl_report.test:
correcting test because of non-deterministic select's result
sql/set_var.cc:
compilation issue