Debian Codegraph @

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

raw
1
2 #
3 # 2010-01-27 - Added
4 #
5
6
7 SET @start_global_value = @@global.innodb_thread_sleep_delay;
8 SELECT @start_global_value;
9
10 #
11 # exists as global only
12 #
13 --echo Valid values are zero or above
14 select @@global.innodb_thread_sleep_delay >=0;
15 select @@global.innodb_thread_sleep_delay;
16 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
17 select @@session.innodb_thread_sleep_delay;
18 show global variables like 'innodb_thread_sleep_delay';
19 show session variables like 'innodb_thread_sleep_delay';
20 --disable_warnings
21 select * from performance_schema.global_variables where variable_name='innodb_thread_sleep_delay';
22 select * from performance_schema.session_variables where variable_name='innodb_thread_sleep_delay';
23 --enable_warnings
24
25 #
26 # show that it's writable
27 #
28 set global innodb_thread_sleep_delay=10;
29 select @@global.innodb_thread_sleep_delay;
30 --disable_warnings
31 select * from performance_schema.global_variables where variable_name='innodb_thread_sleep_delay';
32 select * from performance_schema.session_variables where variable_name='innodb_thread_sleep_delay';
33 --enable_warnings
34 --error ER_GLOBAL_VARIABLE
35 set session innodb_thread_sleep_delay=1;
36
37 #
38 # show the default value
39 #
40 set global innodb_thread_sleep_delay=DEFAULT;
41 select @@global.innodb_thread_sleep_delay;
42
43 #
44 # incorrect types
45 #
46 --error ER_WRONG_TYPE_FOR_VAR
47 set global innodb_thread_sleep_delay=1.1;
48 --error ER_WRONG_TYPE_FOR_VAR
49 set global innodb_thread_sleep_delay=1e1;
50 --error ER_WRONG_TYPE_FOR_VAR
51 set global innodb_thread_sleep_delay="foo";
52 --error ER_WRONG_TYPE_FOR_VAR
53 set global innodb_thread_sleep_delay=18446744073709551616;
54
55 set global innodb_thread_sleep_delay=-7;
56 select @@global.innodb_thread_sleep_delay;
57 --disable_warnings
58 select * from performance_schema.global_variables where variable_name='innodb_thread_sleep_delay';
59 --enable_warnings
60
61 #
62 # correct/overflowed values
63 #
64 set global innodb_thread_sleep_delay=0;
65 select @@global.innodb_thread_sleep_delay;
66 set global innodb_thread_sleep_delay=1000;
67 select @@global.innodb_thread_sleep_delay;
68 set global innodb_thread_sleep_delay=1000000;
69 select @@global.innodb_thread_sleep_delay;
70 set global innodb_thread_sleep_delay=1000001;
71 select @@global.innodb_thread_sleep_delay;
72 set global innodb_thread_sleep_delay=4294967295;
73 select @@global.innodb_thread_sleep_delay;
74 set global innodb_thread_sleep_delay=555;
75 select @@global.innodb_thread_sleep_delay;
76
77 #
78 # cleanup
79 #
80 SET @@global.innodb_thread_sleep_delay = @start_global_value;
81 SELECT @@global.innodb_thread_sleep_delay;