CREATE TABLE valid_values (value varchar(255));
INSERT INTO valid_values VALUES(1);
INSERT INTO valid_values VALUES(0);
INSERT INTO valid_values VALUES('on');
INSERT INTO valid_values VALUES('off');
CREATE TABLE invalid_values (value varchar(255));
INSERT INTO invalid_values VALUES('\'aaa\'');
INSERT INTO invalid_values VALUES('\'bbb\'');
SET @start_global_value = @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY;
SELECT @start_global_value;
@start_global_value
1
SET @start_session_value = @@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY;
SELECT @start_session_value;
@start_session_value
1
'# Setting to valid values in global scope#'
"Trying to set variable @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY to 1"
SET @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY   = 1;
SELECT @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY;
@@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY
1
"Setting the global scope variable back to default"
SET @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY = DEFAULT;
SELECT @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY;
@@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY
1
"Trying to set variable @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY to 0"
SET @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY   = 0;
SELECT @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY;
@@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY
0
"Setting the global scope variable back to default"
SET @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY = DEFAULT;
SELECT @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY;
@@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY
1
"Trying to set variable @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY to on"
SET @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY   = on;
SELECT @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY;
@@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY
1
"Setting the global scope variable back to default"
SET @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY = DEFAULT;
SELECT @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY;
@@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY
1
"Trying to set variable @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY to off"
SET @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY   = off;
SELECT @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY;
@@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY
0
"Setting the global scope variable back to default"
SET @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY = DEFAULT;
SELECT @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY;
@@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY
1
'# Setting to valid values in session scope#'
"Trying to set variable @@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY to 1"
SET @@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY   = 1;
SELECT @@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY;
@@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY
1
"Setting the session scope variable back to default"
SET @@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY = DEFAULT;
SELECT @@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY;
@@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY
1
"Trying to set variable @@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY to 0"
SET @@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY   = 0;
SELECT @@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY;
@@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY
0
"Setting the session scope variable back to default"
SET @@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY = DEFAULT;
SELECT @@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY;
@@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY
1
"Trying to set variable @@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY to on"
SET @@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY   = on;
SELECT @@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY;
@@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY
1
"Setting the session scope variable back to default"
SET @@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY = DEFAULT;
SELECT @@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY;
@@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY
1
"Trying to set variable @@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY to off"
SET @@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY   = off;
SELECT @@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY;
@@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY
0
"Setting the session scope variable back to default"
SET @@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY = DEFAULT;
SELECT @@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY;
@@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY
1
'# Testing with invalid values in global scope #'
"Trying to set variable @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY to 'aaa'"
SET @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY   = 'aaa';
Got one of the listed errors
SELECT @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY;
@@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY
1
"Trying to set variable @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY to 'bbb'"
SET @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY   = 'bbb';
Got one of the listed errors
SELECT @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY;
@@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY
1
SET @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY = @start_global_value;
SELECT @@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY;
@@global.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY
1
SET @@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY = @start_session_value;
SELECT @@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY;
@@session.ROCKSDB_COMMIT_TIME_BATCH_FOR_RECOVERY
1
DROP TABLE valid_values;
DROP TABLE invalid_values;
