2009-03-12 23:27:35 +01:00
|
|
|
# Start with thread_handling=pool-of-threads
|
|
|
|
# and run a number of tests
|
|
|
|
|
|
|
|
-- source include/have_pool_of_threads.inc
|
2011-12-15 09:21:15 +01:00
|
|
|
SET @save_optimizer_switch=@@optimizer_switch;
|
|
|
|
SET optimizer_switch='outer_join_with_cache=off';
|
Added option --staging-run to mysql-test-run to mark slow, not important tests, to not be run in staging trees
Use MY_MUTEX_INIT_FAST for pool mutex
mysql-test/mysql-test-run.pl:
Added option --staging-run
Added information about --parallell=# to help message
mysql-test/suite/federated/federated_server.test:
Slow test, don't run with --staging-run
mysql-test/suite/maria/t/maria-preload.test:
Slow test, don't run with --staging-run
mysql-test/suite/rpl/t/rpl_optimize.test:
Slow test, don't run with --staging-run
mysql-test/suite/rpl/t/rpl_relayrotate.test:
Slow test, don't run with --staging-run
mysql-test/suite/rpl/t/rpl_row_001.test:
Slow test, don't run with --staging-run
mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test:
Slow test, don't run with --staging-run
mysql-test/suite/rpl/t/rpl_row_sp003.test:
Slow test, don't run with --staging-run
mysql-test/suite/rpl/t/rpl_start_stop_slave.test:
Slow test, don't run with --staging-run
mysql-test/t/compress.test:
Slow test, don't run with --staging-run
mysql-test/t/count_distinct3.test:
Slow test, don't run with --staging-run
mysql-test/t/index_merge_innodb.test:
Slow test, don't run with --staging-run
mysql-test/t/information_schema_all_engines.test:
Slow test, don't run with --staging-run
mysql-test/t/innodb_mysql.test:
Slow test, don't run with --staging-run
mysql-test/t/pool_of_threads.test:
Slow test, don't run with --staging-run
mysql-test/t/preload.test:
Slow test, don't run with --staging-run
mysql-test/t/ssl.test:
Slow test, don't run with --staging-run
mysql-test/t/ssl_compress.test:
Slow test, don't run with --staging-run
mysql-test/valgrind.supp:
Suppress warnings from SuSE 11.1 on x86
sql/scheduler.cc:
Use MY_MUTEX_INIT_FAST for pool mutex
2009-06-05 17:35:22 +02:00
|
|
|
# Slow test, don't run during staging part
|
|
|
|
-- source include/not_staging.inc
|
2011-01-03 15:33:39 +01:00
|
|
|
-- source include/long_test.inc
|
2009-03-12 23:27:35 +01:00
|
|
|
-- source include/common-tests.inc
|
2011-12-15 09:21:15 +01:00
|
|
|
SET optimizer_switch=@save_optimizer_switch;
|
2009-03-18 16:46:32 +01:00
|
|
|
|
|
|
|
# Test that we cannot have more simultaneous connections than
|
|
|
|
# --thread-pool-size on the standard port, but _can_ have additional
|
|
|
|
# connections on the extra port.
|
|
|
|
|
|
|
|
# First set two connections running, and check that extra connection
|
2011-12-18 23:03:35 +01:00
|
|
|
# on normal port fails due to--thread-pool-max_threads=2
|
2009-03-18 16:46:32 +01:00
|
|
|
connection default;
|
2013-05-23 14:52:48 +02:00
|
|
|
|
|
|
|
# Sleep for slightly longer than 5 sec to trigger MDEV-4566
|
|
|
|
# (abort in interruptible wait connection check)
|
|
|
|
send SELECT sleep(5.5);
|
2012-01-02 10:13:53 +01:00
|
|
|
--sleep 1
|
2009-03-18 16:46:32 +01:00
|
|
|
|
|
|
|
connect(con2,localhost,root,,);
|
|
|
|
connection con2;
|
|
|
|
send SELECT sleep(5);
|
2012-01-02 10:13:53 +01:00
|
|
|
--sleep 0.5
|
2009-03-18 16:46:32 +01:00
|
|
|
|
|
|
|
--disable_abort_on_error
|
|
|
|
--disable_result_log
|
|
|
|
--disable_query_log
|
|
|
|
connect(con3,localhost,root,,);
|
|
|
|
--enable_query_log
|
|
|
|
--enable_result_log
|
|
|
|
--enable_abort_on_error
|
|
|
|
let $error = $mysql_errno;
|
|
|
|
if (!$error)
|
|
|
|
{
|
2011-12-18 23:03:35 +01:00
|
|
|
--echo # -- Error: managed to establish more than --thread_pool_max_threads connections
|
2009-03-18 16:46:32 +01:00
|
|
|
}
|
|
|
|
if ($error)
|
|
|
|
{
|
2011-12-18 23:03:35 +01:00
|
|
|
--echo # -- Success: more than --thread_pool_max_threads normal connections not possible
|
2009-03-18 16:46:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
connection default;
|
|
|
|
--reap
|
|
|
|
connection con2;
|
|
|
|
--reap
|
|
|
|
|
|
|
|
# Now try again, but this time use the extra port to successfully connect.
|
|
|
|
|
|
|
|
connection default;
|
|
|
|
send SELECT sleep(5);
|
|
|
|
|
|
|
|
connection con2;
|
|
|
|
send SELECT sleep(5);
|
|
|
|
--sleep 1
|
|
|
|
|
|
|
|
connect(extracon,127.0.0.1,root,,test,$MASTER_EXTRA_PORT,);
|
|
|
|
connection extracon;
|
|
|
|
SELECT 'Connection on extra port ok';
|
|
|
|
|
|
|
|
connect(extracon2,127.0.0.1,root,,test,$MASTER_EXTRA_PORT,);
|
|
|
|
connection extracon2;
|
|
|
|
SELECT 'Connection on extra port 2 ok';
|
|
|
|
|
|
|
|
--disable_abort_on_error
|
|
|
|
--disable_result_log
|
|
|
|
--disable_query_log
|
|
|
|
connect(extracon3,127.0.0.1,root,,test,$MASTER_EXTRA_PORT,);
|
|
|
|
--enable_query_log
|
|
|
|
--enable_result_log
|
|
|
|
--enable_abort_on_error
|
|
|
|
let $error = $mysql_errno;
|
|
|
|
if (!$error)
|
|
|
|
{
|
|
|
|
--echo # -- Error: managed to establish more than --extra-max-connections + 1 connections
|
|
|
|
}
|
|
|
|
if ($error)
|
|
|
|
{
|
|
|
|
--echo # -- Success: more than --extra-max-connections + 1 normal connections not possible
|
|
|
|
}
|
|
|
|
|
|
|
|
connection default;
|
|
|
|
--reap
|
|
|
|
connection con2;
|
|
|
|
--reap
|