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