CREATE TABLE valid_values (value varchar(255)) ENGINE=myisam;
INSERT INTO valid_values VALUES(1);
INSERT INTO valid_values VALUES(0);
INSERT INTO valid_values VALUES(222333);
CREATE TABLE invalid_values (value varchar(255)) ENGINE=myisam;
INSERT INTO invalid_values VALUES('\'aaa\'');
INSERT INTO invalid_values VALUES('\'bbb\'');
SET @@session.rocksdb_force_index_records_in_range = -1;
Warnings:
Warning	1292	Truncated incorrect rocksdb_force_index_records_i... value: '-1'
SELECT @@session.rocksdb_force_index_records_in_range;
@@session.rocksdb_force_index_records_in_range
0
SET @start_global_value = @@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE;
SELECT @start_global_value;
@start_global_value
0
SET @start_session_value = @@session.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE;
SELECT @start_session_value;
@start_session_value
0
'# Setting to valid values in global scope#'
"Trying to set variable @@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE to 1"
SET @@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE   = 1;
SELECT @@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE;
@@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE
1
"Setting the global scope variable back to default"
SET @@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE = DEFAULT;
SELECT @@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE;
@@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE
0
"Trying to set variable @@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE to 0"
SET @@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE   = 0;
SELECT @@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE;
@@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE
0
"Setting the global scope variable back to default"
SET @@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE = DEFAULT;
SELECT @@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE;
@@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE
0
"Trying to set variable @@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE to 222333"
SET @@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE   = 222333;
SELECT @@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE;
@@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE
222333
"Setting the global scope variable back to default"
SET @@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE = DEFAULT;
SELECT @@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE;
@@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE
0
'# Setting to valid values in session scope#'
"Trying to set variable @@session.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE to 1"
SET @@session.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE   = 1;
SELECT @@session.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE;
@@session.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE
1
"Setting the session scope variable back to default"
SET @@session.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE = DEFAULT;
SELECT @@session.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE;
@@session.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE
0
"Trying to set variable @@session.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE to 0"
SET @@session.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE   = 0;
SELECT @@session.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE;
@@session.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE
0
"Setting the session scope variable back to default"
SET @@session.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE = DEFAULT;
SELECT @@session.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE;
@@session.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE
0
"Trying to set variable @@session.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE to 222333"
SET @@session.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE   = 222333;
SELECT @@session.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE;
@@session.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE
222333
"Setting the session scope variable back to default"
SET @@session.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE = DEFAULT;
SELECT @@session.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE;
@@session.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE
0
'# Testing with invalid values in global scope #'
"Trying to set variable @@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE to 'aaa'"
SET @@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE   = 'aaa';
Got one of the listed errors
SELECT @@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE;
@@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE
0
"Trying to set variable @@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE to 'bbb'"
SET @@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE   = 'bbb';
Got one of the listed errors
SELECT @@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE;
@@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE
0
SET @@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE = @start_global_value;
SELECT @@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE;
@@global.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE
0
SET @@session.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE = @start_session_value;
SELECT @@session.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE;
@@session.ROCKSDB_FORCE_INDEX_RECORDS_IN_RANGE
0
DROP TABLE valid_values;
DROP TABLE invalid_values;
