diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index f84da1ed132..7ad83087a5c 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3742,6 +3742,11 @@ sub mysqld_arguments ($$$$) { mtr_add_arg($args, "%s--language=%s", $prefix, $path_language); mtr_add_arg($args, "%s--tmpdir=$opt_tmpdir", $prefix); + # Increase default connect_timeout to avoid intermittent + # disconnects when test servers are put under load + # see BUG#28359 + mtr_add_arg($args, "%s--connect-timeout=60", $prefix); + if ( $opt_valgrind_mysqld ) { mtr_add_arg($args, "%s--skip-safemalloc", $prefix); diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 375782787a3..527b0368f11 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -327,8 +327,13 @@ protected: #define PRECISION_FOR_DOUBLE 53 #define PRECISION_FOR_FLOAT 24 +/* + Default time to wait before aborting a new client connection + that does not respond to "initial server greeting" timely +*/ +#define CONNECT_TIMEOUT 10 + /* The following can also be changed from the command line */ -#define CONNECT_TIMEOUT 5 // Do not wait long for connect #define DEFAULT_CONCURRENCY 10 #define DELAYED_LIMIT 100 /* pause after xxx inserts */ #define DELAYED_QUEUE_SIZE 1000 diff --git a/sql/udf_example.c b/sql/udf_example.c index 6c07a929b04..6f2093cc92f 100644 --- a/sql/udf_example.c +++ b/sql/udf_example.c @@ -1106,11 +1106,12 @@ char * is_const(UDF_INIT *initid, UDF_ARGS *args __attribute__((unused)), } + my_bool check_const_len_init(UDF_INIT *initid, UDF_ARGS *args, char *message) { if (args->arg_count != 1) { - strmov(message, "IS_CONST accepts only one argument"); + strmov(message, "CHECK_CONST_LEN accepts only one argument"); return 1; } if (args->args[0] == 0) @@ -1140,5 +1141,4 @@ char * check_const_len(UDF_INIT *initid, UDF_ARGS *args __attribute__((unused)), } - #endif /* HAVE_DLOPEN */