1#
2# MDEV-375 Server crashes in THD::print_aborted_warning with log_warnings > 3
3#
4--source include/not_embedded.inc
5
6set @save_log_warnings=@@log_warnings, @save_max_connections=@@max_connections;
7SET GLOBAL log_warnings=4;
8SET GLOBAL max_connections=10;
9
10--connect (tmp_con1,localhost,root,,)
11--connect (tmp_con2,localhost,root,,)
12--connect (tmp_con3,localhost,root,,)
13--connect (tmp_con4,localhost,root,,)
14--connect (tmp_con5,localhost,root,,)
15--connect (tmp_con6,localhost,root,,)
16--connect (tmp_con7,localhost,root,,)
17--connect (tmp_con8,localhost,root,,)
18
19--connect (con1,localhost,root,,)
20SELECT 1;
21--connect (con2,localhost,root,,)
22SELECT 2;
23--disable_query_log
24--error ER_CON_COUNT_ERROR
25--connect (con3,localhost,root,,)
26--enable_query_log
27
28--connection default
29SELECT 0;
30let $count_sessions=11;
31--source include/wait_until_count_sessions.inc
32show status like "Threads_connected";
33
34SET GLOBAL log_warnings=@save_log_warnings;
35SET GLOBAL max_connections=@save_max_connections;
36