summaryrefslogtreecommitdiff
path: root/storage/rocksdb
diff options
context:
space:
mode:
Diffstat (limited to 'storage/rocksdb')
-rw-r--r--storage/rocksdb/CMakeLists.txt3
-rw-r--r--storage/rocksdb/ha_rocksdb.cc55
-rw-r--r--storage/rocksdb/ha_rocksdb.h2
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/col_opt_not_null.result174
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/col_opt_null.result174
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/col_opt_unsigned.result96
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/corrupted_data_reads_debug.result10
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result1
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/tbl_opt_data_index_dir.result24
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/type_char.result18
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/type_int.result128
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/type_varbinary.result14
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result14
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/t/tbl_opt_data_index_dir.test16
-rw-r--r--storage/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_ignore_datadic_errors_basic.result7
-rw-r--r--storage/rocksdb/mysql-test/rocksdb_sys_vars/t/rocksdb_ignore_datadic_errors_basic.test6
-rw-r--r--storage/rocksdb/rdb_datadic.cc6
17 files changed, 412 insertions, 336 deletions
diff --git a/storage/rocksdb/CMakeLists.txt b/storage/rocksdb/CMakeLists.txt
index c803016574f..3a7922515a7 100644
--- a/storage/rocksdb/CMakeLists.txt
+++ b/storage/rocksdb/CMakeLists.txt
@@ -129,7 +129,8 @@ SET(ROCKSDB_SE_SOURCES
# This is a strong requirement coming from RocksDB. No conditional checks here.
#ADD_DEFINITIONS(-DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX
#)
-if(CMAKE_SYSTEM_PROCESSOR STREQUAL "riscv64")
+
+if (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
SET(ATOMIC_EXTRA_LIBS -latomic)
else()
SET(ATOMIC_EXTRA_LIBS)
diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc
index 1f2913b1d67..79398a49648 100644
--- a/storage/rocksdb/ha_rocksdb.cc
+++ b/storage/rocksdb/ha_rocksdb.cc
@@ -637,6 +637,8 @@ static my_bool rocksdb_large_prefix = 0;
static my_bool rocksdb_allow_to_start_after_corruption = 0;
static char* rocksdb_git_hash;
+uint32_t rocksdb_ignore_datadic_errors = 0;
+
char *compression_types_val=
const_cast<char*>(get_rocksdb_supported_compression_types());
static unsigned long rocksdb_write_policy =
@@ -1907,6 +1909,15 @@ static MYSQL_SYSVAR_UINT(
nullptr, nullptr, 1 /* default value */, 0 /* min value */,
2 /* max value */, 0);
+static MYSQL_SYSVAR_UINT(
+ ignore_datadic_errors, rocksdb_ignore_datadic_errors,
+ PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
+ "Ignore MyRocks' data directory errors. "
+ "(CAUTION: Use only to start the server and perform repairs. Do NOT use "
+ "for regular operation)",
+ nullptr, nullptr, 0 /* default value */, 0 /* min value */,
+ 1 /* max value */, 0);
+
static MYSQL_SYSVAR_STR(datadir, rocksdb_datadir,
PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY,
"RocksDB data directory", nullptr, nullptr,
@@ -2142,6 +2153,8 @@ static struct st_mysql_sys_var *rocksdb_system_variables[] = {
MYSQL_SYSVAR(rollback_on_timeout),
MYSQL_SYSVAR(enable_insert_with_update_caching),
+
+ MYSQL_SYSVAR(ignore_datadic_errors),
nullptr};
static rocksdb::WriteOptions rdb_get_rocksdb_write_options(
@@ -5215,6 +5228,13 @@ static int rocksdb_init_func(void *const p) {
DBUG_RETURN(1);
}
+ if (rocksdb_ignore_datadic_errors)
+ {
+ sql_print_information(
+ "CAUTION: Running with rocksdb_ignore_datadic_errors=1. "
+ " This should only be used to perform repairs");
+ }
+
if (rdb_check_rocksdb_corruption()) {
// NO_LINT_DEBUG
sql_print_error(
@@ -5645,7 +5665,14 @@ static int rocksdb_init_func(void *const p) {
if (ddl_manager.init(&dict_manager, &cf_manager, rocksdb_validate_tables)) {
// NO_LINT_DEBUG
sql_print_error("RocksDB: Failed to initialize DDL manager.");
- DBUG_RETURN(HA_EXIT_FAILURE);
+
+ if (rocksdb_ignore_datadic_errors)
+ {
+ sql_print_error("RocksDB: rocksdb_ignore_datadic_errors=1, "
+ "trying to continue");
+ }
+ else
+ DBUG_RETURN(HA_EXIT_FAILURE);
}
Rdb_sst_info::init(rdb);
@@ -6718,6 +6745,26 @@ int ha_rocksdb::open(const char *const name, int mode, uint test_if_locked) {
"dictionary");
DBUG_RETURN(HA_ERR_ROCKSDB_INVALID_TABLE);
}
+ if (m_tbl_def->m_key_count != table->s->keys + has_hidden_pk(table)? 1:0)
+ {
+ sql_print_error("MyRocks: DDL mismatch: .frm file has %u indexes, "
+ "MyRocks has %u (%s hidden pk)",
+ table->s->keys, m_tbl_def->m_key_count,
+ has_hidden_pk(table)? "1" : "no");
+
+ if (rocksdb_ignore_datadic_errors)
+ {
+ sql_print_error("MyRocks: rocksdb_ignore_datadic_errors=1, "
+ "trying to continue");
+ }
+ else
+ {
+ my_error(ER_INTERNAL_ERROR, MYF(0),
+ "MyRocks: DDL mismatch. Check the error log for details");
+ DBUG_RETURN(HA_ERR_ROCKSDB_INVALID_TABLE);
+ }
+ }
+
m_lock_rows = RDB_LOCK_NONE;
m_key_descr_arr = m_tbl_def->m_key_descr_arr;
@@ -11613,6 +11660,12 @@ void Rdb_drop_index_thread::run() {
"from cf id %u. MyRocks data dictionary may "
"get corrupted.",
d.cf_id);
+ if (rocksdb_ignore_datadic_errors)
+ {
+ sql_print_error("RocksDB: rocksdb_ignore_datadic_errors=1, "
+ "trying to continue");
+ continue;
+ }
abort();
}
rocksdb::ColumnFamilyHandle *cfh = cf_manager.get_cf(d.cf_id);
diff --git a/storage/rocksdb/ha_rocksdb.h b/storage/rocksdb/ha_rocksdb.h
index d17b513ec01..00dd0ff4624 100644
--- a/storage/rocksdb/ha_rocksdb.h
+++ b/storage/rocksdb/ha_rocksdb.h
@@ -1061,6 +1061,8 @@ const int MYROCKS_MARIADB_PLUGIN_MATURITY_LEVEL= MariaDB_PLUGIN_MATURITY_STABLE;
extern bool prevent_myrocks_loading;
+extern uint32_t rocksdb_ignore_datadic_errors;
+
void sql_print_verbose_info(const char *format, ...);
} // namespace myrocks
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 e5a8d2dd2d3..b3df869a0a7 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
@@ -157,13 +157,13 @@ Warning 1265 Data truncated for column 'v64' at row 1
Warning 1265 Data truncated for column 'v65000' at row 1
INSERT INTO t1 (v0,v1,v64,v65000) SELECT v65000, v65000, CONCAT('a',v65000), CONCAT(v65000,v1) FROM t1;
Warnings:
-Warning 1265 Data truncated for column 'v0' at row 5
-Warning 1265 Data truncated for column 'v1' at row 5
-Warning 1265 Data truncated for column 'v64' at row 5
-Warning 1265 Data truncated for column 'v0' at row 6
-Warning 1265 Data truncated for column 'v1' at row 6
-Warning 1265 Data truncated for column 'v64' at row 6
-Warning 1265 Data truncated for column 'v65000' at row 6
+Warning 1265 Data truncated for column 'v0' at row 2
+Warning 1265 Data truncated for column 'v1' at row 2
+Warning 1265 Data truncated for column 'v64' at row 2
+Warning 1265 Data truncated for column 'v0' at row 3
+Warning 1265 Data truncated for column 'v1' at row 3
+Warning 1265 Data truncated for column 'v64' at row 3
+Warning 1265 Data truncated for column 'v65000' at row 3
SELECT HEX(v0), HEX(v1), HEX(v64), LENGTH(HEX(v65000)) FROM t1;
HEX(v0) HEX(v1) HEX(v64) LENGTH(HEX(v65000))
0
@@ -675,15 +675,15 @@ Warning 1265 Data truncated for column 'c20' at row 1
Warning 1265 Data truncated for column 'c255' at row 1
INSERT INTO t1 (c,c0,c1,c20,c255) SELECT c255, c255, c255, c255, CONCAT('a',c255,c1) FROM t1;
Warnings:
-Warning 1265 Data truncated for column 'c' at row 5
-Warning 1265 Data truncated for column 'c0' at row 5
-Warning 1265 Data truncated for column 'c1' at row 5
-Warning 1265 Data truncated for column 'c20' at row 5
-Warning 1265 Data truncated for column 'c' at row 6
-Warning 1265 Data truncated for column 'c0' at row 6
-Warning 1265 Data truncated for column 'c1' at row 6
-Warning 1265 Data truncated for column 'c20' at row 6
-Warning 1265 Data truncated for column 'c255' at row 6
+Warning 1265 Data truncated for column 'c' at row 2
+Warning 1265 Data truncated for column 'c0' at row 2
+Warning 1265 Data truncated for column 'c1' at row 2
+Warning 1265 Data truncated for column 'c20' at row 2
+Warning 1265 Data truncated for column 'c' at row 3
+Warning 1265 Data truncated for column 'c0' at row 3
+Warning 1265 Data truncated for column 'c1' at row 3
+Warning 1265 Data truncated for column 'c20' at row 3
+Warning 1265 Data truncated for column 'c255' at row 3
SELECT c,c0,c1,c20,c255 FROM t1;
c c0 c1 c20 c255
@@ -845,13 +845,13 @@ Warning 1265 Data truncated for column 'v64' at row 1
Warning 1265 Data truncated for column 'v65000' at row 1
INSERT INTO t1 (v0,v1,v64,v65000) SELECT v65000, v65000, CONCAT('a',v65000), CONCAT(v65000,v1) FROM t1;
Warnings:
-Warning 1265 Data truncated for column 'v0' at row 5
-Warning 1265 Data truncated for column 'v1' at row 5
-Warning 1265 Data truncated for column 'v64' at row 5
-Warning 1265 Data truncated for column 'v65000' at row 5
-Warning 1265 Data truncated for column 'v0' at row 6
-Warning 1265 Data truncated for column 'v1' at row 6
-Warning 1265 Data truncated for column 'v64' at row 6
+Warning 1265 Data truncated for column 'v0' at row 2
+Warning 1265 Data truncated for column 'v1' at row 2
+Warning 1265 Data truncated for column 'v64' at row 2
+Warning 1265 Data truncated for column 'v65000' at row 2
+Warning 1265 Data truncated for column 'v0' at row 3
+Warning 1265 Data truncated for column 'v1' at row 3
+Warning 1265 Data truncated for column 'v64' at row 3
SELECT v0, v1, v64, LENGTH(v65000) FROM t1;
v0 v1 v64 LENGTH(v65000)
0
@@ -2038,70 +2038,70 @@ Warning 1264 Out of range value for column 'b1' at row 1
Warning 1264 Out of range value for column 'b20' at row 1
INSERT INTO t1 (i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20) SELECT b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b FROM t1 WHERE b IN (-9223372036854775808,9223372036854775807,18446744073709551615);
Warnings:
-Warning 1264 Out of range value for column 'i' at row 8
-Warning 1264 Out of range value for column 'i0' at row 8
-Warning 1264 Out of range value for column 'i1' at row 8
-Warning 1264 Out of range value for column 'i20' at row 8
-Warning 1264 Out of range value for column 't' at row 8
-Warning 1264 Out of range value for column 't0' at row 8
-Warning 1264 Out of range value for column 't1' at row 8
-Warning 1264 Out of range value for column 't20' at row 8
-Warning 1264 Out of range value for column 's' at row 8
-Warning 1264 Out of range value for column 's0' at row 8
-Warning 1264 Out of range value for column 's1' at row 8
-Warning 1264 Out of range value for column 's20' at row 8
-Warning 1264 Out of range value for column 'm' at row 8
-Warning 1264 Out of range value for column 'm0' at row 8
-Warning 1264 Out of range value for column 'm1' at row 8
-Warning 1264 Out of range value for column 'm20' at row 8
-Warning 1264 Out of range value for column 'i' at row 9
-Warning 1264 Out of range value for column 'i0' at row 9
-Warning 1264 Out of range value for column 'i1' at row 9
-Warning 1264 Out of range value for column 'i20' at row 9
-Warning 1264 Out of range value for column 't' at row 9
-Warning 1264 Out of range value for column 't0' at row 9
-Warning 1264 Out of range value for column 't1' at row 9
-Warning 1264 Out of range value for column 't20' at row 9
-Warning 1264 Out of range value for column 's' at row 9
-Warning 1264 Out of range value for column 's0' at row 9
-Warning 1264 Out of range value for column 's1' at row 9
-Warning 1264 Out of range value for column 's20' at row 9
-Warning 1264 Out of range value for column 'm' at row 9
-Warning 1264 Out of range value for column 'm0' at row 9
-Warning 1264 Out of range value for column 'm1' at row 9
-Warning 1264 Out of range value for column 'm20' at row 9
-Warning 1264 Out of range value for column 'i' at row 10
-Warning 1264 Out of range value for column 'i0' at row 10
-Warning 1264 Out of range value for column 'i1' at row 10
-Warning 1264 Out of range value for column 'i20' at row 10
-Warning 1264 Out of range value for column 't' at row 10
-Warning 1264 Out of range value for column 't0' at row 10
-Warning 1264 Out of range value for column 't1' at row 10
-Warning 1264 Out of range value for column 't20' at row 10
-Warning 1264 Out of range value for column 's' at row 10
-Warning 1264 Out of range value for column 's0' at row 10
-Warning 1264 Out of range value for column 's1' at row 10
-Warning 1264 Out of range value for column 's20' at row 10
-Warning 1264 Out of range value for column 'm' at row 10
-Warning 1264 Out of range value for column 'm0' at row 10
-Warning 1264 Out of range value for column 'm1' at row 10
-Warning 1264 Out of range value for column 'm20' at row 10
-Warning 1264 Out of range value for column 'i' at row 11
-Warning 1264 Out of range value for column 'i0' at row 11
-Warning 1264 Out of range value for column 'i1' at row 11
-Warning 1264 Out of range value for column 'i20' at row 11
-Warning 1264 Out of range value for column 't' at row 11
-Warning 1264 Out of range value for column 't0' at row 11
-Warning 1264 Out of range value for column 't1' at row 11
-Warning 1264 Out of range value for column 't20' at row 11
-Warning 1264 Out of range value for column 's' at row 11
-Warning 1264 Out of range value for column 's0' at row 11
-Warning 1264 Out of range value for column 's1' at row 11
-Warning 1264 Out of range value for column 's20' at row 11
-Warning 1264 Out of range value for column 'm' at row 11
-Warning 1264 Out of range value for column 'm0' at row 11
-Warning 1264 Out of range value for column 'm1' at row 11
-Warning 1264 Out of range value for column 'm20' at row 11
+Warning 1264 Out of range value for column 'i' at row 1
+Warning 1264 Out of range value for column 'i0' at row 1
+Warning 1264 Out of range value for column 'i1' at row 1
+Warning 1264 Out of range value for column 'i20' at row 1
+Warning 1264 Out of range value for column 't' at row 1
+Warning 1264 Out of range value for column 't0' at row 1
+Warning 1264 Out of range value for column 't1' at row 1
+Warning 1264 Out of range value for column 't20' at row 1
+Warning 1264 Out of range value for column 's' at row 1
+Warning 1264 Out of range value for column 's0' at row 1
+Warning 1264 Out of range value for column 's1' at row 1
+Warning 1264 Out of range value for column 's20' at row 1
+Warning 1264 Out of range value for column 'm' at row 1
+Warning 1264 Out of range value for column 'm0' at row 1
+Warning 1264 Out of range value for column 'm1' at row 1
+Warning 1264 Out of range value for column 'm20' at row 1
+Warning 1264 Out of range value for column 'i' at row 2
+Warning 1264 Out of range value for column 'i0' at row 2
+Warning 1264 Out of range value for column 'i1' at row 2
+Warning 1264 Out of range value for column 'i20' at row 2
+Warning 1264 Out of range value for column 't' at row 2
+Warning 1264 Out of range value for column 't0' at row 2
+Warning 1264 Out of range value for column 't1' at row 2
+Warning 1264 Out of range value for column 't20' at row 2
+Warning 1264 Out of range value for column 's' at row 2
+Warning 1264 Out of range value for column 's0' at row 2
+Warning 1264 Out of range value for column 's1' at row 2
+Warning 1264 Out of range value for column 's20' at row 2
+Warning 1264 Out of range value for column 'm' at row 2
+Warning 1264 Out of range value for column 'm0' at row 2
+Warning 1264 Out of range value for column 'm1' at row 2
+Warning 1264 Out of range value for column 'm20' at row 2
+Warning 1264 Out of range value for column 'i' at row 3
+Warning 1264 Out of range value for column 'i0' at row 3
+Warning 1264 Out of range value for column 'i1' at row 3
+Warning 1264 Out of range value for column 'i20' at row 3
+Warning 1264 Out of range value for column 't' at row 3
+Warning 1264 Out of range value for column 't0' at row 3
+Warning 1264 Out of range value for column 't1' at row 3
+Warning 1264 Out of range value for column 't20' at row 3
+Warning 1264 Out of range value for column 's' at row 3
+Warning 1264 Out of range value for column 's0' at row 3
+Warning 1264 Out of range value for column 's1' at row 3
+Warning 1264 Out of range value for column 's20' at row 3
+Warning 1264 Out of range value for column 'm' at row 3
+Warning 1264 Out of range value for column 'm0' at row 3
+Warning 1264 Out of range value for column 'm1' at row 3
+Warning 1264 Out of range value for column 'm20' at row 3
+Warning 1264 Out of range value for column 'i' at row 4
+Warning 1264 Out of range value for column 'i0' at row 4
+Warning 1264 Out of range value for column 'i1' at row 4
+Warning 1264 Out of range value for column 'i20' at row 4
+Warning 1264 Out of range value for column 't' at row 4
+Warning 1264 Out of range value for column 't0' at row 4
+Warning 1264 Out of range value for column 't1' at row 4
+Warning 1264 Out of range value for column 't20' at row 4
+Warning 1264 Out of range value for column 's' at row 4
+Warning 1264 Out of range value for column 's0' at row 4
+Warning 1264 Out of range value for column 's1' at row 4
+Warning 1264 Out of range value for column 's20' at row 4
+Warning 1264 Out of range value for column 'm' at row 4
+Warning 1264 Out of range value for column 'm0' at row 4
+Warning 1264 Out of range value for column 'm1' at row 4
+Warning 1264 Out of range value for column 'm20' at row 4
SELECT i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20 FROM t1;
i i0 i1 i20 t t0 t1 t20 s s0 s1 s20 m m0 m1 m20 b b0 b1 b20
-2147483648 -2147483648 -2147483648 -2147483648 -128 -128 -128 -128 -32768 -32768 -32768 -32768 -8388608 -8388608 -8388608 -8388608 -9223372036854775808 -9223372036854775808 -9223372036854775808 -9223372036854775808
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 ac87cb02571..f0cd1a7e8b3 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_null.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_null.result
@@ -146,13 +146,13 @@ Warning 1265 Data truncated for column 'v64' at row 1
Warning 1265 Data truncated for column 'v65000' at row 1
INSERT INTO t1 (v0,v1,v64,v65000) SELECT v65000, v65000, CONCAT('a',v65000), CONCAT(v65000,v1) FROM t1;
Warnings:
-Warning 1265 Data truncated for column 'v0' at row 5
-Warning 1265 Data truncated for column 'v1' at row 5
-Warning 1265 Data truncated for column 'v64' at row 5
-Warning 1265 Data truncated for column 'v0' at row 6
-Warning 1265 Data truncated for column 'v1' at row 6
-Warning 1265 Data truncated for column 'v64' at row 6
-Warning 1265 Data truncated for column 'v65000' at row 6
+Warning 1265 Data truncated for column 'v0' at row 2
+Warning 1265 Data truncated for column 'v1' at row 2
+Warning 1265 Data truncated for column 'v64' at row 2
+Warning 1265 Data truncated for column 'v0' at row 3
+Warning 1265 Data truncated for column 'v1' at row 3
+Warning 1265 Data truncated for column 'v64' at row 3
+Warning 1265 Data truncated for column 'v65000' at row 3
SELECT HEX(v0), HEX(v1), HEX(v64), LENGTH(HEX(v65000)) FROM t1;
HEX(v0) HEX(v1) HEX(v64) LENGTH(HEX(v65000))
0
@@ -587,15 +587,15 @@ Warning 1265 Data truncated for column 'c20' at row 1
Warning 1265 Data truncated for column 'c255' at row 1
INSERT INTO t1 (c,c0,c1,c20,c255) SELECT c255, c255, c255, c255, CONCAT('a',c255,c1) FROM t1;
Warnings:
-Warning 1265 Data truncated for column 'c' at row 5
-Warning 1265 Data truncated for column 'c0' at row 5
-Warning 1265 Data truncated for column 'c1' at row 5
-Warning 1265 Data truncated for column 'c20' at row 5
-Warning 1265 Data truncated for column 'c' at row 6
-Warning 1265 Data truncated for column 'c0' at row 6
-Warning 1265 Data truncated for column 'c1' at row 6
-Warning 1265 Data truncated for column 'c20' at row 6
-Warning 1265 Data truncated for column 'c255' at row 6
+Warning 1265 Data truncated for column 'c' at row 2
+Warning 1265 Data truncated for column 'c0' at row 2
+Warning 1265 Data truncated for column 'c1' at row 2
+Warning 1265 Data truncated for column 'c20' at row 2
+Warning 1265 Data truncated for column 'c' at row 3
+Warning 1265 Data truncated for column 'c0' at row 3
+Warning 1265 Data truncated for column 'c1' at row 3
+Warning 1265 Data truncated for column 'c20' at row 3
+Warning 1265 Data truncated for column 'c255' at row 3
SELECT c,c0,c1,c20,c255 FROM t1;
c c0 c1 c20 c255
@@ -746,13 +746,13 @@ Warning 1265 Data truncated for column 'v64' at row 1
Warning 1265 Data truncated for column 'v65000' at row 1
INSERT INTO t1 (v0,v1,v64,v65000) SELECT v65000, v65000, CONCAT('a',v65000), CONCAT(v65000,v1) FROM t1;
Warnings:
-Warning 1265 Data truncated for column 'v0' at row 5
-Warning 1265 Data truncated for column 'v1' at row 5
-Warning 1265 Data truncated for column 'v64' at row 5
-Warning 1265 Data truncated for column 'v65000' at row 5
-Warning 1265 Data truncated for column 'v0' at row 6
-Warning 1265 Data truncated for column 'v1' at row 6
-Warning 1265 Data truncated for column 'v64' at row 6
+Warning 1265 Data truncated for column 'v0' at row 2
+Warning 1265 Data truncated for column 'v1' at row 2
+Warning 1265 Data truncated for column 'v64' at row 2
+Warning 1265 Data truncated for column 'v65000' at row 2
+Warning 1265 Data truncated for column 'v0' at row 3
+Warning 1265 Data truncated for column 'v1' at row 3
+Warning 1265 Data truncated for column 'v64' at row 3
SELECT v0, v1, v64, LENGTH(v65000) FROM t1;
v0 v1 v64 LENGTH(v65000)
0
@@ -1803,70 +1803,70 @@ Warning 1264 Out of range value for column 'b1' at row 1
Warning 1264 Out of range value for column 'b20' at row 1
INSERT INTO t1 (i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20) SELECT b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b FROM t1 WHERE b IN (-9223372036854775808,9223372036854775807,18446744073709551615);
Warnings:
-Warning 1264 Out of range value for column 'i' at row 8
-Warning 1264 Out of range value for column 'i0' at row 8
-Warning 1264 Out of range value for column 'i1' at row 8
-Warning 1264 Out of range value for column 'i20' at row 8
-Warning 1264 Out of range value for column 't' at row 8
-Warning 1264 Out of range value for column 't0' at row 8
-Warning 1264 Out of range value for column 't1' at row 8
-Warning 1264 Out of range value for column 't20' at row 8
-Warning 1264 Out of range value for column 's' at row 8
-Warning 1264 Out of range value for column 's0' at row 8
-Warning 1264 Out of range value for column 's1' at row 8
-Warning 1264 Out of range value for column 's20' at row 8
-Warning 1264 Out of range value for column 'm' at row 8
-Warning 1264 Out of range value for column 'm0' at row 8
-Warning 1264 Out of range value for column 'm1' at row 8
-Warning 1264 Out of range value for column 'm20' at row 8
-Warning 1264 Out of range value for column 'i' at row 9
-Warning 1264 Out of range value for column 'i0' at row 9
-Warning 1264 Out of range value for column 'i1' at row 9
-Warning 1264 Out of range value for column 'i20' at row 9
-Warning 1264 Out of range value for column 't' at row 9
-Warning 1264 Out of range value for column 't0' at row 9
-Warning 1264 Out of range value for column 't1' at row 9
-Warning 1264 Out of range value for column 't20' at row 9
-Warning 1264 Out of range value for column 's' at row 9
-Warning 1264 Out of range value for column 's0' at row 9
-Warning 1264 Out of range value for column 's1' at row 9
-Warning 1264 Out of range value for column 's20' at row 9
-Warning 1264 Out of range value for column 'm' at row 9
-Warning 1264 Out of range value for column 'm0' at row 9
-Warning 1264 Out of range value for column 'm1' at row 9
-Warning 1264 Out of range value for column 'm20' at row 9
-Warning 1264 Out of range value for column 'i' at row 10
-Warning 1264 Out of range value for column 'i0' at row 10
-Warning 1264 Out of range value for column 'i1' at row 10
-Warning 1264 Out of range value for column 'i20' at row 10
-Warning 1264 Out of range value for column 't' at row 10
-Warning 1264 Out of range value for column 't0' at row 10
-Warning 1264 Out of range value for column 't1' at row 10
-Warning 1264 Out of range value for column 't20' at row 10
-Warning 1264 Out of range value for column 's' at row 10
-Warning 1264 Out of range value for column 's0' at row 10
-Warning 1264 Out of range value for column 's1' at row 10
-Warning 1264 Out of range value for column 's20' at row 10
-Warning 1264 Out of range value for column 'm' at row 10
-Warning 1264 Out of range value for column 'm0' at row 10
-Warning 1264 Out of range value for column 'm1' at row 10
-Warning 1264 Out of range value for column 'm20' at row 10
-Warning 1264 Out of range value for column 'i' at row 11
-Warning 1264 Out of range value for column 'i0' at row 11
-Warning 1264 Out of range value for column 'i1' at row 11
-Warning 1264 Out of range value for column 'i20' at row 11
-Warning 1264 Out of range value for column 't' at row 11
-Warning 1264 Out of range value for column 't0' at row 11
-Warning 1264 Out of range value for column 't1' at row 11
-Warning 1264 Out of range value for column 't20' at row 11
-Warning 1264 Out of range value for column 's' at row 11
-Warning 1264 Out of range value for column 's0' at row 11
-Warning 1264 Out of range value for column 's1' at row 11
-Warning 1264 Out of range value for column 's20' at row 11
-Warning 1264 Out of range value for column 'm' at row 11
-Warning 1264 Out of range value for column 'm0' at row 11
-Warning 1264 Out of range value for column 'm1' at row 11
-Warning 1264 Out of range value for column 'm20' at row 11
+Warning 1264 Out of range value for column 'i' at row 1
+Warning 1264 Out of range value for column 'i0' at row 1
+Warning 1264 Out of range value for column 'i1' at row 1
+Warning 1264 Out of range value for column 'i20' at row 1
+Warning 1264 Out of range value for column 't' at row 1
+Warning 1264 Out of range value for column 't0' at row 1
+Warning 1264 Out of range value for column 't1' at row 1
+Warning 1264 Out of range value for column 't20' at row 1
+Warning 1264 Out of range value for column 's' at row 1
+Warning 1264 Out of range value for column 's0' at row 1
+Warning 1264 Out of range value for column 's1' at row 1
+Warning 1264 Out of range value for column 's20' at row 1
+Warning 1264 Out of range value for column 'm' at row 1
+Warning 1264 Out of range value for column 'm0' at row 1
+Warning 1264 Out of range value for column 'm1' at row 1
+Warning 1264 Out of range value for column 'm20' at row 1
+Warning 1264 Out of range value for column 'i' at row 2
+Warning 1264 Out of range value for column 'i0' at row 2
+Warning 1264 Out of range value for column 'i1' at row 2
+Warning 1264 Out of range value for column 'i20' at row 2
+Warning 1264 Out of range value for column 't' at row 2
+Warning 1264 Out of range value for column 't0' at row 2
+Warning 1264 Out of range value for column 't1' at row 2
+Warning 1264 Out of range value for column 't20' at row 2
+Warning 1264 Out of range value for column 's' at row 2
+Warning 1264 Out of range value for column 's0' at row 2
+Warning 1264 Out of range value for column 's1' at row 2
+Warning 1264 Out of range value for column 's20' at row 2
+Warning 1264 Out of range value for column 'm' at row 2
+Warning 1264 Out of range value for column 'm0' at row 2
+Warning 1264 Out of range value for column 'm1' at row 2
+Warning 1264 Out of range value for column 'm20' at row 2
+Warning 1264 Out of range value for column 'i' at row 3
+Warning 1264 Out of range value for column 'i0' at row 3
+Warning 1264 Out of range value for column 'i1' at row 3
+Warning 1264 Out of range value for column 'i20' at row 3
+Warning 1264 Out of range value for column 't' at row 3
+Warning 1264 Out of range value for column 't0' at row 3
+Warning 1264 Out of range value for column 't1' at row 3
+Warning 1264 Out of range value for column 't20' at row 3
+Warning 1264 Out of range value for column 's' at row 3
+Warning 1264 Out of range value for column 's0' at row 3
+Warning 1264 Out of range value for column 's1' at row 3
+Warning 1264 Out of range value for column 's20' at row 3
+Warning 1264 Out of range value for column 'm' at row 3
+Warning 1264 Out of range value for column 'm0' at row 3
+Warning 1264 Out of range value for column 'm1' at row 3
+Warning 1264 Out of range value for column 'm20' at row 3
+Warning 1264 Out of range value for column 'i' at row 4
+Warning 1264 Out of range value for column 'i0' at row 4
+Warning 1264 Out of range value for column 'i1' at row 4
+Warning 1264 Out of range value for column 'i20' at row 4
+Warning 1264 Out of range value for column 't' at row 4
+Warning 1264 Out of range value for column 't0' at row 4
+Warning 1264 Out of range value for column 't1' at row 4
+Warning 1264 Out of range value for column 't20' at row 4
+Warning 1264 Out of range value for column 's' at row 4
+Warning 1264 Out of range value for column 's0' at row 4
+Warning 1264 Out of range value for column 's1' at row 4
+Warning 1264 Out of range value for column 's20' at row 4
+Warning 1264 Out of range value for column 'm' at row 4
+Warning 1264 Out of range value for column 'm0' at row 4
+Warning 1264 Out of range value for column 'm1' at row 4
+Warning 1264 Out of range value for column 'm20' at row 4
SELECT i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20 FROM t1;
i i0 i1 i20 t t0 t1 t20 s s0 s1 s20 m m0 m1 m20 b b0 b1 b20
-2147483648 -2147483648 -2147483648 -2147483648 -128 -128 -128 -128 -32768 -32768 -32768 -32768 -8388608 -8388608 -8388608 -8388608 -9223372036854775808 -9223372036854775808 -9223372036854775808 -9223372036854775808
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 439f9be9a8a..13445fc9326 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_unsigned.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_unsigned.result
@@ -656,54 +656,54 @@ Warning 1264 Out of range value for column 'b1' at row 1
Warning 1264 Out of range value for column 'b20' at row 1
INSERT INTO t1 (i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20) SELECT b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b FROM t1 WHERE b IN (-9223372036854775808,9223372036854775807,18446744073709551615);
Warnings:
-Warning 1264 Out of range value for column 'i' at row 8
-Warning 1264 Out of range value for column 'i0' at row 8
-Warning 1264 Out of range value for column 'i1' at row 8
-Warning 1264 Out of range value for column 'i20' at row 8
-Warning 1264 Out of range value for column 't' at row 8
-Warning 1264 Out of range value for column 't0' at row 8
-Warning 1264 Out of range value for column 't1' at row 8
-Warning 1264 Out of range value for column 't20' at row 8
-Warning 1264 Out of range value for column 's' at row 8
-Warning 1264 Out of range value for column 's0' at row 8
-Warning 1264 Out of range value for column 's1' at row 8
-Warning 1264 Out of range value for column 's20' at row 8
-Warning 1264 Out of range value for column 'm' at row 8
-Warning 1264 Out of range value for column 'm0' at row 8
-Warning 1264 Out of range value for column 'm1' at row 8
-Warning 1264 Out of range value for column 'm20' at row 8
-Warning 1264 Out of range value for column 'i' at row 9
-Warning 1264 Out of range value for column 'i0' at row 9
-Warning 1264 Out of range value for column 'i1' at row 9
-Warning 1264 Out of range value for column 'i20' at row 9
-Warning 1264 Out of range value for column 't' at row 9
-Warning 1264 Out of range value for column 't0' at row 9
-Warning 1264 Out of range value for column 't1' at row 9
-Warning 1264 Out of range value for column 't20' at row 9
-Warning 1264 Out of range value for column 's' at row 9
-Warning 1264 Out of range value for column 's0' at row 9
-Warning 1264 Out of range value for column 's1' at row 9
-Warning 1264 Out of range value for column 's20' at row 9
-Warning 1264 Out of range value for column 'm' at row 9
-Warning 1264 Out of range value for column 'm0' at row 9
-Warning 1264 Out of range value for column 'm1' at row 9
-Warning 1264 Out of range value for column 'm20' at row 9
-Warning 1264 Out of range value for column 'i' at row 10
-Warning 1264 Out of range value for column 'i0' at row 10
-Warning 1264 Out of range value for column 'i1' at row 10
-Warning 1264 Out of range value for column 'i20' at row 10
-Warning 1264 Out of range value for column 't' at row 10
-Warning 1264 Out of range value for column 't0' at row 10
-Warning 1264 Out of range value for column 't1' at row 10
-Warning 1264 Out of range value for column 't20' at row 10
-Warning 1264 Out of range value for column 's' at row 10
-Warning 1264 Out of range value for column 's0' at row 10
-Warning 1264 Out of range value for column 's1' at row 10
-Warning 1264 Out of range value for column 's20' at row 10
-Warning 1264 Out of range value for column 'm' at row 10
-Warning 1264 Out of range value for column 'm0' at row 10
-Warning 1264 Out of range value for column 'm1' at row 10
-Warning 1264 Out of range value for column 'm20' at row 10
+Warning 1264 Out of range value for column 'i' at row 1
+Warning 1264 Out of range value for column 'i0' at row 1
+Warning 1264 Out of range value for column 'i1' at row 1
+Warning 1264 Out of range value for column 'i20' at row 1
+Warning 1264 Out of range value for column 't' at row 1
+Warning 1264 Out of range value for column 't0' at row 1
+Warning 1264 Out of range value for column 't1' at row 1
+Warning 1264 Out of range value for column 't20' at row 1
+Warning 1264 Out of range value for column 's' at row 1
+Warning 1264 Out of range value for column 's0' at row 1
+Warning 1264 Out of range value for column 's1' at row 1
+Warning 1264 Out of range value for column 's20' at row 1
+Warning 1264 Out of range value for column 'm' at row 1
+Warning 1264 Out of range value for column 'm0' at row 1
+Warning 1264 Out of range value for column 'm1' at row 1
+Warning 1264 Out of range value for column 'm20' at row 1
+Warning 1264 Out of range value for column 'i' at row 2
+Warning 1264 Out of range value for column 'i0' at row 2
+Warning 1264 Out of range value for column 'i1' at row 2
+Warning 1264 Out of range value for column 'i20' at row 2
+Warning 1264 Out of range value for column 't' at row 2
+Warning 1264 Out of range value for column 't0' at row 2
+Warning 1264 Out of range value for column 't1' at row 2
+Warning 1264 Out of range value for column 't20' at row 2
+Warning 1264 Out of range value for column 's' at row 2
+Warning 1264 Out of range value for column 's0' at row 2
+Warning 1264 Out of range value for column 's1' at row 2
+Warning 1264 Out of range value for column 's20' at row 2
+Warning 1264 Out of range value for column 'm' at row 2
+Warning 1264 Out of range value for column 'm0' at row 2
+Warning 1264 Out of range value for column 'm1' at row 2
+Warning 1264 Out of range value for column 'm20' at row 2
+Warning 1264 Out of range value for column 'i' at row 3
+Warning 1264 Out of range value for column 'i0' at row 3
+Warning 1264 Out of range value for column 'i1' at row 3
+Warning 1264 Out of range value for column 'i20' at row 3
+Warning 1264 Out of range value for column 't' at row 3
+Warning 1264 Out of range value for column 't0' at row 3
+Warning 1264 Out of range value for column 't1' at row 3
+Warning 1264 Out of range value for column 't20' at row 3
+Warning 1264 Out of range value for column 's' at row 3
+Warning 1264 Out of range value for column 's0' at row 3
+Warning 1264 Out of range value for column 's1' at row 3
+Warning 1264 Out of range value for column 's20' at row 3
+Warning 1264 Out of range value for column 'm' at row 3
+Warning 1264 Out of range value for column 'm0' at row 3
+Warning 1264 Out of range value for column 'm1' at row 3
+Warning 1264 Out of range value for column 'm20' at row 3
SELECT i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20 FROM t1;
i i0 i1 i20 t t0 t1 t20 s s0 s1 s20 m m0 m1 m20 b b0 b1 b20
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/corrupted_data_reads_debug.result b/storage/rocksdb/mysql-test/rocksdb/r/corrupted_data_reads_debug.result
index 01fa9dac7fd..88a62028be9 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/corrupted_data_reads_debug.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/corrupted_data_reads_debug.result
@@ -20,7 +20,7 @@ set @tmp1=@@rocksdb_verify_row_debug_checksums;
set rocksdb_verify_row_debug_checksums=1;
set session debug_dbug= "+d,myrocks_simulate_bad_row_read1";
select * from t1 where pk=1;
-ERROR HY000: Got error 203 'Found data corruption.' from ROCKSDB
+ERROR HY000: Got error 204 'Found data corruption.' from ROCKSDB
set session debug_dbug= "-d,myrocks_simulate_bad_row_read1";
set rocksdb_verify_row_debug_checksums=@tmp1;
select * from t1 where pk=1;
@@ -28,11 +28,11 @@ pk col1
1 1
set session debug_dbug= "+d,myrocks_simulate_bad_row_read2";
select * from t1 where pk=1;
-ERROR HY000: Got error 203 'Found data corruption.' from ROCKSDB
+ERROR HY000: Got error 204 'Found data corruption.' from ROCKSDB
set session debug_dbug= "-d,myrocks_simulate_bad_row_read2";
set session debug_dbug= "+d,myrocks_simulate_bad_row_read3";
select * from t1 where pk=1;
-ERROR HY000: Got error 203 'Found data corruption.' from ROCKSDB
+ERROR HY000: Got error 204 'Found data corruption.' from ROCKSDB
set session debug_dbug= "-d,myrocks_simulate_bad_row_read3";
insert into t1 values(4,'0123456789');
select * from t1;
@@ -56,7 +56,7 @@ pk col1
ABCD 1
set session debug_dbug= "+d,myrocks_simulate_bad_pk_read1";
select * from t2;
-ERROR HY000: Got error 203 'Found data corruption.' from ROCKSDB
+ERROR HY000: Got error 204 'Found data corruption.' from ROCKSDB
set session debug_dbug= "-d,myrocks_simulate_bad_pk_read1";
drop table t2;
create table t2 (
@@ -69,6 +69,6 @@ pk col1
ABCD 1
set session debug_dbug= "+d,myrocks_simulate_bad_pk_read1";
select * from t2;
-ERROR HY000: Got error 203 'Found data corruption.' from ROCKSDB
+ERROR HY000: Got error 204 'Found data corruption.' from ROCKSDB
set session debug_dbug= "-d,myrocks_simulate_bad_pk_read1";
drop table t2;
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result
index 95cbc3e7026..2dc3d02d4b1 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result
@@ -932,6 +932,7 @@ rocksdb_force_flush_memtable_now OFF
rocksdb_force_index_records_in_range 0
rocksdb_git_hash #
rocksdb_hash_index_allow_collision ON
+rocksdb_ignore_datadic_errors 0
rocksdb_ignore_unknown_options ON
rocksdb_index_type kBinarySearch
rocksdb_info_log_level error_level
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/tbl_opt_data_index_dir.result b/storage/rocksdb/mysql-test/rocksdb/r/tbl_opt_data_index_dir.result
index 90f163b7d4b..9691eeeffdf 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/tbl_opt_data_index_dir.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/tbl_opt_data_index_dir.result
@@ -1,16 +1,16 @@
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(8)) ENGINE=rocksdb DATA DIRECTORY = '/foo/bar/data';
-ERROR HY000: Can't create table `test`.`t1` (errno: 199 "Unknown error 199")
+ERROR HY000: Can't create table `test`.`t1` (errno: XXX "Unknown error XXX")
show warnings;
Level Code Message
-Error 1005 Can't create table `test`.`t1` (errno: 199 "Unknown error 199")
-Warning 1296 Got error 199 'Specifying DATA DIRECTORY for an individual table is not supported.' from ROCKSDB
+Error 1005 Can't create table `test`.`t1` (errno: XXX "Unknown error XXX")
+Warning 1296 Got error XXX 'Specifying DATA DIRECTORY for an individual table is not supported.' from ROCKSDB
CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(8)) ENGINE=rocksdb INDEX DIRECTORY = '/foo/bar/index';
-ERROR HY000: Can't create table `test`.`t1` (errno: 200 "Unknown error 200")
+ERROR HY000: Can't create table `test`.`t1` (errno: XXX "Unknown error XXX")
show warnings;
Level Code Message
-Error 1005 Can't create table `test`.`t1` (errno: 200 "Unknown error 200")
-Warning 1296 Got error 200 'Specifying INDEX DIRECTORY for an individual table is not supported.' from ROCKSDB
+Error 1005 Can't create table `test`.`t1` (errno: XXX "Unknown error XXX")
+Warning 1296 Got error XXX 'Specifying INDEX DIRECTORY for an individual table is not supported.' from ROCKSDB
CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY) ENGINE=rocksdb PARTITION BY RANGE (id)
(
PARTITION P0 VALUES LESS THAN (1000)
@@ -19,11 +19,11 @@ PARTITION P1 VALUES LESS THAN (2000)
DATA DIRECTORY = '/foo/bar/data/',
PARTITION P2 VALUES LESS THAN (MAXVALUE)
);
-ERROR HY000: Can't create table `test`.`t1` (errno: 199 "Unknown error 199")
+ERROR HY000: Can't create table `test`.`t1` (errno: XXX "Unknown error XXX")
show warnings;
Level Code Message
-Error 1005 Can't create table `test`.`t1` (errno: 199 "Unknown error 199")
-Warning 1296 Got error 199 'Specifying DATA DIRECTORY for an individual table is not supported.' from ROCKSDB
+Error 1005 Can't create table `test`.`t1` (errno: XXX "Unknown error XXX")
+Warning 1296 Got error XXX 'Specifying DATA DIRECTORY for an individual table is not supported.' from ROCKSDB
Error 6 Error on delete of './test/t1.par' (Errcode: 2 "No such file or directory")
CREATE TABLE t1 (id int not null primary key) ENGINE=rocksdb PARTITION BY RANGE (id)
(
@@ -33,9 +33,9 @@ PARTITION P1 VALUES LESS THAN (2000)
INDEX DIRECTORY = '/foo/bar/data/',
PARTITION P2 VALUES LESS THAN (MAXVALUE)
);
-ERROR HY000: Can't create table `test`.`t1` (errno: 200 "Unknown error 200")
+ERROR HY000: Can't create table `test`.`t1` (errno: XXX "Unknown error XXX")
show warnings;
Level Code Message
-Error 1005 Can't create table `test`.`t1` (errno: 200 "Unknown error 200")
-Warning 1296 Got error 200 'Specifying INDEX DIRECTORY for an individual table is not supported.' from ROCKSDB
+Error 1005 Can't create table `test`.`t1` (errno: XXX "Unknown error XXX")
+Warning 1296 Got error XXX 'Specifying INDEX DIRECTORY for an individual table is not supported.' from ROCKSDB
Error 6 Error on delete of './test/t1.par' (Errcode: 2 "No such file or directory")
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/type_char.result b/storage/rocksdb/mysql-test/rocksdb/r/type_char.result
index 1786dfae1e7..b35b5cb1832 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/type_char.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/type_char.result
@@ -29,15 +29,15 @@ Warning 1265 Data truncated for column 'c20' at row 1
Warning 1265 Data truncated for column 'c255' at row 1
INSERT INTO t1 (c,c0,c1,c20,c255) SELECT c255, c255, c255, c255, CONCAT('a',c255,c1) FROM t1;
Warnings:
-Warning 1265 Data truncated for column 'c' at row 5
-Warning 1265 Data truncated for column 'c0' at row 5
-Warning 1265 Data truncated for column 'c1' at row 5
-Warning 1265 Data truncated for column 'c20' at row 5
-Warning 1265 Data truncated for column 'c' at row 6
-Warning 1265 Data truncated for column 'c0' at row 6
-Warning 1265 Data truncated for column 'c1' at row 6
-Warning 1265 Data truncated for column 'c20' at row 6
-Warning 1265 Data truncated for column 'c255' at row 6
+Warning 1265 Data truncated for column 'c' at row 2
+Warning 1265 Data truncated for column 'c0' at row 2
+Warning 1265 Data truncated for column 'c1' at row 2
+Warning 1265 Data truncated for column 'c20' at row 2
+Warning 1265 Data truncated for column 'c' at row 3
+Warning 1265 Data truncated for column 'c0' at row 3
+Warning 1265 Data truncated for column 'c1' at row 3
+Warning 1265 Data truncated for column 'c20' at row 3
+Warning 1265 Data truncated for column 'c255' at row 3
SELECT c,c0,c1,c20,c255 FROM t1;
c c0 c1 c20 c255
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/type_int.result b/storage/rocksdb/mysql-test/rocksdb/r/type_int.result
index 306042912d0..b949a723f22 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/type_int.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/type_int.result
@@ -129,70 +129,70 @@ Warning 1264 Out of range value for column 'b1' at row 1
Warning 1264 Out of range value for column 'b20' at row 1
INSERT INTO t1 (i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20) SELECT b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b FROM t1 WHERE b IN (-9223372036854775808,9223372036854775807,18446744073709551615);
Warnings:
-Warning 1264 Out of range value for column 'i' at row 8
-Warning 1264 Out of range value for column 'i0' at row 8
-Warning 1264 Out of range value for column 'i1' at row 8
-Warning 1264 Out of range value for column 'i20' at row 8
-Warning 1264 Out of range value for column 't' at row 8
-Warning 1264 Out of range value for column 't0' at row 8
-Warning 1264 Out of range value for column 't1' at row 8
-Warning 1264 Out of range value for column 't20' at row 8
-Warning 1264 Out of range value for column 's' at row 8
-Warning 1264 Out of range value for column 's0' at row 8
-Warning 1264 Out of range value for column 's1' at row 8
-Warning 1264 Out of range value for column 's20' at row 8
-Warning 1264 Out of range value for column 'm' at row 8
-Warning 1264 Out of range value for column 'm0' at row 8
-Warning 1264 Out of range value for column 'm1' at row 8
-Warning 1264 Out of range value for column 'm20' at row 8
-Warning 1264 Out of range value for column 'i' at row 9
-Warning 1264 Out of range value for column 'i0' at row 9
-Warning 1264 Out of range value for column 'i1' at row 9
-Warning 1264 Out of range value for column 'i20' at row 9
-Warning 1264 Out of range value for column 't' at row 9
-Warning 1264 Out of range value for column 't0' at row 9
-Warning 1264 Out of range value for column 't1' at row 9
-Warning 1264 Out of range value for column 't20' at row 9
-Warning 1264 Out of range value for column 's' at row 9
-Warning 1264 Out of range value for column 's0' at row 9
-Warning 1264 Out of range value for column 's1' at row 9
-Warning 1264 Out of range value for column 's20' at row 9
-Warning 1264 Out of range value for column 'm' at row 9
-Warning 1264 Out of range value for column 'm0' at row 9
-Warning 1264 Out of range value for column 'm1' at row 9
-Warning 1264 Out of range value for column 'm20' at row 9
-Warning 1264 Out of range value for column 'i' at row 10
-Warning 1264 Out of range value for column 'i0' at row 10
-Warning 1264 Out of range value for column 'i1' at row 10
-Warning 1264 Out of range value for column 'i20' at row 10
-Warning 1264 Out of range value for column 't' at row 10
-Warning 1264 Out of range value for column 't0' at row 10
-Warning 1264 Out of range value for column 't1' at row 10
-Warning 1264 Out of range value for column 't20' at row 10
-Warning 1264 Out of range value for column 's' at row 10
-Warning 1264 Out of range value for column 's0' at row 10
-Warning 1264 Out of range value for column 's1' at row 10
-Warning 1264 Out of range value for column 's20' at row 10
-Warning 1264 Out of range value for column 'm' at row 10
-Warning 1264 Out of range value for column 'm0' at row 10
-Warning 1264 Out of range value for column 'm1' at row 10
-Warning 1264 Out of range value for column 'm20' at row 10
-Warning 1264 Out of range value for column 'i' at row 11
-Warning 1264 Out of range value for column 'i0' at row 11
-Warning 1264 Out of range value for column 'i1' at row 11
-Warning 1264 Out of range value for column 'i20' at row 11
-Warning 1264 Out of range value for column 't' at row 11
-Warning 1264 Out of range value for column 't0' at row 11
-Warning 1264 Out of range value for column 't1' at row 11
-Warning 1264 Out of range value for column 't20' at row 11
-Warning 1264 Out of range value for column 's' at row 11
-Warning 1264 Out of range value for column 's0' at row 11
-Warning 1264 Out of range value for column 's1' at row 11
-Warning 1264 Out of range value for column 's20' at row 11
-Warning 1264 Out of range value for column 'm' at row 11
-Warning 1264 Out of range value for column 'm0' at row 11
-Warning 1264 Out of range value for column 'm1' at row 11
-Warning 1264 Out of range value for column 'm20' at row 11
+Warning 1264 Out of range value for column 'i' at row 1
+Warning 1264 Out of range value for column 'i0' at row 1
+Warning 1264 Out of range value for column 'i1' at row 1
+Warning 1264 Out of range value for column 'i20' at row 1
+Warning 1264 Out of range value for column 't' at row 1
+Warning 1264 Out of range value for column 't0' at row 1
+Warning 1264 Out of range value for column 't1' at row 1
+Warning 1264 Out of range value for column 't20' at row 1
+Warning 1264 Out of range value for column 's' at row 1
+Warning 1264 Out of range value for column 's0' at row 1
+Warning 1264 Out of range value for column 's1' at row 1
+Warning 1264 Out of range value for column 's20' at row 1
+Warning 1264 Out of range value for column 'm' at row 1
+Warning 1264 Out of range value for column 'm0' at row 1
+Warning 1264 Out of range value for column 'm1' at row 1
+Warning 1264 Out of range value for column 'm20' at row 1
+Warning 1264 Out of range value for column 'i' at row 2
+Warning 1264 Out of range value for column 'i0' at row 2
+Warning 1264 Out of range value for column 'i1' at row 2
+Warning 1264 Out of range value for column 'i20' at row 2
+Warning 1264 Out of range value for column 't' at row 2
+Warning 1264 Out of range value for column 't0' at row 2
+Warning 1264 Out of range value for column 't1' at row 2
+Warning 1264 Out of range value for column 't20' at row 2
+Warning 1264 Out of range value for column 's' at row 2
+Warning 1264 Out of range value for column 's0' at row 2
+Warning 1264 Out of range value for column 's1' at row 2
+Warning 1264 Out of range value for column 's20' at row 2
+Warning 1264 Out of range value for column 'm' at row 2
+Warning 1264 Out of range value for column 'm0' at row 2
+Warning 1264 Out of range value for column 'm1' at row 2
+Warning 1264 Out of range value for column 'm20' at row 2
+Warning 1264 Out of range value for column 'i' at row 3
+Warning 1264 Out of range value for column 'i0' at row 3
+Warning 1264 Out of range value for column 'i1' at row 3
+Warning 1264 Out of range value for column 'i20' at row 3
+Warning 1264 Out of range value for column 't' at row 3
+Warning 1264 Out of range value for column 't0' at row 3
+Warning 1264 Out of range value for column 't1' at row 3
+Warning 1264 Out of range value for column 't20' at row 3
+Warning 1264 Out of range value for column 's' at row 3
+Warning 1264 Out of range value for column 's0' at row 3
+Warning 1264 Out of range value for column 's1' at row 3
+Warning 1264 Out of range value for column 's20' at row 3
+Warning 1264 Out of range value for column 'm' at row 3
+Warning 1264 Out of range value for column 'm0' at row 3
+Warning 1264 Out of range value for column 'm1' at row 3
+Warning 1264 Out of range value for column 'm20' at row 3
+Warning 1264 Out of range value for column 'i' at row 4
+Warning 1264 Out of range value for column 'i0' at row 4
+Warning 1264 Out of range value for column 'i1' at row 4
+Warning 1264 Out of range value for column 'i20' at row 4
+Warning 1264 Out of range value for column 't' at row 4
+Warning 1264 Out of range value for column 't0' at row 4
+Warning 1264 Out of range value for column 't1' at row 4
+Warning 1264 Out of range value for column 't20' at row 4
+Warning 1264 Out of range value for column 's' at row 4
+Warning 1264 Out of range value for column 's0' at row 4
+Warning 1264 Out of range value for column 's1' at row 4
+Warning 1264 Out of range value for column 's20' at row 4
+Warning 1264 Out of range value for column 'm' at row 4
+Warning 1264 Out of range value for column 'm0' at row 4
+Warning 1264 Out of range value for column 'm1' at row 4
+Warning 1264 Out of range value for column 'm20' at row 4
SELECT i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20 FROM t1;
i i0 i1 i20 t t0 t1 t20 s s0 s1 s20 m m0 m1 m20 b b0 b1 b20
-2147483648 -2147483648 -2147483648 -2147483648 -128 -128 -128 -128 -32768 -32768 -32768 -32768 -8388608 -8388608 -8388608 -8388608 -9223372036854775808 -9223372036854775808 -9223372036854775808 -9223372036854775808
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/type_varbinary.result b/storage/rocksdb/mysql-test/rocksdb/r/type_varbinary.result
index 6de8c0331cd..090a9dbb4e2 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/type_varbinary.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/type_varbinary.result
@@ -65,13 +65,13 @@ Warning 1265 Data truncated for column 'v64' at row 1
Warning 1265 Data truncated for column 'v65000' at row 1
INSERT INTO t1 (v0,v1,v64,v65000) SELECT v65000, v65000, CONCAT('a',v65000), CONCAT(v65000,v1) FROM t1;
Warnings:
-Warning 1265 Data truncated for column 'v0' at row 5
-Warning 1265 Data truncated for column 'v1' at row 5
-Warning 1265 Data truncated for column 'v64' at row 5
-Warning 1265 Data truncated for column 'v0' at row 6
-Warning 1265 Data truncated for column 'v1' at row 6
-Warning 1265 Data truncated for column 'v64' at row 6
-Warning 1265 Data truncated for column 'v65000' at row 6
+Warning 1265 Data truncated for column 'v0' at row 2
+Warning 1265 Data truncated for column 'v1' at row 2
+Warning 1265 Data truncated for column 'v64' at row 2
+Warning 1265 Data truncated for column 'v0' at row 3
+Warning 1265 Data truncated for column 'v1' at row 3
+Warning 1265 Data truncated for column 'v64' at row 3
+Warning 1265 Data truncated for column 'v65000' at row 3
SELECT HEX(v0), HEX(v1), HEX(v64), LENGTH(HEX(v65000)) FROM t1;
HEX(v0) HEX(v1) HEX(v64) LENGTH(HEX(v65000))
0
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result b/storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result
index 4c5ef47590a..745cfa5991e 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result
@@ -110,13 +110,13 @@ Warning 1265 Data truncated for column 'v64' at row 1
Warning 1265 Data truncated for column 'v65000' at row 1
INSERT INTO t1 (v0,v1,v64,v65000) SELECT v65000, v65000, CONCAT('a',v65000), CONCAT(v65000,v1) FROM t1;
Warnings:
-Warning 1265 Data truncated for column 'v0' at row 5
-Warning 1265 Data truncated for column 'v1' at row 5
-Warning 1265 Data truncated for column 'v64' at row 5
-Warning 1265 Data truncated for column 'v65000' at row 5
-Warning 1265 Data truncated for column 'v0' at row 6
-Warning 1265 Data truncated for column 'v1' at row 6
-Warning 1265 Data truncated for column 'v64' at row 6
+Warning 1265 Data truncated for column 'v0' at row 2
+Warning 1265 Data truncated for column 'v1' at row 2
+Warning 1265 Data truncated for column 'v64' at row 2
+Warning 1265 Data truncated for column 'v65000' at row 2
+Warning 1265 Data truncated for column 'v0' at row 3
+Warning 1265 Data truncated for column 'v1' at row 3
+Warning 1265 Data truncated for column 'v64' at row 3
SELECT v0, v1, v64, LENGTH(v65000) FROM t1;
v0 v1 v64 LENGTH(v65000)
0
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/tbl_opt_data_index_dir.test b/storage/rocksdb/mysql-test/rocksdb/t/tbl_opt_data_index_dir.test
index 6fcfd491af1..e2595b10fd7 100644
--- a/storage/rocksdb/mysql-test/rocksdb/t/tbl_opt_data_index_dir.test
+++ b/storage/rocksdb/mysql-test/rocksdb/t/tbl_opt_data_index_dir.test
@@ -17,23 +17,23 @@ DROP TABLE IF EXISTS t1;
# opposed to "Unknown error nn" on Linux/etc.
# Replacing 'error:' with 'error' below to make the output uniform.
---replace_result error: error
+--replace_regex /err(no:|or):? \d+/err\1 XXX/
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(8)) ENGINE=rocksdb DATA DIRECTORY = '/foo/bar/data';
---replace_result error: error
+--replace_regex /err(no:|or):? \d+/err\1 XXX/
show warnings;
---replace_result error: error
+--replace_regex /err(no:|or):? \d+/err\1 XXX/
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(8)) ENGINE=rocksdb INDEX DIRECTORY = '/foo/bar/index';
---replace_result error: error
+--replace_regex /err(no:|or):? \d+/err\1 XXX/
show warnings;
#
# Verify that we'll get the same error codes when using the partitions.
#
---replace_result error: error
+--replace_regex /err(no:|or):? \d+/err\1 XXX/
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY) ENGINE=rocksdb PARTITION BY RANGE (id)
(
@@ -43,10 +43,10 @@ CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY) ENGINE=rocksdb PARTITION BY RANGE
DATA DIRECTORY = '/foo/bar/data/',
PARTITION P2 VALUES LESS THAN (MAXVALUE)
);
---replace_result error: error
+--replace_regex /err(no:|or):? \d+/err\1 XXX/
show warnings;
---replace_result error: error
+--replace_regex /err(no:|or):? \d+/err\1 XXX/
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1 (id int not null primary key) ENGINE=rocksdb PARTITION BY RANGE (id)
(
@@ -56,5 +56,5 @@ CREATE TABLE t1 (id int not null primary key) ENGINE=rocksdb PARTITION BY RANGE
INDEX DIRECTORY = '/foo/bar/data/',
PARTITION P2 VALUES LESS THAN (MAXVALUE)
);
---replace_result error: error
+--replace_regex /err(no:|or):? \d+/err\1 XXX/
show warnings;
diff --git a/storage/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_ignore_datadic_errors_basic.result b/storage/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_ignore_datadic_errors_basic.result
new file mode 100644
index 00000000000..daa70a80683
--- /dev/null
+++ b/storage/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_ignore_datadic_errors_basic.result
@@ -0,0 +1,7 @@
+SET @start_global_value = @@global.ROCKSDB_IGNORE_DATADIC_ERRORS;
+SELECT @start_global_value;
+@start_global_value
+0
+"Trying to set variable @@global.ROCKSDB_IGNORE_DATADIC_ERRORS to 444. It should fail because it is readonly."
+SET @@global.ROCKSDB_IGNORE_DATADIC_ERRORS = 444;
+ERROR HY000: Variable 'rocksdb_ignore_datadic_errors' is a read only variable
diff --git a/storage/rocksdb/mysql-test/rocksdb_sys_vars/t/rocksdb_ignore_datadic_errors_basic.test b/storage/rocksdb/mysql-test/rocksdb_sys_vars/t/rocksdb_ignore_datadic_errors_basic.test
new file mode 100644
index 00000000000..b412a018869
--- /dev/null
+++ b/storage/rocksdb/mysql-test/rocksdb_sys_vars/t/rocksdb_ignore_datadic_errors_basic.test
@@ -0,0 +1,6 @@
+--source include/have_rocksdb.inc
+
+--let $sys_var=ROCKSDB_IGNORE_DATADIC_ERRORS
+--let $read_only=1
+--let $session=0
+--source include/rocksdb_sys_var.inc
diff --git a/storage/rocksdb/rdb_datadic.cc b/storage/rocksdb/rdb_datadic.cc
index 5f46fd8acad..2094923edf4 100644
--- a/storage/rocksdb/rdb_datadic.cc
+++ b/storage/rocksdb/rdb_datadic.cc
@@ -5265,6 +5265,12 @@ void Rdb_dict_manager::log_start_drop_index(GL_INDEX_ID gl_index_id,
"from index id (%u,%u). MyRocks data dictionary may "
"get corrupted.",
gl_index_id.cf_id, gl_index_id.index_id);
+ if (rocksdb_ignore_datadic_errors)
+ {
+ sql_print_error("RocksDB: rocksdb_ignore_datadic_errors=1, "
+ "trying to continue");
+ return;
+ }
abort();
}
}