Debian Codegraph @

mysql-test/suite/sys_vars/r/pfs_max_digest_sample_age_basic.result

raw
1 SET @global_start_value = @@global.performance_schema_max_digest_sample_age;
2 SELECT @global_start_value;
3 @global_start_value
4 60
5 #
6 # Default value
7 #
8 SET @@global.performance_schema_max_digest_sample_age = 1;
9 SET @@global.performance_schema_max_digest_sample_age = DEFAULT;
10 SELECT @@global.performance_schema_max_digest_sample_age;
11 @@global.performance_schema_max_digest_sample_age
12 60
13
14 # Check if performance_schema_max_digest_sample_age can be accessed with and without @@
15
16 SET performance_schema_max_digest_sample_age = 1;
17 ERROR HY000: Variable 'performance_schema_max_digest_sample_age' is a GLOBAL variable and should be set with SET GLOBAL
18 SELECT @@performance_schema_max_digest_sample_age;
19 @@performance_schema_max_digest_sample_age
20 60
21 SELECT local.performance_schema_max_digest_sample_age;
22 ERROR 42S02: Unknown table 'local' in field list
23 SET global performance_schema_max_digest_sample_age = 1;
24 SELECT @@global.performance_schema_max_digest_sample_age;
25 @@global.performance_schema_max_digest_sample_age
26 1
27
28 # Change the value of performance_schema_max_digest_sample_age to a valid value
29
30 SET @@global.performance_schema_max_digest_sample_age = 1;
31 SELECT @@global.performance_schema_max_digest_sample_age;
32 @@global.performance_schema_max_digest_sample_age
33 1
34 SET @@global.performance_schema_max_digest_sample_age = 5000;
35 SELECT @@global.performance_schema_max_digest_sample_age;
36 @@global.performance_schema_max_digest_sample_age
37 5000
38 SET @@global.performance_schema_max_digest_sample_age = 1048576;
39 SELECT @@global.performance_schema_max_digest_sample_age;
40 @@global.performance_schema_max_digest_sample_age
41 1048576
42
43 # Change the value of performance_schema_max_digest_sample_age to invalid value
44
45 SET @@global.performance_schema_max_digest_sample_age = 0;
46 SELECT @@global.performance_schema_max_digest_sample_age;
47 @@global.performance_schema_max_digest_sample_age
48 0
49 SET @@global.performance_schema_max_digest_sample_age = "T";
50 ERROR 42000: Incorrect argument type to variable 'performance_schema_max_digest_sample_age'
51 SELECT @@global.performance_schema_max_digest_sample_age;
52 @@global.performance_schema_max_digest_sample_age
53 0
54 SET @@global.performance_schema_max_digest_sample_age = 'Y';
55 ERROR 42000: Incorrect argument type to variable 'performance_schema_max_digest_sample_age'
56 SELECT @@global.performance_schema_max_digest_sample_age;
57 @@global.performance_schema_max_digest_sample_age
58 0
59 SET @@global.performance_schema_max_digest_sample_age = ' ';
60 ERROR 42000: Incorrect argument type to variable 'performance_schema_max_digest_sample_age'
61 SELECT @@global.performance_schema_max_digest_sample_age;
62 @@global.performance_schema_max_digest_sample_age
63 0
64 SET @@global.performance_schema_max_digest_sample_age = " ";
65 ERROR 42000: Incorrect argument type to variable 'performance_schema_max_digest_sample_age'
66 SELECT @@global.performance_schema_max_digest_sample_age;
67 @@global.performance_schema_max_digest_sample_age
68 0
69 SET @@global.performance_schema_max_digest_sample_age = 1.1;
70 ERROR 42000: Incorrect argument type to variable 'performance_schema_max_digest_sample_age'
71 SELECT @@global.performance_schema_max_digest_sample_age;
72 @@global.performance_schema_max_digest_sample_age
73 0
74 SET @@global.performance_schema_max_digest_sample_age = 1048577;
75 Warnings:
76 Warning 1292 Truncated incorrect performance_schema_max_digest_sample_age value: '1048577'
77 SELECT @@global.performance_schema_max_digest_sample_age;
78 @@global.performance_schema_max_digest_sample_age
79 1048576
80
81 # Check if the value in GLOBAL Table matches value in variable
82
83 SELECT @@global.performance_schema_max_digest_sample_age =
84 VARIABLE_VALUE FROM performance_schema.global_variables
85 WHERE VARIABLE_NAME='performance_schema_max_digest_sample_age';
86 @@global.performance_schema_max_digest_sample_age =
87 VARIABLE_VALUE
88 1
89 SELECT @@global.performance_schema_max_digest_sample_age;
90 @@global.performance_schema_max_digest_sample_age
91 1048576
92 SELECT VARIABLE_VALUE FROM performance_schema.global_variables
93 WHERE VARIABLE_NAME='performance_schema_max_digest_sample_age';
94 VARIABLE_VALUE
95 1048576
96
97 # Check if ON and OFF values can be used on variable
98
99 SET @@global.performance_schema_max_digest_sample_age = OFF;
100 ERROR 42000: Incorrect argument type to variable 'performance_schema_max_digest_sample_age'
101 SELECT @@global.performance_schema_max_digest_sample_age;
102 @@global.performance_schema_max_digest_sample_age
103 1048576
104 SET @@global.performance_schema_max_digest_sample_age = ON;
105 ERROR 42000: Incorrect argument type to variable 'performance_schema_max_digest_sample_age'
106 SELECT @@global.performance_schema_max_digest_sample_age;
107 @@global.performance_schema_max_digest_sample_age
108 1048576
109
110 # Check if TRUE and FALSE values can be used on variable
111
112 SET @@global.performance_schema_max_digest_sample_age = TRUE;
113 SELECT @@global.performance_schema_max_digest_sample_age;
114 @@global.performance_schema_max_digest_sample_age
115 1
116 SET @@global.performance_schema_max_digest_sample_age = FALSE;
117 SELECT @@global.performance_schema_max_digest_sample_age;
118 @@global.performance_schema_max_digest_sample_age
119 0
120
121 # Restore initial value
122
123 SET @@global.performance_schema_max_digest_sample_age = @global_start_value;
124 SELECT @@global.performance_schema_max_digest_sample_age;
125 @@global.performance_schema_max_digest_sample_age
126 60