Debian Codegraph @

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

raw
1
2 #
3 # 2010-01-20 OBN Added check for variable and I_S values after incorrect change attempt
4 #
5
6 --source include/have_profiling.inc
7
8 SET @start_global_value = @@global.profiling_history_size;
9 SELECT @start_global_value;
10
11 #
12 # exists as global and session
13 #
14 select @@global.profiling_history_size;
15 select @@session.profiling_history_size;
16 show global variables like 'profiling_history_size';
17 show session variables like 'profiling_history_size';
18 --disable_warnings
19 select * from performance_schema.global_variables where variable_name='profiling_history_size';
20 select * from performance_schema.session_variables where variable_name='profiling_history_size';
21 --enable_warnings
22
23 #
24 # show that it's writable
25 #
26 set global profiling_history_size=10;
27 set session profiling_history_size=20;
28 select @@global.profiling_history_size;
29 select @@session.profiling_history_size;
30 show global variables like 'profiling_history_size';
31 show session variables like 'profiling_history_size';
32 --disable_warnings
33 select * from performance_schema.global_variables where variable_name='profiling_history_size';
34 select * from performance_schema.session_variables where variable_name='profiling_history_size';
35 --enable_warnings
36
37 #
38 # incorrect assignments
39 #
40 --error ER_WRONG_TYPE_FOR_VAR
41 set global profiling_history_size=1.1;
42 --error ER_WRONG_TYPE_FOR_VAR
43 set global profiling_history_size=1e1;
44 --error ER_WRONG_TYPE_FOR_VAR
45 set global profiling_history_size="foo";
46
47 #
48 # min/max
49 #
50 set session profiling_history_size=0;
51 select @@profiling_history_size;
52 set session profiling_history_size=101;
53 select @@profiling_history_size;
54
55 SET @@global.profiling_history_size = @start_global_value;
56 SELECT @@global.profiling_history_size;