[Commits] bf55fb035be: TEst
revision-id: bf55fb035be1efe84c2d8419948f42c0d43ba7d6 (fb-prod201903-205-gbf55fb035be) parent(s): 8c227943326d1e420215ac983c9e503f6fc86e80 author: Sergei Petrunia committer: Sergei Petrunia timestamp: 2020-01-11 01:13:52 +0200 message: TEst --- .../suite/rocksdb_sys_vars/r/all_vars.result | 2 - .../r/rocksdb_mrr_batch_size_basic.result | 93 ++++++++++++++++++++++ .../t/rocksdb_mrr_batch_size_basic.test | 17 ++++ 3 files changed, 110 insertions(+), 2 deletions(-) diff --git a/mysql-test/suite/rocksdb_sys_vars/r/all_vars.result b/mysql-test/suite/rocksdb_sys_vars/r/all_vars.result index bb96a1cb1c8..159d6a983c8 100644 --- a/mysql-test/suite/rocksdb_sys_vars/r/all_vars.result +++ b/mysql-test/suite/rocksdb_sys_vars/r/all_vars.result @@ -9,7 +9,5 @@ There should be *no* long test name listed below: select variable_name as `There should be *no* variables listed below:` from t2 left join t1 on variable_name=test_name where test_name is null ORDER BY variable_name; There should be *no* variables listed below: -ROCKSDB_MRR_BATCH_SIZE -ROCKSDB_MRR_BATCH_SIZE drop table t1; drop table t2; diff --git a/mysql-test/suite/rocksdb_sys_vars/r/rocksdb_mrr_batch_size_basic.result b/mysql-test/suite/rocksdb_sys_vars/r/rocksdb_mrr_batch_size_basic.result new file mode 100644 index 00000000000..5b7cc20d6fb --- /dev/null +++ b/mysql-test/suite/rocksdb_sys_vars/r/rocksdb_mrr_batch_size_basic.result @@ -0,0 +1,93 @@ +CREATE TABLE valid_values (value varchar(255)) ENGINE=myisam; +INSERT INTO valid_values VALUES(100); +INSERT INTO valid_values VALUES(1); +INSERT INTO valid_values VALUES(0); +CREATE TABLE invalid_values (value varchar(255)) ENGINE=myisam; +INSERT INTO invalid_values VALUES('\'aaa\''); +SET @start_global_value = @@global.ROCKSDB_MRR_BATCH_SIZE; +SELECT @start_global_value; +@start_global_value +100 +SET @start_session_value = @@session.ROCKSDB_MRR_BATCH_SIZE; +SELECT @start_session_value; +@start_session_value +100 +'# Setting to valid values in global scope#' +"Trying to set variable @@global.ROCKSDB_MRR_BATCH_SIZE to 100" +SET @@global.ROCKSDB_MRR_BATCH_SIZE = 100; +SELECT @@global.ROCKSDB_MRR_BATCH_SIZE; +@@global.ROCKSDB_MRR_BATCH_SIZE +100 +"Setting the global scope variable back to default" +SET @@global.ROCKSDB_MRR_BATCH_SIZE = DEFAULT; +SELECT @@global.ROCKSDB_MRR_BATCH_SIZE; +@@global.ROCKSDB_MRR_BATCH_SIZE +100 +"Trying to set variable @@global.ROCKSDB_MRR_BATCH_SIZE to 1" +SET @@global.ROCKSDB_MRR_BATCH_SIZE = 1; +SELECT @@global.ROCKSDB_MRR_BATCH_SIZE; +@@global.ROCKSDB_MRR_BATCH_SIZE +1 +"Setting the global scope variable back to default" +SET @@global.ROCKSDB_MRR_BATCH_SIZE = DEFAULT; +SELECT @@global.ROCKSDB_MRR_BATCH_SIZE; +@@global.ROCKSDB_MRR_BATCH_SIZE +100 +"Trying to set variable @@global.ROCKSDB_MRR_BATCH_SIZE to 0" +SET @@global.ROCKSDB_MRR_BATCH_SIZE = 0; +SELECT @@global.ROCKSDB_MRR_BATCH_SIZE; +@@global.ROCKSDB_MRR_BATCH_SIZE +0 +"Setting the global scope variable back to default" +SET @@global.ROCKSDB_MRR_BATCH_SIZE = DEFAULT; +SELECT @@global.ROCKSDB_MRR_BATCH_SIZE; +@@global.ROCKSDB_MRR_BATCH_SIZE +100 +'# Setting to valid values in session scope#' +"Trying to set variable @@session.ROCKSDB_MRR_BATCH_SIZE to 100" +SET @@session.ROCKSDB_MRR_BATCH_SIZE = 100; +SELECT @@session.ROCKSDB_MRR_BATCH_SIZE; +@@session.ROCKSDB_MRR_BATCH_SIZE +100 +"Setting the session scope variable back to default" +SET @@session.ROCKSDB_MRR_BATCH_SIZE = DEFAULT; +SELECT @@session.ROCKSDB_MRR_BATCH_SIZE; +@@session.ROCKSDB_MRR_BATCH_SIZE +100 +"Trying to set variable @@session.ROCKSDB_MRR_BATCH_SIZE to 1" +SET @@session.ROCKSDB_MRR_BATCH_SIZE = 1; +SELECT @@session.ROCKSDB_MRR_BATCH_SIZE; +@@session.ROCKSDB_MRR_BATCH_SIZE +1 +"Setting the session scope variable back to default" +SET @@session.ROCKSDB_MRR_BATCH_SIZE = DEFAULT; +SELECT @@session.ROCKSDB_MRR_BATCH_SIZE; +@@session.ROCKSDB_MRR_BATCH_SIZE +100 +"Trying to set variable @@session.ROCKSDB_MRR_BATCH_SIZE to 0" +SET @@session.ROCKSDB_MRR_BATCH_SIZE = 0; +SELECT @@session.ROCKSDB_MRR_BATCH_SIZE; +@@session.ROCKSDB_MRR_BATCH_SIZE +0 +"Setting the session scope variable back to default" +SET @@session.ROCKSDB_MRR_BATCH_SIZE = DEFAULT; +SELECT @@session.ROCKSDB_MRR_BATCH_SIZE; +@@session.ROCKSDB_MRR_BATCH_SIZE +100 +'# Testing with invalid values in global scope #' +"Trying to set variable @@global.ROCKSDB_MRR_BATCH_SIZE to 'aaa'" +SET @@global.ROCKSDB_MRR_BATCH_SIZE = 'aaa'; +Got one of the listed errors +SELECT @@global.ROCKSDB_MRR_BATCH_SIZE; +@@global.ROCKSDB_MRR_BATCH_SIZE +100 +SET @@global.ROCKSDB_MRR_BATCH_SIZE = @start_global_value; +SELECT @@global.ROCKSDB_MRR_BATCH_SIZE; +@@global.ROCKSDB_MRR_BATCH_SIZE +100 +SET @@session.ROCKSDB_MRR_BATCH_SIZE = @start_session_value; +SELECT @@session.ROCKSDB_MRR_BATCH_SIZE; +@@session.ROCKSDB_MRR_BATCH_SIZE +100 +DROP TABLE valid_values; +DROP TABLE invalid_values; diff --git a/mysql-test/suite/rocksdb_sys_vars/t/rocksdb_mrr_batch_size_basic.test b/mysql-test/suite/rocksdb_sys_vars/t/rocksdb_mrr_batch_size_basic.test new file mode 100644 index 00000000000..a45a86d5fbe --- /dev/null +++ b/mysql-test/suite/rocksdb_sys_vars/t/rocksdb_mrr_batch_size_basic.test @@ -0,0 +1,17 @@ +--source include/have_rocksdb.inc + +CREATE TABLE valid_values (value varchar(255)) ENGINE=myisam; +INSERT INTO valid_values VALUES(100); +INSERT INTO valid_values VALUES(1); +INSERT INTO valid_values VALUES(0); + +CREATE TABLE invalid_values (value varchar(255)) ENGINE=myisam; +INSERT INTO invalid_values VALUES('\'aaa\''); + +--let $sys_var=ROCKSDB_MRR_BATCH_SIZE +--let $read_only=0 +--let $session=1 +--source ../include/rocksdb_sys_var.inc + +DROP TABLE valid_values; +DROP TABLE invalid_values;
participants (1)
-
Sergei Petrunia