Commit 6b584b80 authored by Tatiana A. Nurnberg's avatar Tatiana A. Nurnberg

Bug#23921: random failure of user_limits.test

mysqltest disconnect/connect-combo could be so
quick that connect would hit the server before
it had processed the disconnect. Since that
resulted in one more concurrent connection than
we meant to have, global or per-user
max-user-connections could be exceeded.
This could lead to "random" failures in tests
that set those limits.


client/mysqltest.c:
  Retry max-connect-retries times if connect in
  connect_n_handle_errors() unexpectedly fails
  on connection-limit as this could be a race.
  Break out code that checks for expected --errors
  into its own function.
mysql-test/r/mysqltest.result:
  show that we throw a warning if test expects a SQL-state from
  a command (diff_files, ...) that clearly can't produce one.
mysql-test/t/disabled.def:
  re-enable user_limits
mysql-test/t/mysqltest.test:
  show that we throw a warning if test expects a SQL-state from
  a command (diff_files, ...) that clearly can't produce one.
parent 58f30a58
This diff is collapsed.
......@@ -14,6 +14,7 @@ select otto from (select 1 as otto) as t1;
otto
1
mysqltest: At line 1: query 'select otto from (select 1 as otto) as t1' succeeded - should have failed with sqlstate 42S22...
mysqltest: At line 1: expecting a SQL-state (00000) from query 'remove_file /misc/mysql/forest/23921/51-23921/mysql-test/var/tmp/test_nonexistent.tmp' which cannot produce one...
select friedrich from (select 1 as otto) as t1;
ERROR 42S22: Unknown column 'friedrich' in 'field list'
mysqltest: At line 1: query 'select friedrich from (select 1 as otto) as t1' failed with wrong sqlstate 42S22: 'Unknown column 'friedrich' in 'field list'', instead of 00000...
......
......@@ -11,7 +11,6 @@
##############################################################################
federated_transactions : Bug#29523 Transactions do not work
csv_alter_table : Bug#33696 2008-01-21 pcrews no .result file - bug allows NULL columns in CSV tables
user_limits : Bug#23921 random failure of user_limits.test
thread_cache_size_func : Bug#36733 main.thread_cache_size_func fails randomly
binlog_cache_size_basic_32 : Bug #36522: Some tests of system variables have diffs on 64bit platorms
bulk_insert_buffer_size_basic_32 : Bug #36522: Some tests of system variables have diffs on 64bit platorms
......
......@@ -91,6 +91,8 @@ select otto from (select 1 as otto) as t1;
--error 1
--exec echo "error S42S22; select otto from (select 1 as otto) as t1;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "error S00000; remove_file $MYSQLTEST_VARDIR/tmp/test_nonexistent.tmp;" | $MYSQL_TEST 2>&1
# ----------------------------------------------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment