diff options
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/mysql-test-run.sh | 35 | ||||
-rw-r--r-- | mysql-test/r/rpl_log.result | 13 | ||||
-rw-r--r-- | mysql-test/t/rpl_log.test | 5 |
3 files changed, 33 insertions, 20 deletions
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index f2f0c2a4234..932b063cbcf 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -170,6 +170,7 @@ EXTRA_MYSQL_TEST_OPT="" USE_RUNNING_SERVER=1 DO_GCOV="" DO_GDB="" +MANUAL_GDB="" DO_DDD="" DO_CLIENT_GDB="" SLEEP_TIME_FOR_DELETE=10 @@ -272,6 +273,11 @@ while test $# -gt 0; do fi DO_CLIENT_GDB=1 ;; + --manual-gdb ) + DO_GDB=1 + MANUAL_GDB=1 + USE_RUNNING_SERVER="" + ;; --ddd ) if [ x$BINARY_DIST = x1 ] ; then $ECHO "Note: you will get more meaningful output on a source distribution compiled with debugging option when running tests with --ddd option" @@ -743,8 +749,15 @@ start_master() "gdb -x $GDB_MASTER_INIT" $MYSQLD elif [ x$DO_GDB = x1 ] then - ( echo set args $master_args; - if [ $USE_MANAGER = 0 ] ; then + if [ x$MANUAL_GDB = x1 ] + then + $ECHO "set args $master_args" > $GDB_MASTER_INIT + $ECHO "To start gdb for the master , type in another window:" + $ECHO "cd $CWD ; gdb -x $GDB_MASTER_INIT $MYSQLD" + wait_for_master=1500 + else + ( $ECHO set args $master_args; + if [ $USE_MANAGER = 0 ] ; then cat <<EOF b mysql_parse commands 1 @@ -752,9 +765,10 @@ disa 1 end r EOF - fi ) > $GDB_MASTER_INIT - manager_launch master $XTERM -display $DISPLAY \ - -title "Master" -e gdb -x $GDB_MASTER_INIT $MYSQLD + fi ) > $GDB_MASTER_INIT + manager_launch master $XTERM -display $DISPLAY \ + -title "Master" -e gdb -x $GDB_MASTER_INIT $MYSQLD + fi else manager_launch master $MYSQLD $master_args fi @@ -845,8 +859,15 @@ start_slave() elif [ x$DO_GDB = x1 ] then $ECHO "set args $slave_args" > $GDB_SLAVE_INIT - manager_launch $slave_ident $XTERM -display $DISPLAY -title "Slave" -e \ - gdb -x $GDB_SLAVE_INIT $SLAVE_MYSQLD + if [ x$MANUAL_GDB = x1 ] + then + echo "To start gdb for the slave, type in another window:" + echo "cd $CWD ; gdb -x $GDB_SLAVE_INIT $MYSQLD" + wait_for_slave=1500 + else + manager_launch $slave_ident $XTERM -display $DISPLAY -title "Slave" -e \ + gdb -x $GDB_SLAVE_INIT $SLAVE_MYSQLD + fi else manager_launch $slave_ident $SLAVE_MYSQLD $slave_args fi diff --git a/mysql-test/r/rpl_log.result b/mysql-test/r/rpl_log.result index 7052b226d12..aabfb8252e6 100644 --- a/mysql-test/r/rpl_log.result +++ b/mysql-test/r/rpl_log.result @@ -67,19 +67,6 @@ Log_name slave-bin.001 slave-bin.002 show binlog events in 'slave-bin.001' from 4; -Log_name Pos Event_type Server_id Log_seq Info -slave-bin.001 4 Start 2 1 Server ver: VERSION, Binlog ver: 2 -slave-bin.001 79 Slave 2 3 host=127.0.0.1,port=MASTER_PORT,log=master-bin.001,pos=4 -slave-bin.001 132 Query 1 2 use test; create table t1(n int not null auto_increment primary key) -slave-bin.001 225 Intvar 1 3 INSERT_ID=1 -slave-bin.001 253 Query 1 4 use test; insert into t1 values (NULL) -slave-bin.001 316 Query 1 5 use test; drop table t1 -slave-bin.001 364 Query 1 6 use test; create table t1 (word char(20) not null) -slave-bin.001 439 Create_file 1 7 db=test;table=t1;file_id=1;block_len=81 -slave-bin.001 618 Exec_load 1 8 ;file_id=1 -slave-bin.001 641 Query 1 9 use test; drop table t1 -slave-bin.001 689 Rotate 1 4 slave-bin.002;pos=4; forced by master -slave-bin.001 729 Stop 2 5 show binlog events in 'slave-bin.002' from 4; Log_name Pos Event_type Server_id Log_seq Info slave-bin.002 4 Slave 2 10 host=127.0.0.1,port=MASTER_PORT,log=master-bin.002,pos=4 diff --git a/mysql-test/t/rpl_log.test b/mysql-test/t/rpl_log.test index 1732e88b9de..e7867f83263 100644 --- a/mysql-test/t/rpl_log.test +++ b/mysql-test/t/rpl_log.test @@ -35,8 +35,13 @@ 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; |