Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MariaRocks port: Make rocksdb_sys_vars suite pass
- Fix include paths, add suite.opt - Add a test for @@rocksdb_supported_compression_types Now all tests pass, except rocksdb_sysvars.rocksdb_rpl_skip_tx_api_basic
- Loading branch information
Showing
101 changed files
with
258 additions
and
97 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
storage/rocksdb/mysql-test/rocksdb_sys_vars/include/correctboolvalue.inc
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,25 @@ | ||
## | ||
# $input the value of a boolean type | ||
# $output the value of int type | ||
## | ||
--let $int_value=$value | ||
if ($value==on) | ||
{ | ||
--let $int_value=1 | ||
} | ||
|
||
if ($value==off) | ||
{ | ||
--let $int_value=0 | ||
} | ||
|
||
# MySQL allows 'true' and 'false' on bool values | ||
if ($value==true) | ||
{ | ||
--let $int_value=1 | ||
} | ||
|
||
if ($value==false) | ||
{ | ||
--let $int_value=0 | ||
} |
123 changes: 123 additions & 0 deletions
123
storage/rocksdb/mysql-test/rocksdb_sys_vars/include/rocksdb_sys_var.inc
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,123 @@ | ||
## | ||
# $sys_var name of the variable | ||
# $read_only - true if read-only | ||
# $session - true if this is session, false if global-only | ||
# $suppress_default_value - if true, don't check the default value | ||
# valid_values table should contain valid values | ||
# invalid_values | ||
## | ||
|
||
--eval SET @start_global_value = @@global.$sys_var | ||
if (!$suppress_default_value) | ||
{ | ||
SELECT @start_global_value; | ||
if ($session) | ||
{ | ||
--eval SET @start_session_value = @@session.$sys_var | ||
SELECT @start_session_value; | ||
} | ||
} | ||
|
||
if (!$read_only) | ||
{ | ||
--echo '# Setting to valid values in global scope#' | ||
|
||
--let $i=1 | ||
--let $value=query_get_value(select value from valid_values, value, $i) | ||
while ($value != 'No such row') | ||
{ | ||
--echo "Trying to set variable @@global.$sys_var to $value" | ||
--eval SET @@global.$sys_var = $value | ||
--eval SELECT @@global.$sys_var | ||
--let $v=`SELECT @@global.$sys_var` | ||
--source include/correctboolvalue.inc | ||
if (!$sticky) | ||
{ | ||
if ($v != $int_value) | ||
{ | ||
--echo Set @@global.$sys_var to $value but it remained set to $v | ||
--die Wrong variable value | ||
} | ||
} | ||
|
||
--echo "Setting the global scope variable back to default" | ||
--eval SET @@global.$sys_var = DEFAULT | ||
--eval SELECT @@global.$sys_var | ||
|
||
--inc $i | ||
--let $value=query_get_value(select value from valid_values, value, $i) | ||
} | ||
|
||
if ($session) | ||
{ | ||
--echo '# Setting to valid values in session scope#' | ||
|
||
--let $i=1 | ||
--let $value=query_get_value(select value from valid_values, value, $i) | ||
while ($value != 'No such row') | ||
{ | ||
--echo "Trying to set variable @@session.$sys_var to $value" | ||
--eval SET @@session.$sys_var = $value | ||
--eval SELECT @@session.$sys_var | ||
--let $v=`SELECT @@session.$sys_var` | ||
--source include/correctboolvalue.inc | ||
if (!$sticky) | ||
{ | ||
if ($v != $int_value) | ||
{ | ||
--echo Set @@session.$sys_var to $value but it remained set to $v | ||
--die Wrong variable value | ||
} | ||
} | ||
--echo "Setting the session scope variable back to default" | ||
--eval SET @@session.$sys_var = DEFAULT | ||
--eval SELECT @@session.$sys_var | ||
|
||
--inc $i | ||
--let $value=query_get_value(select value from valid_values, value, $i) | ||
} | ||
} | ||
if (!$session) | ||
{ | ||
--echo "Trying to set variable @@session.$sys_var to 444. It should fail because it is not session." | ||
--Error ER_GLOBAL_VARIABLE | ||
--eval SET @@session.$sys_var = 444 | ||
} | ||
|
||
--echo '# Testing with invalid values in global scope #' | ||
#################################################################### | ||
# Change the value of query_prealloc_size to an invalid value # | ||
#################################################################### | ||
--let $i=1 | ||
--let $value=query_get_value(select value from invalid_values, value, $i) | ||
while ($value != 'No such row') | ||
{ | ||
--echo "Trying to set variable @@global.$sys_var to $value" | ||
--Error ER_WRONG_VALUE_FOR_VAR, ER_WRONG_TYPE_FOR_VAR | ||
--eval SET @@global.$sys_var = $value | ||
--eval SELECT @@global.$sys_var | ||
--inc $i | ||
--let $value=query_get_value(select value from invalid_values, value, $i) | ||
} | ||
} | ||
|
||
if ($read_only) | ||
{ | ||
--echo "Trying to set variable @@global.$sys_var to 444. It should fail because it is readonly." | ||
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR | ||
--eval SET @@global.$sys_var = 444 | ||
} | ||
|
||
#################################### | ||
# Restore initial value # | ||
#################################### | ||
if (!$read_only) | ||
{ | ||
--eval SET @@global.$sys_var = @start_global_value | ||
--eval SELECT @@global.$sys_var | ||
if ($session) | ||
{ | ||
--eval SET @@session.$sys_var = @start_session_value | ||
--eval SELECT @@session.$sys_var | ||
} | ||
} |
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
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
...ge/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_supported_compression_types_basic.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,4 @@ | ||
SET @start_global_value = @@global.ROCKSDB_SUPPORTED_COMPRESSION_TYPES; | ||
"Trying to set variable @@global.ROCKSDB_SUPPORTED_COMPRESSION_TYPES to 444. It should fail because it is readonly." | ||
SET @@global.ROCKSDB_SUPPORTED_COMPRESSION_TYPES = 444; | ||
ERROR HY000: Variable 'rocksdb_supported_compression_types' is a read only variable |
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,2 @@ | ||
--ignore-db-dirs=.rocksdb | ||
|
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
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.