Commit 8e43ad12 authored by sasha@mysql.sashanet.com's avatar sasha@mysql.sashanet.com
Browse files

post-merge fixes, including slave-skip-errors backport

fixed too quick timeout in mysql-test-run which caused a race with the
 new server getting started before the old one completely finished 
 shutdown. This should fix the pid warning we've been getting as well as
 inconsistent results when running tests with the manager
parent 684f13ef
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -402,9 +402,6 @@ int STDCALL mysql_server_init(int argc, char **argv, char **groups)
  (void) pthread_mutex_init(&LOCK_bytes_sent,MY_MUTEX_INIT_FAST);
  (void) pthread_mutex_init(&LOCK_bytes_received,MY_MUTEX_INIT_FAST);
  (void) pthread_mutex_init(&LOCK_timezone,MY_MUTEX_INIT_FAST);
  (void) pthread_mutex_init(&LOCK_slave_io, MY_MUTEX_INIT_FAST);
  (void) pthread_mutex_init(&LOCK_slave_sql, MY_MUTEX_INIT_FAST);
  (void) pthread_mutex_init(&LOCK_server_id, MY_MUTEX_INIT_FAST);
  (void) pthread_mutex_init(&LOCK_user_conn, MY_MUTEX_INIT_FAST);
  (void) pthread_cond_init(&COND_thread_count,NULL);
  (void) pthread_cond_init(&COND_refresh,NULL);
@@ -412,11 +409,6 @@ int STDCALL mysql_server_init(int argc, char **argv, char **groups)
  (void) pthread_cond_init(&COND_flush_thread_cache,NULL);
  (void) pthread_cond_init(&COND_manager,NULL);
  (void) pthread_cond_init(&COND_binlog_update, NULL);
  (void) pthread_cond_init(&COND_slave_log_update, NULL);
  (void) pthread_cond_init(&COND_slave_sql_stop, NULL);
  (void) pthread_cond_init(&COND_slave_sql_start, NULL);
  (void) pthread_cond_init(&COND_slave_sql_stop, NULL);
  (void) pthread_cond_init(&COND_slave_sql_start, NULL);

  if (set_default_charset_by_name(default_charset, MYF(MY_WME)))
  {
+5 −5
Original line number Diff line number Diff line
@@ -149,6 +149,7 @@ SLAVE_LOAD_TMPDIR=../../var/tmp #needs to be same length to test logging
RES_SPACE="      "
MYSQLD_SRC_DIRS="strings mysys include extra regex isam merge myisam \
 myisammrg heap sql"
MY_LOG_DIR="$MYSQL_TEST_DIR/var/log" 
#
# Set LD_LIBRARY_PATH if we are using shared libraries
#
@@ -181,8 +182,8 @@ SLEEP_TIME_FOR_FIRST_SLAVE=400
SLEEP_TIME_FOR_SECOND_SLAVE=30
CHARACTER_SET=latin1
DBUSER=""
START_WAIT_TIMEOUT=3
STOP_WAIT_TIMEOUT=3
START_WAIT_TIMEOUT=10
STOP_WAIT_TIMEOUT=10

while test $# -gt 0; do
  case "$1" in
@@ -521,7 +522,7 @@ report_stats () {
	deci=`$EXPR $raw - $xwhole`
	$ECHO  "Failed ${TOT_FAIL}/${TOT_TEST} tests, ${whole}.${deci}% successful."
	$ECHO ""
        $ECHO "The log files in $MYSQL_TEST_DIR/var/log may give you some hint"
        $ECHO "The log files in $MY_LOG_DIR may give you some hint"
	$ECHO "of what when wrong."
	$ECHO "If you want to report this error, please read first the documentation at"
        $ECHO "http://www.mysql.com/doc/M/y/MySQL_test_suite.html"
@@ -530,8 +531,7 @@ report_stats () {

mysql_install_db () {
    $ECHO "Removing Stale Files"
    $RM -rf $MASTER_MYDDIR $SLAVE_MYDDIR $SLAVE_MYLOG $MASTER_MYLOG \
     $SLAVE_MYERR $MASTER_MYERR
    $RM -rf $MASTER_MYDDIR $SLAVE_MYDDIR $MY_LOG_DIR/* 
    $ECHO "Installing Master Databases"
    $INSTALL_DB
    if [ $? != 0 ]; then
+4 −4
Original line number Diff line number Diff line
@@ -8,21 +8,21 @@ File Position Binlog_do_db Binlog_ignore_db
master-bin.001	79		
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
127.0.0.1	root	9306	1	master-bin.001	79	mysql-relay-bin.002	120	master-bin.001	Yes	Yes			0		0	79
127.0.0.1	root	MASTER_PORT	1	master-bin.001	79	mysql-relay-bin.002	120	master-bin.001	Yes	Yes			0		0	79
change master to master_log_pos=73;
slave stop;
change master to master_log_pos=73;
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
127.0.0.1	root	9306	1	master-bin.001	73	mysql-relay-bin.001	4	master-bin.001	No	No			0		0	73
127.0.0.1	root	MASTER_PORT	1	master-bin.001	73	mysql-relay-bin.001	4	master-bin.001	No	No			0		0	73
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
127.0.0.1	root	9306	1	master-bin.001	73	mysql-relay-bin.001	4	master-bin.001	Yes	Yes			0		0	73
127.0.0.1	root	MASTER_PORT	1	master-bin.001	73	mysql-relay-bin.001	4	master-bin.001	Yes	Yes			0		0	73
change master to master_log_pos=173;
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
127.0.0.1	root	9306	1	master-bin.001	173	mysql-relay-bin.001	4	master-bin.001	Yes	Yes			0		0	173
127.0.0.1	root	MASTER_PORT	1	master-bin.001	173	mysql-relay-bin.001	4	master-bin.001	Yes	Yes			0		0	173
show master status;
File	Position	Binlog_do_db	Binlog_ignore_db
master-bin.001	79		
+4 −4
Original line number Diff line number Diff line
@@ -9,16 +9,16 @@ Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Lo
change master to master_host='127.0.0.1';
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
127.0.0.1	test	3306	60		4	mysql-relay-bin.001	4		No	No			0		0	0
127.0.0.1	test	MASTER_PORT	60		4	mysql-relay-bin.001	4		No	No			0		0	0
change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=9306;
master_password='',master_port=MASTER_PORT;
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
127.0.0.1	root	9306	60		4	mysql-relay-bin.001	4		No	No			0		0	0
127.0.0.1	root	MASTER_PORT	60		4	mysql-relay-bin.001	4		No	No			0		0	0
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
127.0.0.1	root	9306	60	master-bin.001	79	mysql-relay-bin.001	120	master-bin.001	Yes	Yes			0		0	79
127.0.0.1	root	MASTER_PORT	60	master-bin.001	79	mysql-relay-bin.001	120	master-bin.001	Yes	Yes			0		0	79
drop table if exists t1;
create table t1 (n int);
insert into t1 values (10),(45),(90);
+5 −5
Original line number Diff line number Diff line
@@ -2,11 +2,11 @@ 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=9306,
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=9306,
change master to master_host='127.0.0.1',master_port=MASTER_PORT,
master_user='root';
reset master;
slave start;
@@ -15,7 +15,7 @@ create table t1 (s text);
insert into t1 values('Could not break slave'),('Tried hard');
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
127.0.0.1	root	9306	60	master-bin.001	234	mysql-relay-bin.001	275	master-bin.001	Yes	Yes			0		0	234
127.0.0.1	root	MASTER_PORT	60	master-bin.001	234	mysql-relay-bin.001	275	master-bin.001	Yes	Yes			0		0	234
select * from t1;
s
Could not break slave
@@ -43,7 +43,7 @@ master-bin.003
insert into t2 values (65);
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
127.0.0.1	root	9306	60	master-bin.003	155	mysql-relay-bin.001	793	master-bin.003	Yes	Yes			0		0	155
127.0.0.1	root	MASTER_PORT	60	master-bin.003	155	mysql-relay-bin.001	793	master-bin.003	Yes	Yes			0		0	155
select * from t2;
m
34
@@ -66,7 +66,7 @@ slave stop;
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
127.0.0.1	root	9306	60	master-bin.006	445	mysql-relay-bin.004	1376	master-bin.006	Yes	Yes			0		0	445
127.0.0.1	root	MASTER_PORT	60	master-bin.006	445	mysql-relay-bin.004	1312	master-bin.006	Yes	Yes			0		0	445
lock tables t3 read;
select count(*) from t3 where n >= 4;
count(*)
Loading