From: Date: July 27 2006 10:54am Subject: bk commit into 5.1 tree (msvensson:1.2242) BUG#21297 List-Archive: http://lists.mysql.com/commits/9653 X-Bug: 21297 Message-Id: <20060727085411.E394986DE70@localhost.localdomain> Below is the list of changes that have just been committed into a local 5.1 repository of msvensson. When msvensson does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2006-07-27 10:54:04+02:00, msvensson@neptunus.(none) +2 -0 Bug#21297 rpl_insert fails randomly - Add loop in mysqlslap that tries to connect up to 10 times if connect in thread fails. client/mysqlslap.c@stripped, 2006-07-27 10:54:01+02:00, msvensson@neptunus.(none) +18 -3 Add loop to retry connect 10 times with a small sleep in between. mysql-test/t/disabled.def@stripped, 2006-07-27 10:54:01+02:00, msvensson@neptunus.(none) +0 -1 Remove disabling of testcase # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: msvensson # Host: neptunus.(none) # Root: /home/msvensson/mysql/mysql-5.1-new-maint --- 1.180/mysql-test/t/disabled.def 2006-07-27 10:54:11 +02:00 +++ 1.181/mysql-test/t/disabled.def 2006-07-27 10:54:11 +02:00 @@ -38,7 +38,6 @@ rpl_sp_effects : BUG#19862 200 # the below testcase have been reworked to avoid the bug, test contains comment, keep bug open #ndb_binlog_ddl_multi : BUG#18976 2006-04-10 kent CRBR: multiple binlog, second binlog may miss schema log events -rpl_insert : BUG#21297 2006-07-26 msvensson rpl_ndb_idempotent : BUG#21298 2006-07-27 msvensson rpl_row_basic_7ndb : BUG#21298 2006-07-27 msvensson rpl_truncate_7ndb : BUG#21298 2006-07-27 msvensson --- 1.35/client/mysqlslap.c 2006-07-27 10:54:11 +02:00 +++ 1.36/client/mysqlslap.c 2006-07-27 10:54:11 +02:00 @@ -1113,6 +1113,7 @@ WAIT: DBUG_RETURN(0); } + int run_task(thread_context *con) { @@ -1137,13 +1138,27 @@ run_task(thread_context *con) my_lock(lock_file, F_RDLCK, 0, F_TO_EOF, MYF(0)); if (!opt_only_print) { - if (!(mysql_real_connect(mysql, host, user, opt_password, + /* Connect to server */ + static ulong connection_retry_sleep= 100000; /* Microseconds */ + int i, connect_error= 1; + for (i= 0; i < 10; i++) + { + if (mysql_real_connect(mysql, host, user, opt_password, create_schema_string, opt_mysql_port, opt_mysql_unix_port, - connect_flags))) + connect_flags)) + { + /* Connect suceeded */ + connect_error= 0; + break; + } + my_sleep(connection_retry_sleep); + } + if (connect_error) { - fprintf(stderr,"%s: %s\n",my_progname,mysql_error(mysql)); + fprintf(stderr,"%s: Error when connecting to server: %d %s\n", + my_progname, mysql_errno(mysql), mysql_error(mysql)); goto end; } }