mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
8f232cb75f
Improve mysql-test to be more robust. Fix that GRANT doesn't delete SSL options Change innobase_flush_log_at_trx_commit to uint. Don't rotate logs if we read a rotate log entry from the master. Docs/manual.texi: Changelog client/mysqlbinlog.cc: Handle empty binlogfiles gracefully client/mysqltest.c: Do a sleep after 'sync_with_master' Cleaned up sleep() handling. Free all memory on exit configure.in: Fix for Mac OS 10.2 include/my_sys.h: Added my_strdup_with_length() innobase/btr/btr0cur.c: Fixed wrong printf() libmysql/libmysql.c: Added DBUG_PRINT statements. Assume that mysql_...send() functions has correct query length. mysql-test/mysql-test-run.sh: Properly remove log files before starting new tests. mysql-test/r/grant.result: Update for new test results mysql-test/r/innodb.result: Update for new test results mysql-test/r/myisam.result: Update for new test results mysql-test/r/rpl_log.result: Update for new test results mysql-test/r/rpl_rotate_logs.result: Update for new test results mysql-test/r/variables.result: Update for new test results mysql-test/t/grant.test: Test that GRANT doesn't delete SSL options mysql-test/t/myisam.test: Test long key usage mysql-test/t/rpl_log.test: Disable 'show new master' mysql-test/t/rpl_mystery22.test: Longer sleep for more safety. mysql-test/t/rpl_rotate_logs.test: More comments mysys/my_malloc.c: Added my_strdup_with_length() mysys/safemalloc.c: Added my_strdup_with_length() mysys/thr_alarm.c: Fix of alarms for windows. sql/ha_innodb.cc: Change innobase_flush_log_at_trx_commit to uint mysql-test/r/rpl_redirect.result: Updated test results mysql-test/t/rpl_redirect.test: Added more tests to improve code coverage. sql/ha_innodb.h: Change innobase_flush_log_at_trx_commit to uint sql/item_func.cc: Return GLOBAL and SESSION as part of column names sql/log.cc: Only write STOP events when server goes down. sql/log_event.cc: Don't rotate logs if we read a rotate log entry from the master. sql/log_event.h: Change ident_len to uint (more efficient) sql/mysqld.cc: Change innobase_flush_log_at_trx_commit to uint sql/net_serv.cc: More debug output sql/repl_failsafe.cc: More DEBUG Search until we find next position in binary log (and not only =) sql/slave.cc: More DBUG & comments Don't rotate the binary log on master flush logs sql/slave.h: indentation change sql/sql_acl.cc: Test that GRANT doesn't delete SSL options sql/sql_parse.cc: Disable show_new_master. sql/sql_repl.cc: Chamger show_binlog_events() to use my_error() sql/sql_table.cc: Fixed check for too long keys in MyISAM sql/sql_udf.cc: Fix udf handling
43 lines
1.2 KiB
Text
43 lines
1.2 KiB
Text
# test case to make slave thread get ahead by 22 bytes
|
|
|
|
source include/master-slave.inc;
|
|
|
|
# first, cause a duplicate key problem on the slave
|
|
create table t1(n int auto_increment primary key);
|
|
save_master_pos;
|
|
connection slave;
|
|
sync_with_master;
|
|
insert into t1 values (2);
|
|
connection master;
|
|
insert into t1 values(NULL);
|
|
insert into t1 values(NULL);
|
|
save_master_pos;
|
|
connection slave;
|
|
sleep 3; # there is no way around this sleep - we have to wait until
|
|
# the slave tries to run the query, fails and aborts slave thread
|
|
delete from t1 where n = 2;
|
|
slave start;
|
|
sync_with_master;
|
|
#now the buggy slave would be confused on the offset but it can replicate
|
|
#in order to make it break, we need to stop/start the slave one more time
|
|
slave stop;
|
|
connection master;
|
|
# to be able to really confuse the slave, we need some non-auto-increment
|
|
# events in the log
|
|
create table t2(n int);
|
|
drop table t2;
|
|
insert into t1 values(NULL);
|
|
save_master_pos;
|
|
connection slave;
|
|
slave start;
|
|
#now the truth comes out - if the slave is buggy, it will never sync because
|
|
#the slave thread is not able to read events
|
|
sync_with_master;
|
|
select * from t1;
|
|
#clean up
|
|
connection master;
|
|
drop table t1;
|
|
save_master_pos;
|
|
connection slave;
|
|
sync_with_master;
|
|
|