Merge lp:~akopytov/percona-server/bug1258097-5.6 into lp:percona-server/5.6

Proposed by Alexey Kopytov
Status: Merged
Approved by: Laurynas Biveinis
Approved revision: no longer in the source branch.
Merged at revision: 512
Proposed branch: lp:~akopytov/percona-server/bug1258097-5.6
Merge into: lp:percona-server/5.6
Prerequisite: lp:~akopytov/percona-server/tp-high-prio-mode-5.6
Diff against target: 103 lines (+19/-9)
3 files modified
Percona-Server/mysql-test/suite/sys_vars/r/thread_pool_max_threads_basic.result (+12/-6)
Percona-Server/mysql-test/suite/sys_vars/t/thread_pool_max_threads_basic.test (+2/-0)
Percona-Server/sql/sys_vars.cc (+5/-3)
To merge this branch: bzr merge lp:~akopytov/percona-server/bug1258097-5.6
Reviewer Review Type Date Requested Status
George Ormond Lorch III (community) g2 Approve
Review via email: mp+198814@code.launchpad.net

Description of the change

To post a comment you must log in.
Revision history for this message
George Ormond Lorch III (gl-az) :
review: Approve (g2)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Percona-Server/mysql-test/suite/sys_vars/r/thread_pool_max_threads_basic.result'
2--- Percona-Server/mysql-test/suite/sys_vars/r/thread_pool_max_threads_basic.result 2013-01-30 09:55:26 +0000
3+++ Percona-Server/mysql-test/suite/sys_vars/r/thread_pool_max_threads_basic.result 2013-12-12 19:05:29 +0000
4@@ -1,21 +1,21 @@
5 SET @start_global_value = @@global.thread_pool_max_threads;
6 select @@global.thread_pool_max_threads;
7 @@global.thread_pool_max_threads
8-500
9+100000
10 select @@session.thread_pool_max_threads;
11 ERROR HY000: Variable 'thread_pool_max_threads' is a GLOBAL variable
12 show global variables like 'thread_pool_max_threads';
13 Variable_name Value
14-thread_pool_max_threads 500
15+thread_pool_max_threads 100000
16 show session variables like 'thread_pool_max_threads';
17 Variable_name Value
18-thread_pool_max_threads 500
19+thread_pool_max_threads 100000
20 select * from information_schema.global_variables where variable_name='thread_pool_max_threads';
21 VARIABLE_NAME VARIABLE_VALUE
22-THREAD_POOL_MAX_THREADS 500
23+THREAD_POOL_MAX_THREADS 100000
24 select * from information_schema.session_variables where variable_name='thread_pool_max_threads';
25 VARIABLE_NAME VARIABLE_VALUE
26-THREAD_POOL_MAX_THREADS 500
27+THREAD_POOL_MAX_THREADS 100000
28 set global thread_pool_max_threads=1;
29 select @@global.thread_pool_max_threads;
30 @@global.thread_pool_max_threads
31@@ -24,6 +24,12 @@
32 select @@global.thread_pool_max_threads;
33 @@global.thread_pool_max_threads
34 65536
35+set global thread_pool_max_threads=100001;
36+Warnings:
37+Warning 1292 Truncated incorrect thread_pool_max_threads value: '100001'
38+select @@global.thread_pool_max_threads;
39+@@global.thread_pool_max_threads
40+100000
41 set session thread_pool_max_threads=1;
42 ERROR HY000: Variable 'thread_pool_max_threads' is a GLOBAL variable and should be set with SET GLOBAL
43 set global thread_pool_max_threads=1.1;
44@@ -43,5 +49,5 @@
45 Warning 1292 Truncated incorrect thread_pool_max_threads value: '10000000000'
46 select @@global.thread_pool_max_threads;
47 @@global.thread_pool_max_threads
48-65536
49+100000
50 SET @@global.thread_pool_max_threads = @start_global_value;
51
52=== modified file 'Percona-Server/mysql-test/suite/sys_vars/t/thread_pool_max_threads_basic.test'
53--- Percona-Server/mysql-test/suite/sys_vars/t/thread_pool_max_threads_basic.test 2013-01-30 09:55:26 +0000
54+++ Percona-Server/mysql-test/suite/sys_vars/t/thread_pool_max_threads_basic.test 2013-12-12 19:05:29 +0000
55@@ -20,6 +20,8 @@
56 select @@global.thread_pool_max_threads;
57 set global thread_pool_max_threads=65536;
58 select @@global.thread_pool_max_threads;
59+set global thread_pool_max_threads=100001;
60+select @@global.thread_pool_max_threads;
61 --error ER_GLOBAL_VARIABLE
62 set session thread_pool_max_threads=1;
63
64
65=== modified file 'Percona-Server/sql/sys_vars.cc'
66--- Percona-Server/sql/sys_vars.cc 2013-12-12 19:05:28 +0000
67+++ Percona-Server/sql/sys_vars.cc 2013-12-12 19:05:29 +0000
68@@ -67,6 +67,8 @@
69
70 TYPELIB bool_typelib={ array_elements(bool_values)-1, "", bool_values, 0 };
71
72+#define MAX_CONNECTIONS 100000
73+
74 /*
75 This forward declaration is needed because including sql_base.h
76 causes further includes. [TODO] Eliminate this forward declaration
77@@ -1785,7 +1787,7 @@
78 static Sys_var_ulong Sys_max_connections(
79 "max_connections", "The number of simultaneous clients allowed",
80 GLOBAL_VAR(max_connections), CMD_LINE(REQUIRED_ARG),
81- VALID_RANGE(1, 100000),
82+ VALID_RANGE(1, MAX_CONNECTIONS),
83 DEFAULT(MAX_CONNECTIONS_DEFAULT),
84 BLOCK_SIZE(1),
85 NO_MUTEX_GUARD,
86@@ -1814,7 +1816,7 @@
87 static Sys_var_ulong Sys_extra_max_connections(
88 "extra_max_connections", "The number of connections on extra-port",
89 GLOBAL_VAR(extra_max_connections), CMD_LINE(REQUIRED_ARG),
90- VALID_RANGE(1, 100000), DEFAULT(1), BLOCK_SIZE(1), NO_MUTEX_GUARD,
91+ VALID_RANGE(1, MAX_CONNECTIONS), DEFAULT(1), BLOCK_SIZE(1), NO_MUTEX_GUARD,
92 NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(fix_max_connections));
93
94 static bool check_max_delayed_threads(sys_var *self, THD *thd, set_var *var)
95@@ -3172,7 +3174,7 @@
96 "thread_pool_max_threads",
97 "Maximum allowed number of worker threads in the thread pool",
98 GLOBAL_VAR(threadpool_max_threads), CMD_LINE(REQUIRED_ARG),
99- VALID_RANGE(1, 65536), DEFAULT(500), BLOCK_SIZE(1),
100+ VALID_RANGE(1, MAX_CONNECTIONS), DEFAULT(MAX_CONNECTIONS), BLOCK_SIZE(1),
101 NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
102 ON_UPDATE(fix_tp_max_threads)
103 );

Subscribers

People subscribed via source and target branches