Debian Codegraph @

mysql-test/suite/sys_vars/t/thread_pool_max_threads_grant.test

raw
1 # uint global
2 --source include/not_embedded.inc
3 --source include/not_aix.inc
4
5 SET @global=@@global.thread_pool_max_threads;
6
7 --echo #
8 --echo # MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
9 --echo #
10
11 --echo # Test that "SET thread_pool_max_threads" is not allowed without CONNECTION ADMIN
12
13 CREATE USER user1@localhost;
14 GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
15 REVOKE CONNECTION ADMIN ON *.* FROM user1@localhost;
16 --connect(user1,localhost,user1,,)
17 --connection user1
18 --error ER_SPECIFIC_ACCESS_DENIED_ERROR
19 SET GLOBAL thread_pool_max_threads=10;
20 --error ER_GLOBAL_VARIABLE
21 SET thread_pool_max_threads=10;
22 --error ER_GLOBAL_VARIABLE
23 SET SESSION thread_pool_max_threads=10;
24 --disconnect user1
25 --connection default
26 DROP USER user1@localhost;
27
28 --echo # Test that "SET thread_pool_max_threads" is allowed with CONNECTION ADMIN
29
30 CREATE USER user1@localhost;
31 GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
32 --connect(user1,localhost,user1,,)
33 --connection user1
34 SET GLOBAL thread_pool_max_threads=10;
35 --error ER_GLOBAL_VARIABLE
36 SET thread_pool_max_threads=10;
37 --error ER_GLOBAL_VARIABLE
38 SET SESSION thread_pool_max_threads=10;
39 --disconnect user1
40 --connection default
41 DROP USER user1@localhost;
42
43 SET @@global.thread_pool_max_threads=@global;