diff options
author | monty@mashka.mysql.fi <> | 2002-08-23 21:41:27 +0300 |
---|---|---|
committer | monty@mashka.mysql.fi <> | 2002-08-23 21:41:27 +0300 |
commit | b8bf46ca9b7f42667b5701e025fd4c145c62bbd5 (patch) | |
tree | 0beec75f4ab1ec4f2e53f7500bcbfa342f9a1680 /mysql-test | |
parent | fb3f13aa48377150ea133321c1db5a4946fe2087 (diff) | |
download | mariadb-git-b8bf46ca9b7f42667b5701e025fd4c145c62bbd5.tar.gz |
Added testing of temporary tables with replication
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/rpl_rotate_logs.result (renamed from mysql-test/r/rpl000016.result) | 12 | ||||
-rw-r--r-- | mysql-test/t/rpl000018.test | 5 | ||||
-rw-r--r-- | mysql-test/t/rpl_rotate_logs-master.opt (renamed from mysql-test/t/rpl000016-master.opt) | 0 | ||||
-rw-r--r-- | mysql-test/t/rpl_rotate_logs-slave-master-info.opt (renamed from mysql-test/t/rpl000016-slave-master-info.opt) | 0 | ||||
-rwxr-xr-x | mysql-test/t/rpl_rotate_logs-slave.sh (renamed from mysql-test/t/rpl000016-slave.sh) | 0 | ||||
-rw-r--r-- | mysql-test/t/rpl_rotate_logs.test (renamed from mysql-test/t/rpl000016.test) | 51 |
6 files changed, 57 insertions, 11 deletions
diff --git a/mysql-test/r/rpl000016.result b/mysql-test/r/rpl_rotate_logs.result index 1390291f1e8..cf432d07b08 100644 --- a/mysql-test/r/rpl000016.result +++ b/mysql-test/r/rpl_rotate_logs.result @@ -1,5 +1,5 @@ Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter -127.0.0.1 root 9999 60 master-bin.001 216 Yes 0 0 +127.0.0.1 root 9999 60 master-bin.001 387 Yes 0 0 s Could not break slave Tried hard @@ -7,10 +7,12 @@ Log_name master-bin.001 master-bin.002 master-bin.003 +a +testing temporary tables Log_name master-bin.003 Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter -127.0.0.1 root 9999 60 master-bin.003 206 Yes 0 0 +127.0.0.1 root 9999 60 master-bin.003 329 Yes 0 0 m 34 65 @@ -23,8 +25,10 @@ master-bin.004 master-bin.005 master-bin.006 File Position Binlog_do_db Binlog_ignore_db -master-bin.006 131 +master-bin.006 490 +a +testing temporary tables part 2 Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter -127.0.0.1 root 9999 60 master-bin.006 131 Yes 0 0 +127.0.0.1 root 9999 60 master-bin.006 490 Yes 0 0 count(*) 100 diff --git a/mysql-test/t/rpl000018.test b/mysql-test/t/rpl000018.test index 44236323d1d..e1204bad975 100644 --- a/mysql-test/t/rpl000018.test +++ b/mysql-test/t/rpl000018.test @@ -1,3 +1,8 @@ +# +# Running test with abort-slave-event-count=1 +# This will force slave to reconnect after every event +# + connect (master,localhost,root,,test,0,mysql-master.sock); connect (slave,localhost,root,,test,0,mysql-slave.sock); connection slave; diff --git a/mysql-test/t/rpl000016-master.opt b/mysql-test/t/rpl_rotate_logs-master.opt index f27601e0d7d..f27601e0d7d 100644 --- a/mysql-test/t/rpl000016-master.opt +++ b/mysql-test/t/rpl_rotate_logs-master.opt diff --git a/mysql-test/t/rpl000016-slave-master-info.opt b/mysql-test/t/rpl_rotate_logs-slave-master-info.opt index 80190bf6d29..80190bf6d29 100644 --- a/mysql-test/t/rpl000016-slave-master-info.opt +++ b/mysql-test/t/rpl_rotate_logs-slave-master-info.opt diff --git a/mysql-test/t/rpl000016-slave.sh b/mysql-test/t/rpl_rotate_logs-slave.sh index 62748605af1..62748605af1 100755 --- a/mysql-test/t/rpl000016-slave.sh +++ b/mysql-test/t/rpl_rotate_logs-slave.sh diff --git a/mysql-test/t/rpl000016.test b/mysql-test/t/rpl_rotate_logs.test index c9b6ccabcd2..ab88def5b2d 100644 --- a/mysql-test/t/rpl000016.test +++ b/mysql-test/t/rpl_rotate_logs.test @@ -1,3 +1,14 @@ +# +# Test are run with max_binlog_size=2048 to force automatic rotation of the +# binary log +# Tests done: +# - Check that slaves reports correct failures if master.info has strange +# modes/information +# - Automatic binary log rotation +# - Ensure that temporary tables works over flush logs and binary log +# changes +# - Test creating a duplicate key error and recover from it +# connect (master,localhost,root,,test,0,mysql-master.sock); connect (slave,localhost,root,,test,0,mysql-slave.sock); system cat /dev/null > var/slave-data/master.info; @@ -16,7 +27,14 @@ reset master; connection slave; slave start; connection master; -drop table if exists t1; + +drop table if exists t1, t2, t3, t4; + +# +# Test FLUSH LOGS +# +create temporary table temp_table (a char(80) not null); +insert into temp_table values ("testing temporary tables"); create table t1 (s text); insert into t1 values('Could not break slave'),('Tried hard'); save_master_pos; @@ -30,15 +48,24 @@ flush logs; drop table if exists t2; create table t2(m int not null auto_increment primary key); insert into t2 values (34),(67),(123); -save_master_pos; flush logs; show master logs; +create table t3 select * from temp_table; -#now lets make some duplicate key mess and see if we can recover from it - -#first insert a value on the slave +save_master_pos; connection slave; sync_with_master; + +select * from t3; +connection master; +drop table temp_table, t3; + +# +# Now lets make some duplicate key mess and see if we can recover from it +# + +# First insert a value on the slave +connection slave; insert into t2 values(1234); #same value on the master @@ -72,7 +99,14 @@ sync_with_master; --replace_result 9306 9999 3334 9999 3335 9999 show slave status; select * from t2; + +# +# Test forcing the replication log to rotate +# + connection master; +create temporary table temp_table (a char(80) not null); +insert into temp_table values ("testing temporary tables part 2"); let $1=100; drop table if exists t3; create table t3 (n int); @@ -82,13 +116,16 @@ while ($1) eval insert into t3 values($1 + 4); dec $1; } +create table t4 select * from temp_table; show master logs; show master status; save_master_pos; connection slave; -slave stop; -slave start; +#slave stop; +#slave start; sync_with_master; +select * from t4; + --replace_result 9306 9999 3334 9999 3335 9999 show slave status; # because of concurrent insert, the table may not be up to date |