| 1 |
################## mysql-test/t/innodb_undo_directory_basic.test ############## |
| 2 |
# # |
| 3 |
# Variable Name: innodb_undo_directory # |
| 4 |
# Scope: Global # |
| 5 |
# Access Type: Static # |
| 6 |
# Data Type: string # |
| 7 |
# # |
| 8 |
# # |
| 9 |
# Creation Date: 2011-07-05 # |
| 10 |
# Author : Sunny Bains # |
| 11 |
# # |
| 12 |
# # |
| 13 |
# Description: Read-only config global variable innodb_undo_directory # |
| 14 |
# * Value check # |
| 15 |
# * Scope check # |
| 16 |
# # |
| 17 |
############################################################################### |
| 18 |
|
| 19 |
--source include/have_innodb.inc |
| 20 |
|
| 21 |
#################################################################### |
| 22 |
# Display the default value # |
| 23 |
#################################################################### |
| 24 |
SELECT COUNT(@@GLOBAL.innodb_undo_directory); |
| 25 |
--echo 1 Expected |
| 26 |
|
| 27 |
|
| 28 |
#################################################################### |
| 29 |
# Check if Value can set # |
| 30 |
#################################################################### |
| 31 |
|
| 32 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 33 |
SET @@GLOBAL.innodb_undo_directory="/tmp"; |
| 34 |
--echo Expected error 'Read only variable' |
| 35 |
|
| 36 |
SELECT COUNT(@@GLOBAL.innodb_undo_directory); |
| 37 |
--echo 1 Expected |
| 38 |
|
| 39 |
|
| 40 |
################################################################################ |
| 41 |
# Check if the value in GLOBAL table matches value in variable # |
| 42 |
################################################################################ |
| 43 |
|
| 44 |
--disable_warnings |
| 45 |
SELECT @@GLOBAL.innodb_undo_directory = VARIABLE_VALUE |
| 46 |
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES |
| 47 |
WHERE VARIABLE_NAME='innodb_undo_directory'; |
| 48 |
--enable_warnings |
| 49 |
--echo 1 Expected |
| 50 |
|
| 51 |
SELECT COUNT(@@GLOBAL.innodb_undo_directory); |
| 52 |
--echo 1 Expected |
| 53 |
|
| 54 |
--disable_warnings |
| 55 |
SELECT COUNT(VARIABLE_VALUE) |
| 56 |
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES |
| 57 |
WHERE VARIABLE_NAME='innodb_undo_directory'; |
| 58 |
--enable_warnings |
| 59 |
--echo 1 Expected |
| 60 |
|
| 61 |
|
| 62 |
################################################################################ |
| 63 |
# Check if accessing variable with and without GLOBAL point to same variable # |
| 64 |
################################################################################ |
| 65 |
SELECT @@innodb_undo_directory = @@GLOBAL.innodb_undo_directory; |
| 66 |
--echo 1 Expected |
| 67 |
|
| 68 |
|
| 69 |
################################################################################ |
| 70 |
# Check if innodb_undo_directory can be accessed with and without @@ sign # |
| 71 |
################################################################################ |
| 72 |
|
| 73 |
SELECT COUNT(@@innodb_undo_directory); |
| 74 |
--echo 1 Expected |
| 75 |
|
| 76 |
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 77 |
SELECT COUNT(@@local.innodb_undo_directory); |
| 78 |
--echo Expected error 'Variable is a GLOBAL variable' |
| 79 |
|
| 80 |
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 81 |
SELECT COUNT(@@SESSION.innodb_undo_directory); |
| 82 |
--echo Expected error 'Variable is a GLOBAL variable' |
| 83 |
|
| 84 |
SELECT COUNT(@@GLOBAL.innodb_undo_directory); |
| 85 |
--echo 1 Expected |
| 86 |
|
| 87 |
--Error ER_BAD_FIELD_ERROR |
| 88 |
SELECT innodb_undo_directory = @@SESSION.innodb_undo_directory; |
| 89 |
--echo Expected error 'Readonly variable' |