diff options
author | unknown <monty@mashka.mysql.fi> | 2002-09-11 06:40:08 +0300 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2002-09-11 06:40:08 +0300 |
commit | 8f232cb75f0dce72142e2b584f2cdac4a1de517d (patch) | |
tree | 6ef035adfec09ec1e444dd169712750e2de1efeb /mysql-test | |
parent | d99cab040c90913cc5186702166d3b91f58ef42a (diff) | |
download | mariadb-git-8f232cb75f0dce72142e2b584f2cdac4a1de517d.tar.gz |
Portability fixes.
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
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/mysql-test-run.sh | 9 | ||||
-rw-r--r-- | mysql-test/r/grant.result | 3 | ||||
-rw-r--r-- | mysql-test/r/innodb.result | 2 | ||||
-rw-r--r-- | mysql-test/r/myisam.result | 6 | ||||
-rw-r--r-- | mysql-test/r/rpl_flush_log_loop.result | 17 | ||||
-rw-r--r-- | mysql-test/r/rpl_log.result | 47 | ||||
-rw-r--r-- | mysql-test/r/rpl_magic.result | 37 | ||||
-rw-r--r-- | mysql-test/r/rpl_redirect.result | 43 | ||||
-rw-r--r-- | mysql-test/r/rpl_rotate_logs.result | 6 | ||||
-rw-r--r-- | mysql-test/r/variables.result | 2 | ||||
-rw-r--r-- | mysql-test/t/grant.test | 1 | ||||
-rw-r--r-- | mysql-test/t/myisam.test | 10 | ||||
-rw-r--r-- | mysql-test/t/rpl_flush_log_loop-master.opt | 1 | ||||
-rw-r--r-- | mysql-test/t/rpl_flush_log_loop-slave.opt | 1 | ||||
-rw-r--r-- | mysql-test/t/rpl_flush_log_loop.test | 17 | ||||
-rw-r--r-- | mysql-test/t/rpl_log.test | 40 | ||||
-rw-r--r-- | mysql-test/t/rpl_mystery22.test | 2 | ||||
-rw-r--r-- | mysql-test/t/rpl_redirect.test (renamed from mysql-test/t/rpl_magic.test) | 13 | ||||
-rw-r--r-- | mysql-test/t/rpl_rotate_logs.test | 7 |
19 files changed, 169 insertions, 95 deletions
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 9a825ea125e..b51d5fff70b 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -742,6 +742,8 @@ start_master() $RM -f $MASTER_MYDDIR/log.* # Remove stale binary logs $RM -f $MYSQL_TEST_DIR/var/log/master-bin.* + # Remove old master.info files + $RM -f $MYSQL_TEST_DIR/var/master-data/master.info #run master initialization shell script if one exists @@ -858,8 +860,9 @@ start_slave() slave_pid=$SLAVE_MYPID slave_sock="$SLAVE_MYSOCK" fi - # Remove stale binary logs - $RM -f $MYSQL_TEST_DIR/var/log/$slave_ident-bin.* + # Remove stale binary logs and old master.info files + $RM -f $MYSQL_TEST_DIR/var/log/$slave_ident-*bin.* + $RM -f $MYSQL_TEST_DIR/$slave_datadir/master.info #run slave initialization shell script if one exists if [ -f "$slave_init_script" ] ; @@ -1089,8 +1092,8 @@ run_testcase () start_master fi fi - do_slave_restart=0 + do_slave_restart=0 if [ -f $slave_opt_file ] ; then EXTRA_SLAVE_OPT=`$CAT $slave_opt_file | $SED -e "s;\\$MYSQL_TEST_DIR;$MYSQL_TEST_DIR;"` diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result index c08f6094080..c77884adfb0 100644 --- a/mysql-test/r/grant.result +++ b/mysql-test/r/grant.result @@ -7,6 +7,9 @@ Grants for mysqltest_1@localhost GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA' GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' grant delete on mysqltest.* to mysqltest_1@localhost; +select * from mysql.user where user="mysqltest_1"; +Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections +localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N SPECIFIED EDH-RSA-DES-CBC3-SHA 0 0 0 show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA' diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 4224db7c072..78b0da2769e 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -987,7 +987,7 @@ create table t1 (id int unsigned not null auto_increment, code tinyint unsigned BEGIN; SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE; SELECT @@tx_isolation,@@global.tx_isolation; -@@tx_isolation @@tx_isolation +@@tx_isolation @@global.tx_isolation SERIALIZABLE READ-COMMITTED insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David'); select id, code, name from t1 order by id; diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 1d66c4cc03d..739a47b41f1 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -108,3 +108,9 @@ OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize status OK DROP TABLE t1; +CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), KEY t1 (a, b, c)); +Specified key was too long. Max key length is 500 +CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255)); +ALTER TABLE t1 ADD INDEX t1 (a, b, c); +Specified key was too long. Max key length is 500 +DROP TABLE t1; diff --git a/mysql-test/r/rpl_flush_log_loop.result b/mysql-test/r/rpl_flush_log_loop.result new file mode 100644 index 00000000000..40b4ca72f01 --- /dev/null +++ b/mysql-test/r/rpl_flush_log_loop.result @@ -0,0 +1,17 @@ +slave stop; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +slave start; +change master to master_host='127.0.0.1',master_user='root', +master_password='',master_port=9306; +slave start; +slave stop; +change master to master_host='127.0.0.1',master_user='root', +master_password='',master_port=9307; +slave start; +flush logs; +show slave status; +Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space +127.0.0.1 root 9307 60 slave-bin.001 79 mashka-relay-bin.001 119 slave-bin.001 Yes Yes 0 0 79 119 diff --git a/mysql-test/r/rpl_log.result b/mysql-test/r/rpl_log.result index 8948460e1bd..7d1843f95fc 100644 --- a/mysql-test/r/rpl_log.result +++ b/mysql-test/r/rpl_log.result @@ -8,7 +8,6 @@ slave stop; reset master; reset slave; reset master; -drop table if exists t1; create table t1(n int not null auto_increment primary key); insert into t1 values (NULL); drop table t1; @@ -37,6 +36,9 @@ show binlog events from 79 limit 2,1; Log_name Pos Event_type Server_id Orig_log_pos Info master-bin.001 200 Query 1 200 use test; insert into t1 values (NULL) flush logs; +slave start; +flush logs; +slave stop; create table t1 (n int); insert into t1 values (1); drop table t1; @@ -52,7 +54,6 @@ master-bin.001 386 Create_file 1 386 db=test;table=t1;file_id=1;block_len=81 master-bin.001 556 Exec_load 1 556 ;file_id=1 master-bin.001 579 Query 1 579 use test; drop table t1 master-bin.001 627 Rotate 1 627 master-bin.002;pos=4 -master-bin.001 668 Stop 1 668 show binlog events in 'master-bin.002'; Log_name Pos Event_type Server_id Orig_log_pos Info master-bin.002 4 Query 1 4 use test; create table t1 (n int) @@ -68,32 +69,24 @@ Log_name slave-bin.001 slave-bin.002 show binlog events in 'slave-bin.001' from 4; +Log_name Pos Event_type Server_id Orig_log_pos Info +slave-bin.001 4 Start 2 4 Server ver: VERSION, Binlog ver: 3 +slave-bin.001 79 Query 1 79 use test; create table t1(n int not null auto_increment primary key) +slave-bin.001 172 Intvar 1 200 INSERT_ID=1 +slave-bin.001 200 Query 1 200 use test; insert into t1 values (NULL) +slave-bin.001 263 Query 1 263 use test; drop table t1 +slave-bin.001 311 Query 1 311 use test; create table t1 (word char(20) not null) +slave-bin.001 386 Create_file 1 386 db=test;table=t1;file_id=1;block_len=81 +slave-bin.001 565 Exec_load 1 556 ;file_id=1 +slave-bin.001 588 Query 1 579 use test; drop table t1 +slave-bin.001 636 Rotate 2 636 slave-bin.002;pos=4 show binlog events in 'slave-bin.002' from 4; Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.002 4 Slave 2 627 host=127.0.0.1,port=MASTER_PORT,log=master-bin.002,pos=4 -slave-bin.002 57 Query 1 4 use test; create table t1 (n int) -slave-bin.002 115 Query 1 62 use test; insert into t1 values (1) -slave-bin.002 175 Query 1 122 use test; drop table t1 +slave-bin.002 4 Query 1 4 use test; create table t1 (n int) +slave-bin.002 62 Query 1 62 use test; insert into t1 values (1) +slave-bin.002 122 Query 1 122 use test; drop table t1 show slave status; Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space -127.0.0.1 root MASTER_PORT 1 master-bin.002 170 slave-relay-bin.002 916 master-bin.002 Yes Yes 0 0 170 920 -show new master for slave with master_log_file='master-bin.001' and -master_log_pos=4 and master_server_id=1; -Log_name Log_pos -slave-bin.001 132 -show new master for slave with master_log_file='master-bin.001' and -master_log_pos=79 and master_server_id=1; -Log_name Log_pos -slave-bin.001 225 -show new master for slave with master_log_file='master-bin.001' and -master_log_pos=311 and master_server_id=1; -Log_name Log_pos -slave-bin.001 439 -show new master for slave with master_log_file='master-bin.002' and -master_log_pos=4 and master_server_id=1; -Log_name Log_pos -slave-bin.002 57 -show new master for slave with master_log_file='master-bin.002' and -master_log_pos=122 and master_server_id=1; -Log_name Log_pos -slave-bin.002 223 +127.0.0.1 root MASTER_PORT 1 master-bin.002 170 slave-relay-bin.002 957 master-bin.002 Yes Yes 0 0 170 961 +show binlog events in 'slave-bin.005' from 4; +Error when executing command SHOW BINLOG EVENTS: Could not find target log diff --git a/mysql-test/r/rpl_magic.result b/mysql-test/r/rpl_magic.result deleted file mode 100644 index 743bef4a053..00000000000 --- a/mysql-test/r/rpl_magic.result +++ /dev/null @@ -1,37 +0,0 @@ -slave stop; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -slave start; -drop table if exists t1; -create table t1 ( n int); -insert into t1 values (1),(2),(3),(4); -insert into t1 values(5); -select * from t1; -n -1 -2 -3 -4 -5 -select * from t1; -n -1 -2 -3 -4 -select * from t1; -n -1 -2 -3 -4 -select * from t1; -n -1 -2 -3 -4 -5 -drop table t1; diff --git a/mysql-test/r/rpl_redirect.result b/mysql-test/r/rpl_redirect.result new file mode 100644 index 00000000000..6103a075684 --- /dev/null +++ b/mysql-test/r/rpl_redirect.result @@ -0,0 +1,43 @@ +slave stop; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +slave start; +SHOW SLAVE STATUS; +Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space +SHOW SLAVE HOSTS; +Server_id Host Port Rpl_recovery_rank Master_id +2 127.0.0.1 SLAVE_PORT 2 1 +drop table if exists t1; +create table t1 ( n int); +insert into t1 values (1),(2),(3),(4); +insert into t1 values(5); +select * from t1; +n +1 +2 +3 +4 +5 +select * from t1; +n +1 +2 +3 +4 +select * from t1; +n +1 +2 +3 +4 +select * from t1; +n +1 +2 +3 +4 +5 +drop table t1; +drop table t1; diff --git a/mysql-test/r/rpl_rotate_logs.result b/mysql-test/r/rpl_rotate_logs.result index d440e157ed4..6c1a0082703 100644 --- a/mysql-test/r/rpl_rotate_logs.result +++ b/mysql-test/r/rpl_rotate_logs.result @@ -2,12 +2,10 @@ slave start; Could not initialize master info structure, check permisions on master.info slave start; Could not initialize master info structure, check permisions on master.info -change master to master_host='127.0.0.1',master_port=MASTER_PORT, -master_user='root'; +change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root'; Could not initialize master info reset slave; -change master to master_host='127.0.0.1',master_port=MASTER_PORT, -master_user='root'; +change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root'; reset master; slave start; drop table if exists t1, t2, t3, t4; diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index 516204028fe..f708ddd2ee7 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -65,7 +65,7 @@ Variable_name Value max_join_size 4294967295 set @@max_join_size=1000, @@global.max_join_size=2000; select @@local.max_join_size, @@global.max_join_size; -@@max_join_size @@max_join_size +@@session.max_join_size @@global.max_join_size 1000 2000 select @@identity, length(@@version)>0; @@identity length(@@version)>0 diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test index be1b09a9b78..c75069f8c55 100644 --- a/mysql-test/t/grant.test +++ b/mysql-test/t/grant.test @@ -8,6 +8,7 @@ flush privileges; grant select on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA"; show grants for mysqltest_1@localhost; grant delete on mysqltest.* to mysqltest_1@localhost; +select * from mysql.user where user="mysqltest_1"; show grants for mysqltest_1@localhost; revoke delete on mysqltest.* from mysqltest_1@localhost; show grants for mysqltest_1@localhost; diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index dec53e92036..cba7b522650 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -104,3 +104,13 @@ INSERT INTO t1 VALUES (1), (2), (3); OPTIMIZE TABLE t1; DROP TABLE t1; +# +# Test of creating table with too long key +# + +--error 1071 +CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), KEY t1 (a, b, c)); +CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255)); +--error 1071 +ALTER TABLE t1 ADD INDEX t1 (a, b, c); +DROP TABLE t1; diff --git a/mysql-test/t/rpl_flush_log_loop-master.opt b/mysql-test/t/rpl_flush_log_loop-master.opt new file mode 100644 index 00000000000..eb35347af33 --- /dev/null +++ b/mysql-test/t/rpl_flush_log_loop-master.opt @@ -0,0 +1 @@ +-O max_binlog_size=1M diff --git a/mysql-test/t/rpl_flush_log_loop-slave.opt b/mysql-test/t/rpl_flush_log_loop-slave.opt new file mode 100644 index 00000000000..eb35347af33 --- /dev/null +++ b/mysql-test/t/rpl_flush_log_loop-slave.opt @@ -0,0 +1 @@ +-O max_binlog_size=1M diff --git a/mysql-test/t/rpl_flush_log_loop.test b/mysql-test/t/rpl_flush_log_loop.test new file mode 100644 index 00000000000..2b559180a42 --- /dev/null +++ b/mysql-test/t/rpl_flush_log_loop.test @@ -0,0 +1,17 @@ +# Testing if "flush logs" command bouncing resulting in logs created in a loop +# in case of bi-directional replication + +source include/master-slave.inc + +connection slave; +eval change master to master_host='127.0.0.1',master_user='root', + master_password='',master_port=$MASTER_MYPORT; +slave start; +connection master; +slave stop; +eval change master to master_host='127.0.0.1',master_user='root', + master_password='',master_port=$SLAVE_MYPORT; +slave start; +flush logs; +sleep 5; +show slave status; diff --git a/mysql-test/t/rpl_log.test b/mysql-test/t/rpl_log.test index 3514d435737..85782e78142 100644 --- a/mysql-test/t/rpl_log.test +++ b/mysql-test/t/rpl_log.test @@ -9,7 +9,6 @@ let $VERSION=`select version()`; connection master; reset master; -drop table if exists t1; create table t1(n int not null auto_increment primary key); insert into t1 values (NULL); drop table t1; @@ -22,6 +21,19 @@ show binlog events from 79 limit 1; show binlog events from 79 limit 2; show binlog events from 79 limit 2,1; flush logs; + +# Sync slave and force it to start on another binary log + +save_master_pos; +connection slave; +slave start; +sync_with_master; +flush logs; +slave stop; +connection master; + +# Create some entries for second log + create table t1 (n int); insert into t1 values (1); drop table t1; @@ -35,23 +47,19 @@ slave start; sync_with_master; show master logs; --replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT $VERSION VERSION -# We can't compare binlog from slave as the result differ between -# machines based on where the LOAD DATA file is stored. -disable_result_log; - show binlog events in 'slave-bin.001' from 4; --replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT $VERSION VERSION -enable_result_log; show binlog events in 'slave-bin.002' from 4; --replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT show slave status; -show new master for slave with master_log_file='master-bin.001' and - master_log_pos=4 and master_server_id=1; -show new master for slave with master_log_file='master-bin.001' and - master_log_pos=79 and master_server_id=1; -show new master for slave with master_log_file='master-bin.001' and - master_log_pos=311 and master_server_id=1; -show new master for slave with master_log_file='master-bin.002' and - master_log_pos=4 and master_server_id=1; -show new master for slave with master_log_file='master-bin.002' and - master_log_pos=122 and master_server_id=1; + +# Need to recode the following + +#show new master for slave with master_log_file='master-bin.001' and master_log_pos=4 and master_server_id=1; +#show new master for slave with master_log_file='master-bin.001' and master_log_pos=79 and master_server_id=1; +#show new master for slave with master_log_file='master-bin.001' and master_log_pos=311 and master_server_id=1; +#show new master for slave with master_log_file='master-bin.002' and master_log_pos=4 and master_server_id=1; +#show new master for slave with master_log_file='master-bin.002' and master_log_pos=122 and master_server_id=1; + +--error 1220 +show binlog events in 'slave-bin.005' from 4; diff --git a/mysql-test/t/rpl_mystery22.test b/mysql-test/t/rpl_mystery22.test index 371c5ba21ed..5280cb360dd 100644 --- a/mysql-test/t/rpl_mystery22.test +++ b/mysql-test/t/rpl_mystery22.test @@ -13,7 +13,7 @@ insert into t1 values(NULL); insert into t1 values(NULL); save_master_pos; connection slave; -sleep 1; # there is no way around this sleep - we have to wait until +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; diff --git a/mysql-test/t/rpl_magic.test b/mysql-test/t/rpl_redirect.test index c93add93d9d..4082542f295 100644 --- a/mysql-test/t/rpl_magic.test +++ b/mysql-test/t/rpl_redirect.test @@ -1,3 +1,7 @@ +# +# Test of automatic redirection of queries to master/slave. +# + source include/master-slave.inc; #first, make sure the slave has had enough time to register @@ -7,6 +11,10 @@ sync_with_master; #discover slaves connection master; +--replace_result $MASTER_MYPORT MASTER_PORT +SHOW SLAVE STATUS; +--replace_result $SLAVE_MYPORT SLAVE_PORT +SHOW SLAVE HOSTS; rpl_probe; #turn on master/slave query direction auto-magic @@ -16,11 +24,12 @@ create table t1 ( n int); insert into t1 values (1),(2),(3),(4); disable_rpl_parse; save_master_pos; -enable_rpl_parse; connection slave; sync_with_master; insert into t1 values(5); connection master; +enable_rpl_parse; +# The first of the queries will be sent to the slave, the second to the master. select * from t1; select * from t1; disable_rpl_parse; @@ -28,3 +37,5 @@ select * from t1; connection slave; select * from t1; drop table t1; +connection master; +drop table t1; diff --git a/mysql-test/t/rpl_rotate_logs.test b/mysql-test/t/rpl_rotate_logs.test index cea2f9008dc..f6fbb76e55e 100644 --- a/mysql-test/t/rpl_rotate_logs.test +++ b/mysql-test/t/rpl_rotate_logs.test @@ -20,12 +20,11 @@ system chmod 600 var/slave-data/master.info; --error 1201 slave start; --replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT -!eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, - master_user='root'; +# Will get error 13 on Unix systems becasue file is not readable +!eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, master_user='root'; reset slave; --replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT -eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, - master_user='root'; +eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, master_user='root'; connection master; reset master; connection slave; |