| 1 |
# Variable Name: stored_program_cache |
| 2 |
# Scope: GLOBAL |
| 3 |
# Access Type: Dynamic |
| 4 |
# Data Type: numeric |
| 5 |
# Default Value: 256 |
| 6 |
# Range: 256-524288 |
| 7 |
|
| 8 |
--source include/load_sysvars.inc |
| 9 |
|
| 10 |
--echo # Saving initial value of stored_program_cache in a temporary variable |
| 11 |
SET @start_value = @@global.stored_program_cache; |
| 12 |
SELECT @start_value; |
| 13 |
|
| 14 |
--echo # Display the DEFAULT value of stored_program_cache |
| 15 |
SET @@global.stored_program_cache = DEFAULT; |
| 16 |
SELECT @@global.stored_program_cache; |
| 17 |
|
| 18 |
--echo # Verify default value of variable |
| 19 |
SELECT @@global.stored_program_cache = 256; |
| 20 |
|
| 21 |
--echo # Change the value of stored_program_cache to a valid value |
| 22 |
SET @@global.stored_program_cache = 512; |
| 23 |
SELECT @@global.stored_program_cache; |
| 24 |
|
| 25 |
--echo # Change the value of stored_program_cache to invalid value |
| 26 |
SET @@global.stored_program_cache = -1; |
| 27 |
SELECT @@global.stored_program_cache; |
| 28 |
|
| 29 |
SET @@global.stored_program_cache =100000000000; |
| 30 |
SELECT @@global.stored_program_cache; |
| 31 |
|
| 32 |
SET @@global.stored_program_cache = 0; |
| 33 |
SELECT @@global.stored_program_cache; |
| 34 |
|
| 35 |
--Error ER_WRONG_TYPE_FOR_VAR |
| 36 |
SET @@global.stored_program_cache = 10000.01; |
| 37 |
|
| 38 |
--Error ER_WRONG_TYPE_FOR_VAR |
| 39 |
SET @@global.stored_program_cache = ON; |
| 40 |
--Error ER_WRONG_TYPE_FOR_VAR |
| 41 |
SET @@global.stored_program_cache= 'test'; |
| 42 |
|
| 43 |
--Error ER_WRONG_TYPE_FOR_VAR |
| 44 |
SET @@global.stored_program_cache = ''; |
| 45 |
|
| 46 |
--echo # Test if accessing session stored_program_cache gives error |
| 47 |
|
| 48 |
--Error ER_GLOBAL_VARIABLE |
| 49 |
SET @@session.stored_program_cache = 0; |
| 50 |
|
| 51 |
--echo # Check if accessing variable without SCOPE points to same global variable |
| 52 |
|
| 53 |
SET @@global.stored_program_cache = 512; |
| 54 |
SELECT @@stored_program_cache = @@global.stored_program_cache; |
| 55 |
|
| 56 |
--echo # Restore initial value |
| 57 |
|
| 58 |
SET @@global.stored_program_cache = @start_value; |
| 59 |
SELECT @@global.stored_program_cache; |