diff options
Diffstat (limited to 'storage/rocksdb')
18 files changed, 72 insertions, 22 deletions
diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc index e951fff1bb1..9024e825862 100644 --- a/storage/rocksdb/ha_rocksdb.cc +++ b/storage/rocksdb/ha_rocksdb.cc @@ -600,6 +600,7 @@ static unsigned long // NOLINT(runtime/int) rocksdb_persistent_cache_size_mb; static ulong rocksdb_info_log_level; static char *rocksdb_wal_dir; +static char *rocksdb_log_dir; static char *rocksdb_persistent_cache_path; static ulong rocksdb_index_type; static uint32_t rocksdb_flush_log_at_trx_commit; @@ -1316,6 +1317,11 @@ static MYSQL_SYSVAR_STR(wal_dir, rocksdb_wal_dir, "DBOptions::wal_dir for RocksDB", nullptr, nullptr, rocksdb_db_options->wal_dir.c_str()); +static MYSQL_SYSVAR_STR(log_dir, rocksdb_log_dir, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, + "DBOptions::db_log_dir for RocksDB", nullptr, nullptr, + rocksdb_db_options->db_log_dir.c_str()); + static MYSQL_SYSVAR_STR( persistent_cache_path, rocksdb_persistent_cache_path, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, @@ -2041,6 +2047,7 @@ static struct st_mysql_sys_var *rocksdb_system_variables[] = { MYSQL_SYSVAR(max_total_wal_size), MYSQL_SYSVAR(use_fsync), MYSQL_SYSVAR(wal_dir), + MYSQL_SYSVAR(log_dir), MYSQL_SYSVAR(persistent_cache_path), MYSQL_SYSVAR(persistent_cache_size_mb), MYSQL_SYSVAR(delete_obsolete_files_period_micros), @@ -5381,7 +5388,7 @@ static int rocksdb_init_func(void *const p) { rocksdb::NewGenericRateLimiter(rocksdb_rate_limiter_bytes_per_sec)); rocksdb_db_options->rate_limiter = rocksdb_rate_limiter; } - + rocksdb_db_options->db_log_dir = rocksdb_log_dir; rocksdb_db_options->delayed_write_rate = rocksdb_delayed_write_rate; std::shared_ptr<Rdb_logger> myrocks_logger = std::make_shared<Rdb_logger>(); diff --git a/storage/rocksdb/mysql-test/rocksdb/r/checksum_table.result b/storage/rocksdb/mysql-test/rocksdb/r/checksum_table.result index bb209856a97..85cf53044e1 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/checksum_table.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/checksum_table.result @@ -70,6 +70,8 @@ col3 double # Enable the old algorithm: set @tmp_old=@@old; set old=1; +Warnings: +Warning 1287 '@@old' is deprecated and will be removed in a future release. Please use '@@old_mode' instead checksum table t1; Table Checksum test.t1 0 @@ -89,4 +91,6 @@ checksum table t1; Table Checksum test.t1 3183101003 set old=@tmp_old; +Warnings: +Warning 1287 '@@old' is deprecated and will be removed in a future release. Please use '@@old_mode' instead drop table t1; diff --git a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_not_null.result b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_not_null.result index a3a138555ee..4a1fc17395d 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_not_null.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_not_null.result @@ -1423,11 +1423,11 @@ d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4 9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 ALTER TABLE t1 ADD COLUMN n66 NUMERIC(66) NOT NULL; -ERROR 42000: Too big precision 66 specified for 'n66'. Maximum is 65 +ERROR 42000: Too big precision specified for 'n66'. Maximum is 65 ALTER TABLE t1 ADD COLUMN n66_6 DECIMAL(66,6) NOT NULL; -ERROR 42000: Too big precision 66 specified for 'n66_6'. Maximum is 65 +ERROR 42000: Too big precision specified for 'n66_6'. Maximum is 65 ALTER TABLE t1 ADD COLUMN n66_66 DECIMAL(66,66) NOT NULL; -ERROR 42000: Too big scale 66 specified for 'n66_66'. Maximum is 38 +ERROR 42000: Too big scale specified for 'n66_66'. Maximum is 38 DROP TABLE t1; DROP TABLE IF EXISTS t1; #---------------------------------- @@ -1825,7 +1825,7 @@ r1_1 0.9 r1_1 0.9 ALTER TABLE t1 ADD COLUMN d0_0 DOUBLE(0,0) NOT NULL; ALTER TABLE t1 ADD COLUMN n66_6 DECIMAL(256,1) NOT NULL; -ERROR 42000: Too big precision 256 specified for 'n66_6'. Maximum is 65 +ERROR 42000: Too big precision specified for 'n66_6'. Maximum is 65 ALTER TABLE t1 ADD COLUMN n66_66 DECIMAL(40,35) NOT NULL; DROP TABLE t1; DROP TABLE IF EXISTS t1; diff --git a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_null.result b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_null.result index f0d377890c5..d97fb8a2481 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_null.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_null.result @@ -1232,11 +1232,11 @@ d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4 9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 ALTER TABLE t1 ADD COLUMN n66 NUMERIC(66) NULL; -ERROR 42000: Too big precision 66 specified for 'n66'. Maximum is 65 +ERROR 42000: Too big precision specified for 'n66'. Maximum is 65 ALTER TABLE t1 ADD COLUMN n66_6 DECIMAL(66,6) NULL; -ERROR 42000: Too big precision 66 specified for 'n66_6'. Maximum is 65 +ERROR 42000: Too big precision specified for 'n66_6'. Maximum is 65 ALTER TABLE t1 ADD COLUMN n66_66 DECIMAL(66,66) NULL; -ERROR 42000: Too big scale 66 specified for 'n66_66'. Maximum is 38 +ERROR 42000: Too big scale specified for 'n66_66'. Maximum is 38 DROP TABLE t1; DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( @@ -1612,7 +1612,7 @@ r1_1 0.9 r1_1 0.9 ALTER TABLE t1 ADD COLUMN d0_0 DOUBLE(0,0) NULL; ALTER TABLE t1 ADD COLUMN n66_6 DECIMAL(256,1) NULL; -ERROR 42000: Too big precision 256 specified for 'n66_6'. Maximum is 65 +ERROR 42000: Too big precision specified for 'n66_6'. Maximum is 65 ALTER TABLE t1 ADD COLUMN n66_66 DECIMAL(40,35) NULL; DROP TABLE t1; DROP TABLE IF EXISTS t1; diff --git a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_unsigned.result b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_unsigned.result index 13445fc9326..0a8f49ebf36 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_unsigned.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_unsigned.result @@ -148,11 +148,11 @@ d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4 9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 ALTER TABLE t1 ADD COLUMN n66 NUMERIC(66) UNSIGNED; -ERROR 42000: Too big precision 66 specified for 'n66'. Maximum is 65 +ERROR 42000: Too big precision specified for 'n66'. Maximum is 65 ALTER TABLE t1 ADD COLUMN n66_6 DECIMAL(66,6) UNSIGNED; -ERROR 42000: Too big precision 66 specified for 'n66_6'. Maximum is 65 +ERROR 42000: Too big precision specified for 'n66_6'. Maximum is 65 ALTER TABLE t1 ADD COLUMN n66_66 DECIMAL(66,66) UNSIGNED; -ERROR 42000: Too big scale 66 specified for 'n66_66'. Maximum is 38 +ERROR 42000: Too big scale specified for 'n66_66'. Maximum is 38 DROP TABLE t1; CREATE TABLE t1 ( a DECIMAL UNSIGNED, @@ -499,7 +499,7 @@ r1_1 0.9 r1_1 0.9 ALTER TABLE t1 ADD COLUMN d0_0 DOUBLE(0,0) UNSIGNED; ALTER TABLE t1 ADD COLUMN n66_6 DECIMAL(256,1) UNSIGNED; -ERROR 42000: Too big precision 256 specified for 'n66_6'. Maximum is 65 +ERROR 42000: Too big precision specified for 'n66_6'. Maximum is 65 ALTER TABLE t1 ADD COLUMN n66_66 DECIMAL(40,35) UNSIGNED; DROP TABLE t1; CREATE TABLE t1 ( diff --git a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result index a23283306b0..989d28e773d 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result @@ -942,6 +942,7 @@ rocksdb_keep_log_file_num 1000 rocksdb_large_prefix OFF rocksdb_lock_scanned_rows OFF rocksdb_lock_wait_timeout 1 +rocksdb_log_dir rocksdb_log_file_time_to_roll 0 rocksdb_manifest_preallocation_size 4194304 rocksdb_manual_compaction_threads 0 diff --git a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_log_dir.result b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_log_dir.result new file mode 100644 index 00000000000..33f2e9f497c --- /dev/null +++ b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_log_dir.result @@ -0,0 +1,8 @@ +CREATE DATABASE mysqltest; +USE mysqltest; +CREATE TABLE t1 (a INT PRIMARY KEY); +INSERT INTO t1 VALUES(42); +DROP TABLE t1; +DROP DATABASE mysqltest; +Check for MyRocks info LOG files +db_LOG diff --git a/storage/rocksdb/mysql-test/rocksdb/r/type_fixed.result b/storage/rocksdb/mysql-test/rocksdb/r/type_fixed.result index 055952ea55f..fcbef547891 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/type_fixed.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/type_fixed.result @@ -123,9 +123,9 @@ d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4 9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 ALTER TABLE t1 ADD COLUMN n66 NUMERIC(66) ; -ERROR 42000: Too big precision 66 specified for 'n66'. Maximum is 65 +ERROR 42000: Too big precision specified for 'n66'. Maximum is 65 ALTER TABLE t1 ADD COLUMN n66_6 DECIMAL(66,6) ; -ERROR 42000: Too big precision 66 specified for 'n66_6'. Maximum is 65 +ERROR 42000: Too big precision specified for 'n66_6'. Maximum is 65 ALTER TABLE t1 ADD COLUMN n66_66 DECIMAL(66,66) ; -ERROR 42000: Too big scale 66 specified for 'n66_66'. Maximum is 38 +ERROR 42000: Too big scale specified for 'n66_66'. Maximum is 38 DROP TABLE t1; diff --git a/storage/rocksdb/mysql-test/rocksdb/r/type_float.result b/storage/rocksdb/mysql-test/rocksdb/r/type_float.result index 371b550d4ab..0cf5c5e0496 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/type_float.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/type_float.result @@ -309,6 +309,6 @@ r1_1 0.9 r1_1 0.9 ALTER TABLE t1 ADD COLUMN d0_0 DOUBLE(0,0) ; ALTER TABLE t1 ADD COLUMN n66_6 DECIMAL(256,1) ; -ERROR 42000: Too big precision 256 specified for 'n66_6'. Maximum is 65 +ERROR 42000: Too big precision specified for 'n66_6'. Maximum is 65 ALTER TABLE t1 ADD COLUMN n66_66 DECIMAL(40,35) ; DROP TABLE t1; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_log_dir.opt b/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_log_dir.opt new file mode 100644 index 00000000000..8e5da2c042c --- /dev/null +++ b/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_log_dir.opt @@ -0,0 +1,2 @@ +--plugin-load=$HA_ROCKSDB_SO --default-storage-engine=rocksdb --rocksdb_log_dir=$MYSQL_TMP_DIR + diff --git a/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_log_dir.test b/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_log_dir.test new file mode 100644 index 00000000000..948e12edb4d --- /dev/null +++ b/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_log_dir.test @@ -0,0 +1,15 @@ +--source include/have_rocksdb.inc + +CREATE DATABASE mysqltest; +USE mysqltest; +CREATE TABLE t1 (a INT PRIMARY KEY); +INSERT INTO t1 VALUES(42); +DROP TABLE t1; +DROP DATABASE mysqltest; + +--echo Check for MyRocks info LOG files +--replace_regex /.*LOG/db_LOG/ +--list_files $MYSQL_TMP_DIR *LOG + +# Clean up +remove_files_wildcard $MYSQL_TMP_DIR/./ *LOG; diff --git a/storage/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_log_dir_basic.result b/storage/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_log_dir_basic.result new file mode 100644 index 00000000000..b5caf639850 --- /dev/null +++ b/storage/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_log_dir_basic.result @@ -0,0 +1,7 @@ +SET @start_global_value = @@global.ROCKSDB_LOG_DIR; +SELECT @start_global_value; +@start_global_value + +"Trying to set variable @@global.ROCKSDB_LOG_DIR to 444. It should fail because it is readonly." +SET @@global.ROCKSDB_LOG_DIR = 444; +ERROR HY000: Variable 'rocksdb_log_dir' is a read only variable diff --git a/storage/rocksdb/mysql-test/rocksdb_sys_vars/t/rocksdb_log_dir_basic.test b/storage/rocksdb/mysql-test/rocksdb_sys_vars/t/rocksdb_log_dir_basic.test new file mode 100644 index 00000000000..b8ab9c18e70 --- /dev/null +++ b/storage/rocksdb/mysql-test/rocksdb_sys_vars/t/rocksdb_log_dir_basic.test @@ -0,0 +1,6 @@ +--source include/have_rocksdb.inc + +--let $sys_var=ROCKSDB_LOG_DIR +--let $read_only=1 +--let $session=0 +--source include/rocksdb_sys_var.inc diff --git a/storage/rocksdb/nosql_access.cc b/storage/rocksdb/nosql_access.cc index 9dcbe3fbcbc..080977f3722 100644 --- a/storage/rocksdb/nosql_access.cc +++ b/storage/rocksdb/nosql_access.cc @@ -12,7 +12,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ #define MYSQL_SERVER 1 diff --git a/storage/rocksdb/nosql_access.h b/storage/rocksdb/nosql_access.h index 70aaa400668..c6e75ec01c3 100644 --- a/storage/rocksdb/nosql_access.h +++ b/storage/rocksdb/nosql_access.h @@ -12,7 +12,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ /* C++ standard header files */ #include <array> diff --git a/storage/rocksdb/rdb_converter.cc b/storage/rocksdb/rdb_converter.cc index 65f0b81cc7f..6f8aa306668 100644 --- a/storage/rocksdb/rdb_converter.cc +++ b/storage/rocksdb/rdb_converter.cc @@ -12,7 +12,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ #include <my_global.h> diff --git a/storage/rocksdb/rdb_converter.h b/storage/rocksdb/rdb_converter.h index a4eae341f16..6ace89b3366 100644 --- a/storage/rocksdb/rdb_converter.h +++ b/storage/rocksdb/rdb_converter.h @@ -12,7 +12,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ #pragma once diff --git a/storage/rocksdb/rdb_global.h b/storage/rocksdb/rdb_global.h index 7213571bf61..c6b7e705587 100644 --- a/storage/rocksdb/rdb_global.h +++ b/storage/rocksdb/rdb_global.h @@ -12,7 +12,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ /* MyRocks global type definitions goes here */ |