Debian Codegraph @

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

raw
1 # Saving initial value of stored_program_cache in a temporary variable
2 SET @start_value = @@global.stored_program_cache;
3 SELECT @start_value;
4 @start_value
5 256
6 # Display the DEFAULT value of stored_program_cache
7 SET @@global.stored_program_cache = DEFAULT;
8 SELECT @@global.stored_program_cache;
9 @@global.stored_program_cache
10 256
11 # Verify default value of variable
12 SELECT @@global.stored_program_cache = 256;
13 @@global.stored_program_cache = 256
14 1
15 # Change the value of stored_program_cache to a valid value
16 SET @@global.stored_program_cache = 512;
17 SELECT @@global.stored_program_cache;
18 @@global.stored_program_cache
19 512
20 # Change the value of stored_program_cache to invalid value
21 SET @@global.stored_program_cache = -1;
22 Warnings:
23 Warning 1292 Truncated incorrect stored_program_cache value: '-1'
24 SELECT @@global.stored_program_cache;
25 @@global.stored_program_cache
26 0
27 SET @@global.stored_program_cache =100000000000;
28 Warnings:
29 Warning 1292 Truncated incorrect stored_program_cache value: '100000000000'
30 SELECT @@global.stored_program_cache;
31 @@global.stored_program_cache
32 524288
33 SET @@global.stored_program_cache = 0;
34 SELECT @@global.stored_program_cache;
35 @@global.stored_program_cache
36 0
37 SET @@global.stored_program_cache = 10000.01;
38 ERROR 42000: Incorrect argument type to variable 'stored_program_cache'
39 SET @@global.stored_program_cache = ON;
40 ERROR 42000: Incorrect argument type to variable 'stored_program_cache'
41 SET @@global.stored_program_cache= 'test';
42 ERROR 42000: Incorrect argument type to variable 'stored_program_cache'
43 SET @@global.stored_program_cache = '';
44 ERROR 42000: Incorrect argument type to variable 'stored_program_cache'
45 # Test if accessing session stored_program_cache gives error
46 SET @@session.stored_program_cache = 0;
47 ERROR HY000: Variable 'stored_program_cache' is a GLOBAL variable and should be set with SET GLOBAL
48 # Check if accessing variable without SCOPE points to same global variable
49 SET @@global.stored_program_cache = 512;
50 SELECT @@stored_program_cache = @@global.stored_program_cache;
51 @@stored_program_cache = @@global.stored_program_cache
52 1
53 # Restore initial value
54 SET @@global.stored_program_cache = @start_value;
55 SELECT @@global.stored_program_cache;
56 @@global.stored_program_cache
57 256