Debian Codegraph @

mysql-test/suite/sys_vars/t/profiling_history_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 select * from information_schema.global_variables where variable_name='profiling_history_size';
19 select * from information_schema.session_variables where variable_name='profiling_history_size';
20
21 #
22 # show that it's writable
23 #
24 set global profiling_history_size=10;
25 set session profiling_history_size=20;
26 select @@global.profiling_history_size;
27 select @@session.profiling_history_size;
28 show global variables like 'profiling_history_size';
29 show session variables like 'profiling_history_size';
30 select * from information_schema.global_variables where variable_name='profiling_history_size';
31 select * from information_schema.session_variables where variable_name='profiling_history_size';
32
33 #
34 # incorrect assignments
35 #
36 --error ER_WRONG_TYPE_FOR_VAR
37 set global profiling_history_size=1.1;
38 --error ER_WRONG_TYPE_FOR_VAR
39 set global profiling_history_size=1e1;
40 --error ER_WRONG_TYPE_FOR_VAR
41 set global profiling_history_size="foo";
42
43 #
44 # min/max
45 #
46 set session profiling_history_size=0;
47 select @@profiling_history_size;
48 set session profiling_history_size=101;
49 select @@profiling_history_size;
50
51 SET @@global.profiling_history_size = @start_global_value;
52 SELECT @@global.profiling_history_size;