mirror of
https://github.com/MariaDB/server.git
synced 2025-07-02 14:22:51 +03:00
Replication: small bug fixes in mysql-test-run.sh and in replication code (more reinitializations)
+ fix for #70 + test result fix for LOAD DATA LOCAL bug #82 client/mysqltest.c: Removed wrong comment and useless sleep mysql-test/mysql-test-run.sh: Fix $slave_datadir variable because this if [ -n "$1" ] ; slave_datadir="var/$slave_ident-data/" else slave_datadir=$SLAVE_MYDDIR was not coherent and led to problems of master.info not being deleted. Delete relay-log.info too. mysql-test/r/rpl000001.result: SUM is 1022 (1021 was when we had the LOAD DATA LOCAL bug #82). It's logical to have an even number as we load the same file twice. sql/slave.cc: When we RESET SLAVE, clear rli->master_log_* to give a good display in SHOW SLAVE STATUS ; seeing the old values may confuse the user. When we START SLAVE, clear rli->master_log_name, not only rli->master_log_pos. sql/sql_repl.cc: When we RESET SLAVE, clear mi->master_log_* to give a good display in SHOW SLAVE STATUS (bug #70)
This commit is contained in:
@ -810,8 +810,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
|
||||
# Remove old master.info and relay-log.info files
|
||||
$RM -f $MYSQL_TEST_DIR/var/master-data/master.info $MYSQL_TEST_DIR/var/master-data/relay-log.info
|
||||
|
||||
#run master initialization shell script if one exists
|
||||
|
||||
@ -915,7 +915,7 @@ start_slave()
|
||||
slave_port=`expr $SLAVE_MYPORT + $1`
|
||||
slave_log="$SLAVE_MYLOG.$1"
|
||||
slave_err="$SLAVE_MYERR.$1"
|
||||
slave_datadir="var/$slave_ident-data/"
|
||||
slave_datadir="$SLAVE_MYDDIR/../$slave_ident-data/"
|
||||
slave_pid="$MYRUN_DIR/mysqld-$slave_ident.pid"
|
||||
slave_sock="$SLAVE_MYSOCK-$1"
|
||||
else
|
||||
@ -930,7 +930,7 @@ start_slave()
|
||||
fi
|
||||
# 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
|
||||
$RM -f $slave_datadir/master.info $slave_datadir/relay-log.info
|
||||
|
||||
#run slave initialization shell script if one exists
|
||||
if [ -f "$slave_init_script" ] ;
|
||||
|
Reference in New Issue
Block a user