|
| 1 | +SET @start_global_value = @@global.innodb_prefix_index_cluster_optimization; |
| 2 | +SELECT @start_global_value; |
| 3 | +@start_global_value |
| 4 | +0 |
| 5 | +# |
| 6 | +# exists as global only |
| 7 | +# |
| 8 | +Valid values are 'ON' and 'OFF' |
| 9 | +select @@global.innodb_prefix_index_cluster_optimization in (0, 1); |
| 10 | +@@global.innodb_prefix_index_cluster_optimization in (0, 1) |
| 11 | +1 |
| 12 | +select @@global.innodb_prefix_index_cluster_optimization; |
| 13 | +@@global.innodb_prefix_index_cluster_optimization |
| 14 | +0 |
| 15 | +select @@session.innodb_prefix_index_cluster_optimization; |
| 16 | +ERROR HY000: Variable 'innodb_prefix_index_cluster_optimization' is a GLOBAL variable |
| 17 | +show global variables like 'innodb_prefix_index_cluster_optimization'; |
| 18 | +Variable_name Value |
| 19 | +innodb_prefix_index_cluster_optimization OFF |
| 20 | +show session variables like 'innodb_prefix_index_cluster_optimization'; |
| 21 | +Variable_name Value |
| 22 | +innodb_prefix_index_cluster_optimization OFF |
| 23 | +select * from information_schema.global_variables where variable_name = 'innodb_prefix_index_cluster_optimization'; |
| 24 | +VARIABLE_NAME VARIABLE_VALUE |
| 25 | +INNODB_PREFIX_INDEX_CLUSTER_OPTIMIZATION OFF |
| 26 | +select * from information_schema.session_variables where variable_name = 'innodb_prefix_index_cluster_optimization'; |
| 27 | +VARIABLE_NAME VARIABLE_VALUE |
| 28 | +INNODB_PREFIX_INDEX_CLUSTER_OPTIMIZATION OFF |
| 29 | +# |
| 30 | +# show that it's writable |
| 31 | +# |
| 32 | +set global innodb_prefix_index_cluster_optimization = 'OFF'; |
| 33 | +select @@global.innodb_prefix_index_cluster_optimization; |
| 34 | +@@global.innodb_prefix_index_cluster_optimization |
| 35 | +0 |
| 36 | +select * from information_schema.global_variables where variable_name = 'innodb_prefix_index_cluster_optimization'; |
| 37 | +VARIABLE_NAME VARIABLE_VALUE |
| 38 | +INNODB_PREFIX_INDEX_CLUSTER_OPTIMIZATION OFF |
| 39 | +select * from information_schema.session_variables where variable_name = 'innodb_prefix_index_cluster_optimization'; |
| 40 | +VARIABLE_NAME VARIABLE_VALUE |
| 41 | +INNODB_PREFIX_INDEX_CLUSTER_OPTIMIZATION OFF |
| 42 | +set @@global.innodb_prefix_index_cluster_optimization = 'ON'; |
| 43 | +select @@global.innodb_prefix_index_cluster_optimization; |
| 44 | +@@global.innodb_prefix_index_cluster_optimization |
| 45 | +1 |
| 46 | +select * from information_schema.global_variables where variable_name = 'innodb_prefix_index_cluster_optimization'; |
| 47 | +VARIABLE_NAME VARIABLE_VALUE |
| 48 | +INNODB_PREFIX_INDEX_CLUSTER_OPTIMIZATION ON |
| 49 | +select * from information_schema.session_variables where variable_name = 'innodb_prefix_index_cluster_optimization'; |
| 50 | +VARIABLE_NAME VARIABLE_VALUE |
| 51 | +INNODB_PREFIX_INDEX_CLUSTER_OPTIMIZATION ON |
| 52 | +set global innodb_prefix_index_cluster_optimization = 0; |
| 53 | +select @@global.innodb_prefix_index_cluster_optimization; |
| 54 | +@@global.innodb_prefix_index_cluster_optimization |
| 55 | +0 |
| 56 | +select * from information_schema.global_variables where variable_name = 'innodb_prefix_index_cluster_optimization'; |
| 57 | +VARIABLE_NAME VARIABLE_VALUE |
| 58 | +INNODB_PREFIX_INDEX_CLUSTER_OPTIMIZATION OFF |
| 59 | +select * from information_schema.session_variables where variable_name = 'innodb_prefix_index_cluster_optimization'; |
| 60 | +VARIABLE_NAME VARIABLE_VALUE |
| 61 | +INNODB_PREFIX_INDEX_CLUSTER_OPTIMIZATION OFF |
| 62 | +set @@global.innodb_prefix_index_cluster_optimization = 1; |
| 63 | +select @@global.innodb_prefix_index_cluster_optimization; |
| 64 | +@@global.innodb_prefix_index_cluster_optimization |
| 65 | +1 |
| 66 | +select * from information_schema.global_variables where variable_name = 'innodb_prefix_index_cluster_optimization'; |
| 67 | +VARIABLE_NAME VARIABLE_VALUE |
| 68 | +INNODB_PREFIX_INDEX_CLUSTER_OPTIMIZATION ON |
| 69 | +select * from information_schema.session_variables where variable_name = 'innodb_prefix_index_cluster_optimization'; |
| 70 | +VARIABLE_NAME VARIABLE_VALUE |
| 71 | +INNODB_PREFIX_INDEX_CLUSTER_OPTIMIZATION ON |
| 72 | +set session innodb_prefix_index_cluster_optimization = 'OFF'; |
| 73 | +ERROR HY000: Variable 'innodb_prefix_index_cluster_optimization' is a GLOBAL variable and should be set with SET GLOBAL |
| 74 | +select @@global.innodb_prefix_index_cluster_optimization; |
| 75 | +@@global.innodb_prefix_index_cluster_optimization |
| 76 | +1 |
| 77 | +select * from information_schema.global_variables where variable_name = 'innodb_prefix_index_cluster_optimization'; |
| 78 | +VARIABLE_NAME VARIABLE_VALUE |
| 79 | +INNODB_PREFIX_INDEX_CLUSTER_OPTIMIZATION ON |
| 80 | +select * from information_schema.session_variables where variable_name = 'innodb_prefix_index_cluster_optimization'; |
| 81 | +VARIABLE_NAME VARIABLE_VALUE |
| 82 | +INNODB_PREFIX_INDEX_CLUSTER_OPTIMIZATION ON |
| 83 | +set @@session.innodb_prefix_index_cluster_optimization = 'ON'; |
| 84 | +ERROR HY000: Variable 'innodb_prefix_index_cluster_optimization' is a GLOBAL variable and should be set with SET GLOBAL |
| 85 | +select @@global.innodb_prefix_index_cluster_optimization; |
| 86 | +@@global.innodb_prefix_index_cluster_optimization |
| 87 | +1 |
| 88 | +select * from information_schema.global_variables where variable_name = 'innodb_prefix_index_cluster_optimization'; |
| 89 | +VARIABLE_NAME VARIABLE_VALUE |
| 90 | +INNODB_PREFIX_INDEX_CLUSTER_OPTIMIZATION ON |
| 91 | +select * from information_schema.session_variables where variable_name = 'innodb_prefix_index_cluster_optimization'; |
| 92 | +VARIABLE_NAME VARIABLE_VALUE |
| 93 | +INNODB_PREFIX_INDEX_CLUSTER_OPTIMIZATION ON |
| 94 | +# |
| 95 | +# incorrect types |
| 96 | +# |
| 97 | +set global innodb_prefix_index_cluster_optimization = 1.1; |
| 98 | +ERROR 42000: Incorrect argument type to variable 'innodb_prefix_index_cluster_optimization' |
| 99 | +set global innodb_prefix_index_cluster_optimization = 1e1; |
| 100 | +ERROR 42000: Incorrect argument type to variable 'innodb_prefix_index_cluster_optimization' |
| 101 | +set global innodb_prefix_index_cluster_optimization = 2; |
| 102 | +ERROR 42000: Variable 'innodb_prefix_index_cluster_optimization' can't be set to the value of '2' |
| 103 | +set global innodb_prefix_index_cluster_optimization = -3; |
| 104 | +ERROR 42000: Variable 'innodb_prefix_index_cluster_optimization' can't be set to the value of '-3' |
| 105 | +select @@global.innodb_prefix_index_cluster_optimization; |
| 106 | +@@global.innodb_prefix_index_cluster_optimization |
| 107 | +1 |
| 108 | +select * from information_schema.global_variables where variable_name = 'innodb_prefix_index_cluster_optimization'; |
| 109 | +VARIABLE_NAME VARIABLE_VALUE |
| 110 | +INNODB_PREFIX_INDEX_CLUSTER_OPTIMIZATION ON |
| 111 | +select * from information_schema.session_variables where variable_name = 'innodb_prefix_index_cluster_optimization'; |
| 112 | +VARIABLE_NAME VARIABLE_VALUE |
| 113 | +INNODB_PREFIX_INDEX_CLUSTER_OPTIMIZATION ON |
| 114 | +set global innodb_prefix_index_cluster_optimization = 'AUTO'; |
| 115 | +ERROR 42000: Variable 'innodb_prefix_index_cluster_optimization' can't be set to the value of 'AUTO' |
| 116 | +# |
| 117 | +# Cleanup |
| 118 | +# |
| 119 | +SET @@global.innodb_prefix_index_cluster_optimization = @start_global_value; |
| 120 | +SELECT @@global.innodb_prefix_index_cluster_optimization; |
| 121 | +@@global.innodb_prefix_index_cluster_optimization |
| 122 | +0 |
0 commit comments