| 1 |
|
| 2 |
SET @start_global_value = @@session.transaction_allow_batching; |
| 3 |
SELECT @start_global_value as "Should be off by default"; |
| 4 |
|
| 5 |
# |
| 6 |
# exists as session only |
| 7 |
# |
| 8 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 9 |
select @@global.transaction_allow_batching; |
| 10 |
select @@session.transaction_allow_batching; |
| 11 |
show global variables like 'transaction_allow_batching'; |
| 12 |
show session variables like 'transaction_allow_batching'; |
| 13 |
--disable_warnings |
| 14 |
select * from performance_schema.global_variables where variable_name='transaction_allow_batching'; |
| 15 |
select * from performance_schema.session_variables where variable_name='transaction_allow_batching'; |
| 16 |
--enable_warnings |
| 17 |
|
| 18 |
# |
| 19 |
# show that it is writable |
| 20 |
# |
| 21 |
--error ER_LOCAL_VARIABLE |
| 22 |
set global transaction_allow_batching = 1; |
| 23 |
set session transaction_allow_batching = TRUE; |
| 24 |
select @@session.transaction_allow_batching; |
| 25 |
|
| 26 |
# |
| 27 |
# incorrect assignments |
| 28 |
# |
| 29 |
--error ER_WRONG_TYPE_FOR_VAR |
| 30 |
set transaction_allow_batching=1.1; |
| 31 |
--error ER_WRONG_TYPE_FOR_VAR |
| 32 |
set transaction_allow_batching=1e1; |
| 33 |
--error ER_WRONG_VALUE_FOR_VAR |
| 34 |
set transaction_allow_batching="foobar"; |
| 35 |
|
| 36 |
|
| 37 |
# |
| 38 |
# restore original value |
| 39 |
# |
| 40 |
set session transaction_allow_batching = @start_global_value; |
| 41 |
select @@session.transaction_allow_batching; |
| 42 |
|
| 43 |
# |
| 44 |
# See ndb_sql_transaction_allow_batching.test for a comprehensive test case. |
| 45 |
# |