forked from facebook/mysql-5.6
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added error message when client sets an invalid rocksdb_update_cf_opt…
…ions Summary: Modified the set_var's sql_set_variables to propagate errors set by my_error() in the update func. Added error printing for invalid rocksdb_update_cf_options and updated the corresponding unit test Reviewed By: hermanlee Differential Revision: D5970102 fbshipit-source-id: d39ba65
- Loading branch information
Showing
5 changed files
with
143 additions
and
35 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
mysql-test/suite/rocksdb_sys_vars/r/rocksdb_update_cf_options.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
CREATE TABLE t1 (a INT, PRIMARY KEY (a) COMMENT 'update_cf1') ENGINE=ROCKSDB; | ||
SET @@GLOBAL.ROCKSDB_UPDATE_CF_OPTIONS='update_cf1={write_buffer_size=8m;target_file_size_base=2m};'; | ||
SELECT @@global.rocksdb_update_cf_options; | ||
@@global.rocksdb_update_cf_options | ||
update_cf1={write_buffer_size=8m;target_file_size_base=2m}; | ||
SET @@GLOBAL.ROCKSDB_UPDATE_CF_OPTIONS=NULL; | ||
SHOW GLOBAL VARIABLES LIKE 'rocksdb_update_cf_options'; | ||
Variable_name Value | ||
rocksdb_update_cf_options | ||
SET @@GLOBAL.ROCKSDB_UPDATE_CF_OPTIONS=NULL; | ||
SHOW GLOBAL VARIABLES LIKE 'rocksdb_update_cf_options'; | ||
Variable_name Value | ||
rocksdb_update_cf_options | ||
SET @@GLOBAL.ROCKSDB_UPDATE_CF_OPTIONS=""; | ||
SHOW GLOBAL VARIABLES LIKE 'rocksdb_update_cf_options'; | ||
Variable_name Value | ||
rocksdb_update_cf_options | ||
SET @@GLOBAL.ROCKSDB_UPDATE_CF_OPTIONS=NULL; | ||
SHOW GLOBAL VARIABLES LIKE 'rocksdb_update_cf_options'; | ||
Variable_name Value | ||
rocksdb_update_cf_options | ||
SET @@GLOBAL.ROCKSDB_UPDATE_CF_OPTIONS='update_cf1={write_buffer_size=8m;target_file_size_base=2m};'; | ||
SHOW GLOBAL VARIABLES LIKE 'rocksdb_update_cf_options'; | ||
Variable_name Value | ||
rocksdb_update_cf_options update_cf1={write_buffer_size=8m;target_file_size_base=2m}; | ||
SET @@GLOBAL.ROCKSDB_UPDATE_CF_OPTIONS='update_cf2={write_buffer_size=8m;target_file_size_base=2m};'; | ||
SHOW GLOBAL VARIABLES LIKE 'rocksdb_update_cf_options'; | ||
Variable_name Value | ||
rocksdb_update_cf_options update_cf2={write_buffer_size=8m;target_file_size_base=2m}; | ||
DROP TABLE t1; | ||
SET @@GLOBAL.ROCKSDB_UPDATE_CF_OPTIONS='update_cf1={write_buffer_size=8m;target_file_size_base=2m};'; | ||
SHOW GLOBAL VARIABLES LIKE 'rocksdb_update_cf_options'; | ||
Variable_name Value | ||
rocksdb_update_cf_options update_cf1={write_buffer_size=8m;target_file_size_base=2m}; | ||
SET @@GLOBAL.ROCKSDB_UPDATE_CF_OPTIONS=DEFAULT; | ||
SHOW GLOBAL VARIABLES LIKE 'rocksdb_update_cf_options'; | ||
Variable_name Value | ||
rocksdb_update_cf_options |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
mysql-test/suite/rocksdb_sys_vars/t/rocksdb_update_cf_options.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--source include/have_rocksdb.inc | ||
|
||
CREATE TABLE t1 (a INT, PRIMARY KEY (a) COMMENT 'update_cf1') ENGINE=ROCKSDB; | ||
SET @@GLOBAL.ROCKSDB_UPDATE_CF_OPTIONS='update_cf1={write_buffer_size=8m;target_file_size_base=2m};'; | ||
SELECT @@global.rocksdb_update_cf_options; | ||
SET @@GLOBAL.ROCKSDB_UPDATE_CF_OPTIONS=NULL; | ||
SHOW GLOBAL VARIABLES LIKE 'rocksdb_update_cf_options'; | ||
SET @@GLOBAL.ROCKSDB_UPDATE_CF_OPTIONS=NULL; | ||
SHOW GLOBAL VARIABLES LIKE 'rocksdb_update_cf_options'; | ||
SET @@GLOBAL.ROCKSDB_UPDATE_CF_OPTIONS=""; | ||
SHOW GLOBAL VARIABLES LIKE 'rocksdb_update_cf_options'; | ||
SET @@GLOBAL.ROCKSDB_UPDATE_CF_OPTIONS=NULL; | ||
SHOW GLOBAL VARIABLES LIKE 'rocksdb_update_cf_options'; | ||
SET @@GLOBAL.ROCKSDB_UPDATE_CF_OPTIONS='update_cf1={write_buffer_size=8m;target_file_size_base=2m};'; | ||
SHOW GLOBAL VARIABLES LIKE 'rocksdb_update_cf_options'; | ||
SET @@GLOBAL.ROCKSDB_UPDATE_CF_OPTIONS='update_cf2={write_buffer_size=8m;target_file_size_base=2m};'; | ||
SHOW GLOBAL VARIABLES LIKE 'rocksdb_update_cf_options'; | ||
DROP TABLE t1; | ||
SET @@GLOBAL.ROCKSDB_UPDATE_CF_OPTIONS='update_cf1={write_buffer_size=8m;target_file_size_base=2m};'; | ||
SHOW GLOBAL VARIABLES LIKE 'rocksdb_update_cf_options'; | ||
SET @@GLOBAL.ROCKSDB_UPDATE_CF_OPTIONS=DEFAULT; | ||
SHOW GLOBAL VARIABLES LIKE 'rocksdb_update_cf_options'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters