| 1 |
################# mysql-test\t\innodb_commit_concurrency_basic.test ########### |
| 2 |
# # |
| 3 |
# Variable Name: innodb_commit_concurrency # |
| 4 |
# Scope: GLOBAL # |
| 5 |
# Access Type: Dynamic # |
| 6 |
# Data Type: Numeric # |
| 7 |
# Default Value: 0 # |
| 8 |
# Range: 0-1000 # |
| 9 |
# # |
| 10 |
# # |
| 11 |
# Creation Date: 2008-02-07 # |
| 12 |
# Author: Rizwan # |
| 13 |
# # |
| 14 |
#Description:Test Cases of Dynamic System Variable innodb_commit_concurrency # |
| 15 |
# that checks the behavior of this variable in the following ways # |
| 16 |
# * Default Value # |
| 17 |
# * Valid & Invalid values # |
| 18 |
# * Scope & Access method # |
| 19 |
# * Data Integrity # |
| 20 |
# # |
| 21 |
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ # |
| 22 |
# server-system-variables.html # |
| 23 |
# # |
| 24 |
############################################################################### |
| 25 |
|
| 26 |
--source include/load_sysvars.inc |
| 27 |
|
| 28 |
######################################################################## |
| 29 |
# START OF innodb_commit_concurrency TESTS # |
| 30 |
######################################################################## |
| 31 |
|
| 32 |
|
| 33 |
############################################################################## |
| 34 |
# Saving initial value of innodb_commit_concurrency in a temporary variable# |
| 35 |
############################################################################## |
| 36 |
|
| 37 |
SET @global_start_value = @@global.innodb_commit_concurrency; |
| 38 |
SELECT @global_start_value; |
| 39 |
|
| 40 |
--echo '#--------------------FN_DYNVARS_046_01------------------------#' |
| 41 |
######################################################################## |
| 42 |
# Display the DEFAULT value of innodb_commit_concurrency # |
| 43 |
######################################################################## |
| 44 |
|
| 45 |
SET @@global.innodb_commit_concurrency = 0; |
| 46 |
SET @@global.innodb_commit_concurrency = DEFAULT; |
| 47 |
SELECT @@global.innodb_commit_concurrency; |
| 48 |
|
| 49 |
--echo '#---------------------FN_DYNVARS_046_02-------------------------#' |
| 50 |
################################################################################ |
| 51 |
# Check if innodb_commit_concurrency can be accessed with and without @@ sign# |
| 52 |
################################################################################ |
| 53 |
|
| 54 |
--Error ER_GLOBAL_VARIABLE |
| 55 |
SET innodb_commit_concurrency = 1; |
| 56 |
SELECT @@innodb_commit_concurrency; |
| 57 |
|
| 58 |
|
| 59 |
--Error ER_UNKNOWN_TABLE |
| 60 |
SELECT local.innodb_commit_concurrency; |
| 61 |
|
| 62 |
SET global innodb_commit_concurrency = 0; |
| 63 |
|
| 64 |
SELECT @@global.innodb_commit_concurrency; |
| 65 |
|
| 66 |
|
| 67 |
--echo '#--------------------FN_DYNVARS_046_03------------------------#' |
| 68 |
########################################################################## |
| 69 |
# change the value of innodb_commit_concurrency to a valid value # |
| 70 |
########################################################################## |
| 71 |
|
| 72 |
|
| 73 |
SET @@global.innodb_commit_concurrency = 0; |
| 74 |
SELECT @@global.innodb_commit_concurrency; |
| 75 |
|
| 76 |
--echo '#--------------------FN_DYNVARS_046_04-------------------------#' |
| 77 |
########################################################################### |
| 78 |
# Change the value of innodb_commit_concurrency to invalid value # |
| 79 |
########################################################################### |
| 80 |
|
| 81 |
# |
| 82 |
# InnoDB doesn't allow innodb_commit_concurrency to change from |
| 83 |
# zero to non-zero or vice versa |
| 84 |
# |
| 85 |
--Error ER_WRONG_VALUE_FOR_VAR |
| 86 |
SET @@global.innodb_commit_concurrency = 1; |
| 87 |
SELECT @@global.innodb_commit_concurrency; |
| 88 |
--Error ER_WRONG_VALUE_FOR_VAR |
| 89 |
SET @@global.innodb_commit_concurrency = -1; |
| 90 |
SELECT @@global.innodb_commit_concurrency; |
| 91 |
--Error ER_WRONG_TYPE_FOR_VAR |
| 92 |
SET @@global.innodb_commit_concurrency = "T"; |
| 93 |
SELECT @@global.innodb_commit_concurrency; |
| 94 |
--Error ER_WRONG_TYPE_FOR_VAR |
| 95 |
SET @@global.innodb_commit_concurrency = "Y"; |
| 96 |
SELECT @@global.innodb_commit_concurrency; |
| 97 |
--Error ER_WRONG_TYPE_FOR_VAR |
| 98 |
SET @@global.innodb_commit_concurrency = 1.1; |
| 99 |
SELECT @@global.innodb_commit_concurrency; |
| 100 |
--Error ER_WRONG_VALUE_FOR_VAR |
| 101 |
SET @@global.innodb_commit_concurrency = 1001; |
| 102 |
SELECT @@global.innodb_commit_concurrency; |
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
--echo '#----------------------FN_DYNVARS_046_05------------------------#' |
| 107 |
######################################################################### |
| 108 |
# Check if the value in GLOBAL Table matches value in variable # |
| 109 |
######################################################################### |
| 110 |
|
| 111 |
--disable_warnings |
| 112 |
SELECT @@global.innodb_commit_concurrency = |
| 113 |
VARIABLE_VALUE FROM performance_schema.global_variables |
| 114 |
WHERE VARIABLE_NAME='innodb_commit_concurrency'; |
| 115 |
SELECT @@global.innodb_commit_concurrency; |
| 116 |
SELECT VARIABLE_VALUE FROM performance_schema.global_variables |
| 117 |
WHERE VARIABLE_NAME='innodb_commit_concurrency'; |
| 118 |
--enable_warnings |
| 119 |
|
| 120 |
--echo '#---------------------FN_DYNVARS_046_06-------------------------#' |
| 121 |
################################################################### |
| 122 |
# Check if ON and OFF values can be used on variable # |
| 123 |
################################################################### |
| 124 |
|
| 125 |
--ERROR ER_WRONG_TYPE_FOR_VAR |
| 126 |
SET @@global.innodb_commit_concurrency = OFF; |
| 127 |
SELECT @@global.innodb_commit_concurrency; |
| 128 |
|
| 129 |
--ERROR ER_WRONG_TYPE_FOR_VAR |
| 130 |
SET @@global.innodb_commit_concurrency = ON; |
| 131 |
SELECT @@global.innodb_commit_concurrency; |
| 132 |
|
| 133 |
############################## |
| 134 |
# Restore initial value # |
| 135 |
############################## |
| 136 |
|
| 137 |
|
| 138 |
SET @@global.innodb_commit_concurrency = @global_start_value; |
| 139 |
SELECT @@global.innodb_commit_concurrency; |
| 140 |
|
| 141 |
############################################################### |
| 142 |
# END OF innodb_commit_concurrency TESTS # |
| 143 |
############################################################### |