summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
Diffstat (limited to 'storage')
-rw-r--r--storage/connect/bsonudf.cpp2
-rw-r--r--storage/connect/ha_connect.cc4
-rw-r--r--storage/connect/jsonudf.cpp2
-rw-r--r--storage/connect/myconn.cpp10
-rw-r--r--storage/connect/mysql-test/connect/r/misc.result54
-rw-r--r--storage/connect/mysql-test/connect/t/misc.test141
-rw-r--r--storage/connect/odbconn.cpp20
-rw-r--r--storage/connect/plugutil.cpp6
-rw-r--r--storage/connect/reldef.cpp7
-rw-r--r--storage/connect/tabbson.cpp2
-rw-r--r--storage/connect/tabext.cpp64
-rw-r--r--storage/connect/tabjson.cpp2
-rw-r--r--storage/connect/tabmysql.cpp5
-rw-r--r--storage/connect/tabxml.cpp13
-rw-r--r--storage/innobase/buf/buf0flu.cc6
-rw-r--r--storage/innobase/fts/fts0fts.cc16
-rw-r--r--storage/innobase/gis/gis0rtree.cc9
-rw-r--r--storage/innobase/handler/ha_innodb.cc142
-rw-r--r--storage/innobase/include/btr0btr.h2
-rw-r--r--storage/innobase/include/btr0btr.inl (renamed from storage/innobase/include/btr0btr.ic)0
-rw-r--r--storage/innobase/include/btr0cur.h2
-rw-r--r--storage/innobase/include/btr0cur.inl (renamed from storage/innobase/include/btr0cur.ic)0
-rw-r--r--storage/innobase/include/btr0pcur.h2
-rw-r--r--storage/innobase/include/btr0pcur.inl (renamed from storage/innobase/include/btr0pcur.ic)0
-rw-r--r--storage/innobase/include/btr0sea.h2
-rw-r--r--storage/innobase/include/btr0sea.inl (renamed from storage/innobase/include/btr0sea.ic)0
-rw-r--r--storage/innobase/include/buf0buddy.h2
-rw-r--r--storage/innobase/include/buf0buddy.inl (renamed from storage/innobase/include/buf0buddy.ic)0
-rw-r--r--storage/innobase/include/buf0buf.h9
-rw-r--r--storage/innobase/include/buf0buf.inl (renamed from storage/innobase/include/buf0buf.ic)19
-rw-r--r--storage/innobase/include/buf0flu.h2
-rw-r--r--storage/innobase/include/buf0flu.inl (renamed from storage/innobase/include/buf0flu.ic)0
-rw-r--r--storage/innobase/include/data0data.h2
-rw-r--r--storage/innobase/include/data0data.inl (renamed from storage/innobase/include/data0data.ic)0
-rw-r--r--storage/innobase/include/data0type.h2
-rw-r--r--storage/innobase/include/data0type.inl (renamed from storage/innobase/include/data0type.ic)0
-rw-r--r--storage/innobase/include/dict0boot.h2
-rw-r--r--storage/innobase/include/dict0boot.inl (renamed from storage/innobase/include/dict0boot.ic)0
-rw-r--r--storage/innobase/include/dict0crea.h2
-rw-r--r--storage/innobase/include/dict0crea.inl (renamed from storage/innobase/include/dict0crea.ic)0
-rw-r--r--storage/innobase/include/dict0dict.h2
-rw-r--r--storage/innobase/include/dict0dict.inl (renamed from storage/innobase/include/dict0dict.ic)0
-rw-r--r--storage/innobase/include/dict0mem.h2
-rw-r--r--storage/innobase/include/dict0mem.inl (renamed from storage/innobase/include/dict0mem.ic)0
-rw-r--r--storage/innobase/include/dict0pagecompress.h2
-rw-r--r--storage/innobase/include/dict0pagecompress.inl (renamed from storage/innobase/include/dict0pagecompress.ic)0
-rw-r--r--storage/innobase/include/dict0priv.h2
-rw-r--r--storage/innobase/include/dict0priv.inl (renamed from storage/innobase/include/dict0priv.ic)0
-rw-r--r--storage/innobase/include/dict0stats.h2
-rw-r--r--storage/innobase/include/dict0stats.inl (renamed from storage/innobase/include/dict0stats.ic)0
-rw-r--r--storage/innobase/include/eval0eval.h2
-rw-r--r--storage/innobase/include/eval0eval.inl (renamed from storage/innobase/include/eval0eval.ic)0
-rw-r--r--storage/innobase/include/eval0proc.h2
-rw-r--r--storage/innobase/include/eval0proc.inl (renamed from storage/innobase/include/eval0proc.ic)0
-rw-r--r--storage/innobase/include/fil0crypt.h2
-rw-r--r--storage/innobase/include/fil0crypt.inl (renamed from storage/innobase/include/fil0crypt.ic)0
-rw-r--r--storage/innobase/include/fil0fil.h2
-rw-r--r--storage/innobase/include/fil0fil.inl (renamed from storage/innobase/include/fil0fil.ic)0
-rw-r--r--storage/innobase/include/fsp0fsp.h2
-rw-r--r--storage/innobase/include/fsp0fsp.inl (renamed from storage/innobase/include/fsp0fsp.ic)0
-rw-r--r--storage/innobase/include/fsp0pagecompress.h2
-rw-r--r--storage/innobase/include/fsp0pagecompress.inl (renamed from storage/innobase/include/fsp0pagecompress.ic)0
-rw-r--r--storage/innobase/include/fts0priv.h2
-rw-r--r--storage/innobase/include/fts0priv.inl (renamed from storage/innobase/include/fts0priv.ic)0
-rw-r--r--storage/innobase/include/fts0types.h2
-rw-r--r--storage/innobase/include/fts0types.inl (renamed from storage/innobase/include/fts0types.ic)0
-rw-r--r--storage/innobase/include/fut0lst.h2
-rw-r--r--storage/innobase/include/fut0lst.inl (renamed from storage/innobase/include/fut0lst.ic)0
-rw-r--r--storage/innobase/include/gis0rtree.h2
-rw-r--r--storage/innobase/include/gis0rtree.inl (renamed from storage/innobase/include/gis0rtree.ic)0
-rw-r--r--storage/innobase/include/ha0ha.h2
-rw-r--r--storage/innobase/include/ha0ha.inl (renamed from storage/innobase/include/ha0ha.ic)0
-rw-r--r--storage/innobase/include/ha0storage.h2
-rw-r--r--storage/innobase/include/ha0storage.inl (renamed from storage/innobase/include/ha0storage.ic)0
-rw-r--r--storage/innobase/include/hash0hash.h2
-rw-r--r--storage/innobase/include/hash0hash.inl (renamed from storage/innobase/include/hash0hash.ic)0
-rw-r--r--storage/innobase/include/ibuf0ibuf.h2
-rw-r--r--storage/innobase/include/ibuf0ibuf.inl (renamed from storage/innobase/include/ibuf0ibuf.ic)0
-rw-r--r--storage/innobase/include/lock0lock.h2
-rw-r--r--storage/innobase/include/lock0lock.inl (renamed from storage/innobase/include/lock0lock.ic)0
-rw-r--r--storage/innobase/include/lock0priv.h2
-rw-r--r--storage/innobase/include/lock0priv.inl (renamed from storage/innobase/include/lock0priv.ic)0
-rw-r--r--storage/innobase/include/log0log.h2
-rw-r--r--storage/innobase/include/log0log.inl (renamed from storage/innobase/include/log0log.ic)0
-rw-r--r--storage/innobase/include/mach0data.h2
-rw-r--r--storage/innobase/include/mach0data.inl (renamed from storage/innobase/include/mach0data.ic)0
-rw-r--r--storage/innobase/include/mem0mem.h2
-rw-r--r--storage/innobase/include/mem0mem.inl (renamed from storage/innobase/include/mem0mem.ic)0
-rw-r--r--storage/innobase/include/mtr0log.h2
-rw-r--r--storage/innobase/include/mtr0log.inl (renamed from storage/innobase/include/mtr0log.ic)0
-rw-r--r--storage/innobase/include/mtr0mtr.h2
-rw-r--r--storage/innobase/include/mtr0mtr.inl (renamed from storage/innobase/include/mtr0mtr.ic)0
-rw-r--r--storage/innobase/include/os0file.h2
-rw-r--r--storage/innobase/include/os0file.inl (renamed from storage/innobase/include/os0file.ic)0
-rw-r--r--storage/innobase/include/page0cur.h2
-rw-r--r--storage/innobase/include/page0cur.inl (renamed from storage/innobase/include/page0cur.ic)0
-rw-r--r--storage/innobase/include/page0page.h2
-rw-r--r--storage/innobase/include/page0page.inl (renamed from storage/innobase/include/page0page.ic)0
-rw-r--r--storage/innobase/include/page0zip.h2
-rw-r--r--storage/innobase/include/page0zip.inl (renamed from storage/innobase/include/page0zip.ic)0
-rw-r--r--storage/innobase/include/que0que.h2
-rw-r--r--storage/innobase/include/que0que.inl (renamed from storage/innobase/include/que0que.ic)0
-rw-r--r--storage/innobase/include/rem0cmp.h2
-rw-r--r--storage/innobase/include/rem0cmp.inl (renamed from storage/innobase/include/rem0cmp.ic)0
-rw-r--r--storage/innobase/include/rem0rec.h2
-rw-r--r--storage/innobase/include/rem0rec.inl (renamed from storage/innobase/include/rem0rec.ic)0
-rw-r--r--storage/innobase/include/row0ext.h2
-rw-r--r--storage/innobase/include/row0ext.inl (renamed from storage/innobase/include/row0ext.ic)0
-rw-r--r--storage/innobase/include/row0log.h2
-rw-r--r--storage/innobase/include/row0log.inl (renamed from storage/innobase/include/row0log.ic)0
-rw-r--r--storage/innobase/include/row0row.h2
-rw-r--r--storage/innobase/include/row0row.inl (renamed from storage/innobase/include/row0row.ic)0
-rw-r--r--storage/innobase/include/row0sel.h2
-rw-r--r--storage/innobase/include/row0sel.inl (renamed from storage/innobase/include/row0sel.ic)0
-rw-r--r--storage/innobase/include/row0upd.h2
-rw-r--r--storage/innobase/include/row0upd.inl (renamed from storage/innobase/include/row0upd.ic)0
-rw-r--r--storage/innobase/include/srv0mon.h2
-rw-r--r--storage/innobase/include/srv0mon.inl (renamed from storage/innobase/include/srv0mon.ic)0
-rw-r--r--storage/innobase/include/srv0srv.h4
-rw-r--r--storage/innobase/include/sync0arr.h2
-rw-r--r--storage/innobase/include/sync0arr.inl (renamed from storage/innobase/include/sync0arr.ic)0
-rw-r--r--storage/innobase/include/sync0rw.h2
-rw-r--r--storage/innobase/include/sync0rw.inl (renamed from storage/innobase/include/sync0rw.ic)0
-rw-r--r--storage/innobase/include/trx0purge.h2
-rw-r--r--storage/innobase/include/trx0purge.inl (renamed from storage/innobase/include/trx0purge.ic)0
-rw-r--r--storage/innobase/include/trx0rec.h2
-rw-r--r--storage/innobase/include/trx0rec.inl (renamed from storage/innobase/include/trx0rec.ic)0
-rw-r--r--storage/innobase/include/trx0rseg.h2
-rw-r--r--storage/innobase/include/trx0rseg.inl (renamed from storage/innobase/include/trx0rseg.ic)0
-rw-r--r--storage/innobase/include/trx0trx.h2
-rw-r--r--storage/innobase/include/trx0trx.inl (renamed from storage/innobase/include/trx0trx.ic)0
-rw-r--r--storage/innobase/include/trx0undo.h2
-rw-r--r--storage/innobase/include/trx0undo.inl (renamed from storage/innobase/include/trx0undo.ic)0
-rw-r--r--storage/innobase/include/univ.i2
-rw-r--r--storage/innobase/include/ut0byte.h2
-rw-r--r--storage/innobase/include/ut0byte.inl (renamed from storage/innobase/include/ut0byte.ic)0
-rw-r--r--storage/innobase/include/ut0list.h2
-rw-r--r--storage/innobase/include/ut0list.inl (renamed from storage/innobase/include/ut0list.ic)0
-rw-r--r--storage/innobase/include/ut0mem.h2
-rw-r--r--storage/innobase/include/ut0mem.inl (renamed from storage/innobase/include/ut0mem.ic)0
-rw-r--r--storage/innobase/include/ut0rnd.h2
-rw-r--r--storage/innobase/include/ut0rnd.inl (renamed from storage/innobase/include/ut0rnd.ic)0
-rw-r--r--storage/innobase/include/ut0ut.h2
-rw-r--r--storage/innobase/include/ut0ut.inl (renamed from storage/innobase/include/ut0ut.ic)0
-rw-r--r--storage/innobase/include/ut0vec.h2
-rw-r--r--storage/innobase/include/ut0vec.inl (renamed from storage/innobase/include/ut0vec.ic)0
-rw-r--r--storage/innobase/row/row0import.cc10
-rw-r--r--storage/innobase/srv/srv0srv.cc3
-rw-r--r--storage/maria/ma_ft_boolean_search.c6
-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/i_s_deadlock.result18
-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
-rw-r--r--storage/spider/ha_spider.cc18
-rw-r--r--storage/spider/mysql-test/spider/r/ha_part.result9
-rw-r--r--storage/spider/mysql-test/spider/t/ha_part.test7
170 files changed, 931 insertions, 551 deletions
diff --git a/storage/connect/bsonudf.cpp b/storage/connect/bsonudf.cpp
index 771e72b8dbd..491f388bc5f 100644
--- a/storage/connect/bsonudf.cpp
+++ b/storage/connect/bsonudf.cpp
@@ -201,7 +201,7 @@ my_bool BJNX::SetArrayOptions(PGLOBAL g, char* p, int i, PSZ nm)
p[--n] = 0;
} else if (!IsNum(p)) {
// Wrong array specification
- sprintf(g->Message, "Invalid array specification %s", p);
+ snprintf(g->Message, sizeof(g->Message), "Invalid array specification %s", p);
return true;
} // endif p
diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc
index c1262b9630a..5785bc0f99e 100644
--- a/storage/connect/ha_connect.cc
+++ b/storage/connect/ha_connect.cc
@@ -5708,10 +5708,10 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
if (ttp == TAB_UNDEF && !topt->http) {
topt->type= (src) ? "MYSQL" : (tab) ? "PROXY" : "DOS";
ttp= GetTypeID(topt->type);
- sprintf(g->Message, "No table_type. Was set to %s", topt->type);
+ snprintf(g->Message, sizeof(g->Message), "No table_type. Was set to %s", topt->type);
push_warning(thd, Sql_condition::WARN_LEVEL_NOTE, 0, g->Message);
} else if (ttp == TAB_NIY) {
- sprintf(g->Message, "Unsupported table type %s", topt->type);
+ snprintf(g->Message, sizeof(g->Message), "Unsupported table type %s", topt->type);
rc= HA_ERR_INTERNAL_ERROR;
goto err;
#if defined(REST_SUPPORT)
diff --git a/storage/connect/jsonudf.cpp b/storage/connect/jsonudf.cpp
index 41e73c946fb..18332362086 100644
--- a/storage/connect/jsonudf.cpp
+++ b/storage/connect/jsonudf.cpp
@@ -123,7 +123,7 @@ my_bool JSNX::SetArrayOptions(PGLOBAL g, char *p, int i, PSZ nm)
p[--n] = 0;
} else if (!IsNum(p)) {
// Wrong array specification
- sprintf(g->Message, "Invalid array specification %s", p);
+ snprintf(g->Message, sizeof(g->Message), "Invalid array specification %s", p);
return true;
} // endif p
diff --git a/storage/connect/myconn.cpp b/storage/connect/myconn.cpp
index 76e0536633f..89514d6c3c2 100644
--- a/storage/connect/myconn.cpp
+++ b/storage/connect/myconn.cpp
@@ -399,15 +399,19 @@ PQRYRES SrcColumns(PGLOBAL g, const char *host, const char *db,
int w;
MYSQLC myc;
PQRYRES qrp = NULL;
+ const char *p;
if (!port)
port = mysqld_port;
if (!strnicmp(srcdef, "select ", 7) || strstr(srcdef, "%s")) {
- query = (char *)PlugSubAlloc(g, NULL, strlen(srcdef) + 10);
+ query = (char *)PlugSubAlloc(g, NULL, strlen(srcdef) + 10);
- if (strstr(srcdef, "%s"))
- sprintf(query, srcdef, "1=1"); // dummy where clause
+ if ((p= strstr(srcdef, "%s")))
+ {
+ /* Replace %s with 1=1 */
+ sprintf(query, "%.*s1=1%s", (int) (p - srcdef), srcdef, p + 2); // dummy where clause
+ }
else
strcpy(query, srcdef);
diff --git a/storage/connect/mysql-test/connect/r/misc.result b/storage/connect/mysql-test/connect/r/misc.result
new file mode 100644
index 00000000000..6b6372f6e41
--- /dev/null
+++ b/storage/connect/mysql-test/connect/r/misc.result
@@ -0,0 +1,54 @@
+execute immediate concat('create table t engine=CONNECT table_type=JSON',REPEAT('1',5000),
+' FILE_NAME=''users.json'' HTTP=''http://localhost:4142'' URI=''/users''');
+ERROR HY000: Unsupported table type JSON1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+execute immediate concat('create table t engine=CONNECT table_type=OEM module=''libname''
+Option_list=''Myopt=foo'' subtype=''MYTYPE',REPEAT('1', 10000), '''');
+ERROR HY000: Subtype string too long
+execute immediate concat('create table t engine=CONNECT table_type=DBF file_name=''',
+REPLACE(@@secure_file_priv,'\\','/'),'cust.dbf', REPEAT('1', 10000), '''');
+ERROR HY000: Cannot open
+create table t engine=connect table_type=mysql
+CONNECTION='mysql://root@localhost:MASTER_MYPORT/test/foobar'
+ SRCDEF='SELECT 1,''%n'' FROM DUAL WHERE %s';
+select *from t;
+ERROR HY000: Got error 174 'MakeSQL: Wrong place holders specification' from CONNECT
+drop table t;
+create table t engine=connect table_type=mysql
+CONNECTION='mysql://root@localhost:MASTER_MYPORT/test/foobar'
+ SRCDEF='SELECT 1,%n FROM DUAL WHERE %s';
+ERROR HY000: (1064) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '%n FROM DUAL WHERE 1=1 LIMIT 0' at line 1 [SELECT 1,%n FROM DUAL WHERE 1=1 LIMIT 0]
+create table t engine=connect table_type=mysql
+CONNECTION='mysql://root@localhost:MASTER_MYPORT/test/foobar'
+ SRCDEF='SELECT 1 FROM DUAL WHERE %s';
+select *from t;
+1
+1
+drop table t;
+create table beers (
+`Name` char(16) xpath='brandName',
+`Origin` char(16) xpath='origin',
+`Description` char(32) xpath='details')
+engine=CONNECT table_type=XML file_name='MYSQLTEST_VARDIR/tmp/beer.xml'
+tabname='table' option_list='rownode=tr,colnode=td%n';
+select * from beers;
+Name Origin Description
+NULL NULL NULL
+NULL NULL NULL
+drop table beers;
+create table beers (
+`Name` char(16) xpath='brandName',
+`Origin` char(16) xpath='origin',
+`Description` char(32) xpath='details')
+engine=CONNECT table_type=XML file_name='MYSQLTEST_VARDIR/tmp/beer.xml'
+tabname='table' option_list='rownode=tr,colnode=td';
+insert into beers values('11','22','33');
+drop table beers;
+execute immediate CONCAT('create table jsampall
+(Author char(128) jpath=''$.AUTHOR["', REPEAT('a',10000),'"]'')
+engine=CONNECT table_type=JSON
+file_name=''',REPLACE(@@secure_file_priv,'\\','/'),'tmp/test.json''');
+select author from jsampall;
+author
+Jean-Christophe Bernadacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+William J. Pardi
+drop table jsampall;
diff --git a/storage/connect/mysql-test/connect/t/misc.test b/storage/connect/mysql-test/connect/t/misc.test
new file mode 100644
index 00000000000..4dc8dded651
--- /dev/null
+++ b/storage/connect/mysql-test/connect/t/misc.test
@@ -0,0 +1,141 @@
+
+# Overlong table type
+--error ER_UNKNOWN_ERROR
+execute immediate concat('create table t engine=CONNECT table_type=JSON',REPEAT('1',5000),
+' FILE_NAME=''users.json'' HTTP=''http://localhost:4142'' URI=''/users''');
+
+# Overlong subtype
+--error ER_UNKNOWN_ERROR
+execute immediate concat('create table t engine=CONNECT table_type=OEM module=''libname''
+Option_list=''Myopt=foo'' subtype=''MYTYPE',REPEAT('1', 10000), '''');
+
+
+# Overlong filename
+--error ER_UNKNOWN_ERROR
+execute immediate concat('create table t engine=CONNECT table_type=DBF file_name=''',
+ REPLACE(@@secure_file_priv,'\\','/'),'cust.dbf', REPEAT('1', 10000), '''');
+
+
+# Format string in SRCDEF
+--replace_result $MASTER_MYPORT MASTER_MYPORT
+eval create table t engine=connect table_type=mysql
+ CONNECTION='mysql://root@localhost:$MASTER_MYPORT/test/foobar'
+ SRCDEF='SELECT 1,''%n'' FROM DUAL WHERE %s';
+--error ER_GET_ERRMSG
+select *from t;
+drop table t;
+
+--replace_result $MASTER_MYPORT MASTER_MYPORT
+--error ER_UNKNOWN_ERROR
+eval create table t engine=connect table_type=mysql
+ CONNECTION='mysql://root@localhost:$MASTER_MYPORT/test/foobar'
+ SRCDEF='SELECT 1,%n FROM DUAL WHERE %s';
+
+--replace_result $MASTER_MYPORT MASTER_MYPORT
+eval create table t engine=connect table_type=mysql
+ CONNECTION='mysql://root@localhost:$MASTER_MYPORT/test/foobar'
+ SRCDEF='SELECT 1 FROM DUAL WHERE %s';
+select *from t;
+drop table t;
+
+write_file $MYSQLTEST_VARDIR/tmp/beer.xml;
+<?xml version="1.0"?>
+<Beers>
+ <table>
+ <th><td>Name</td><td>Origin</td><td>Description</td></th>
+ <tr>
+ <td><brandName>Huntsman</brandName></td>
+ <td><origin>Bath, UK</origin></td>
+ <td><details>Wonderful hop, light alcohol</details></td>
+ </tr>
+ <tr>
+ <td><brandName>Tuborg</brandName></td>
+ <td><origin>Danmark</origin></td>
+ <td><details>In small bottles</details></td>
+ </tr>
+ </table>
+</Beers>
+EOF
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+# Format string in colnode
+eval create table beers (
+`Name` char(16) xpath='brandName',
+`Origin` char(16) xpath='origin',
+`Description` char(32) xpath='details')
+engine=CONNECT table_type=XML file_name='$MYSQLTEST_VARDIR/tmp/beer.xml'
+tabname='table' option_list='rownode=tr,colnode=td%n';
+select * from beers;
+drop table beers;
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+eval create table beers (
+`Name` char(16) xpath='brandName',
+`Origin` char(16) xpath='origin',
+`Description` char(32) xpath='details')
+engine=CONNECT table_type=XML file_name='$MYSQLTEST_VARDIR/tmp/beer.xml'
+tabname='table' option_list='rownode=tr,colnode=td';
+insert into beers values('11','22','33');
+drop table beers;
+
+remove_file $MYSQLTEST_VARDIR/tmp/beer.xml;
+
+write_file $MYSQLTEST_VARDIR/tmp/test.json;
+[
+ {
+ "ISBN": "9782212090819",
+ "LANG": "fr",
+ "SUBJECT": "applications",
+ "AUTHOR": [
+ {
+ "FIRSTNAME": "Jean-Christophe",
+ "LASTNAME": "Bernadac"
+ },
+ {
+ "FIRSTNAME": "François",
+ "LASTNAME": "Knab"
+ }
+ ],
+ "TITLE": "Construire une application XML",
+ "PUBLISHER": {
+ "NAME": "Eyrolles",
+ "PLACE": "Paris"
+ },
+ "DATEPUB": 1999
+ },
+ {
+ "ISBN": "9782840825685",
+ "LANG": "fr",
+ "SUBJECT": "applications",
+ "AUTHOR": [
+ {
+ "FIRSTNAME": "William J.",
+ "LASTNAME": "Pardi"
+ }
+ ],
+ "TITLE": "XML en Action",
+ "TRANSLATED": {
+ "PREFIX": "adapté de l'anglais par",
+ "TRANSLATOR": {
+ "FIRSTNAME": "James",
+ "LASTNAME": "Guerin"
+ }
+ },
+ "PUBLISHER": {
+ "NAME": "Microsoft Press",
+ "PLACE": "Paris"
+ },
+ "DATEPUB": 1999
+ }
+]
+EOF
+
+execute immediate CONCAT('create table jsampall
+(Author char(128) jpath=''$.AUTHOR["', REPEAT('a',10000),'"]'')
+engine=CONNECT table_type=JSON
+file_name=''',REPLACE(@@secure_file_priv,'\\','/'),'tmp/test.json''');
+
+select author from jsampall;
+drop table jsampall;
+remove_file $MYSQLTEST_VARDIR/tmp/test.json;
+
diff --git a/storage/connect/odbconn.cpp b/storage/connect/odbconn.cpp
index 8ff8d3a84e1..9175a4c9053 100644
--- a/storage/connect/odbconn.cpp
+++ b/storage/connect/odbconn.cpp
@@ -1422,7 +1422,7 @@ int ODBConn::ExecDirectSQL(char *sql, ODBCCOL *tocols)
PGLOBAL& g = m_G;
void *buffer;
bool b;
- UWORD n;
+ UWORD n, k;
SWORD len, tp, ncol = 0;
ODBCCOL *colp;
RETCODE rc;
@@ -1489,15 +1489,16 @@ int ODBConn::ExecDirectSQL(char *sql, ODBCCOL *tocols)
} else {
do {
rc = SQLExecDirect(hstmt, (PUCHAR)sql, SQL_NTS);
- } while (rc == SQL_STILL_EXECUTING);
+ } while (rc == SQL_STILL_EXECUTING);
if (!Check(rc))
ThrowDBX(rc, "SQLExecDirect", hstmt);
do {
rc = SQLNumResultCols(hstmt, &ncol);
- } while (rc == SQL_STILL_EXECUTING);
+ } while (rc == SQL_STILL_EXECUTING);
+ k = 0; // used for column number
} // endif Srcdef
for (n = 0, colp = tocols; colp; colp = (PODBCCOL)colp->GetNext())
@@ -1519,18 +1520,23 @@ int ODBConn::ExecDirectSQL(char *sql, ODBCCOL *tocols)
sprintf(m_G->Message, MSG(INV_COLUMN_TYPE),
colp->GetResultType(), SVP(colp->GetName()));
ThrowDBX(m_G->Message);
- } // endif tp
+ } // endif tp
+
+ if (m_Tdb->Srcdef)
+ k = colp->GetIndex();
+ else
+ k++;
if (trace(1))
htrc("Binding col=%u type=%d buf=%p len=%d slen=%p\n",
- n, tp, buffer, len, colp->GetStrLen());
+ k, tp, buffer, len, colp->GetStrLen());
- rc = SQLBindCol(hstmt, colp->GetIndex(), tp, buffer, len, colp->GetStrLen());
+ rc = SQLBindCol(hstmt, k, tp, buffer, len, colp->GetStrLen());
if (!Check(rc))
ThrowDBX(rc, "SQLBindCol", hstmt);
- } // endif pcol
+ } // endif colp
} catch(DBX *x) {
if (trace(1))
diff --git a/storage/connect/plugutil.cpp b/storage/connect/plugutil.cpp
index a63eee75c1b..f481cd1034b 100644
--- a/storage/connect/plugutil.cpp
+++ b/storage/connect/plugutil.cpp
@@ -259,6 +259,12 @@ LPCSTR PlugSetPath(LPSTR pBuff, LPCSTR prefix, LPCSTR FileName, LPCSTR defpath)
if (trace(2))
htrc("prefix=%-.256s fn=%-.256s path=%-.256s\n", prefix, FileName, defpath);
+ if (strlen(FileName) >= _MAX_PATH)
+ {
+ *pBuff= 0; /* Hope this is treated as error of some kind*/
+ return FileName;
+ }
+
if (!strncmp(FileName, "//", 2) || !strncmp(FileName, "\\\\", 2)) {
strcpy(pBuff, FileName); // Remote file
return pBuff;
diff --git a/storage/connect/reldef.cpp b/storage/connect/reldef.cpp
index 39761fc2f18..5788282dafc 100644
--- a/storage/connect/reldef.cpp
+++ b/storage/connect/reldef.cpp
@@ -93,7 +93,12 @@ PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char* tab, char* db, bool info)
if (check_valid_path(module, strlen(module))) {
strcpy(g->Message, "Module cannot contain a path");
return NULL;
- } else
+ }
+ else if (strlen(subtype)+1+3 >= sizeof(getname)) {
+ strcpy(g->Message, "Subtype string too long");
+ return NULL;
+ }
+ else
PlugSetPath(soname, module, GetPluginDir());
// The exported name is always in uppercase
diff --git a/storage/connect/tabbson.cpp b/storage/connect/tabbson.cpp
index 8569e39f678..59d2b7ed1b0 100644
--- a/storage/connect/tabbson.cpp
+++ b/storage/connect/tabbson.cpp
@@ -1788,7 +1788,7 @@ bool BSONCOL::SetArrayOptions(PGLOBAL g, char* p, int i, PSZ nm)
p[--n] = 0;
} else if (!IsNum(p)) {
// Wrong array specification
- sprintf(g->Message, "Invalid array specification %s for %s", p, Name);
+ snprintf(g->Message, sizeof(g->Message), "Invalid array specification %s for %s", p, Name);
return true;
} // endif p
diff --git a/storage/connect/tabext.cpp b/storage/connect/tabext.cpp
index 53a0d2aa2c7..42658425fbd 100644
--- a/storage/connect/tabext.cpp
+++ b/storage/connect/tabext.cpp
@@ -142,8 +142,14 @@ bool EXTDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
Username = GetStringCatInfo(g, "User", NULL);
Password = GetStringCatInfo(g, "Password", NULL);
- if ((Srcdef = GetStringCatInfo(g, "Srcdef", NULL)))
+ // Memory was Boolean, it is now integer
+ if (!(Memory = GetIntCatInfo("Memory", 0)))
+ Memory = GetBoolCatInfo("Memory", false) ? 1 : 0;
+
+ if ((Srcdef = GetStringCatInfo(g, "Srcdef", NULL))) {
Read_Only = true;
+ if (Memory == 2) Memory = 1;
+ } // endif Srcdef
Qrystr = GetStringCatInfo(g, "Query_String", "?");
Sep = GetStringCatInfo(g, "Separator", NULL);
@@ -166,10 +172,6 @@ bool EXTDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
if (Catfunc == FNC_TABLE)
Tabtyp = GetStringCatInfo(g, "Tabtype", NULL);
- // Memory was Boolean, it is now integer
- if (!(Memory = GetIntCatInfo("Memory", 0)))
- Memory = GetBoolCatInfo("Memory", false) ? 1 : 0;
-
Pseudo = 2; // FILID is Ok but not ROWID
return false;
} // end of DefineAM
@@ -284,6 +286,37 @@ int TDBEXT::Decode(PCSZ txt, char *buf, size_t n)
return 0;
} // end of Decode
+/*
+ Count number of %s placeholders in string.
+ Returns -1 if other sprintf placeholders are found, .g %d
+*/
+static int count_placeholders(const char *fmt)
+{
+ int cnt= 0;
+ for (const char *p=fmt; *p; p++)
+ {
+ if (*p == '%')
+ {
+ switch (p[1])
+ {
+ case 's':
+ /* %s found */
+ cnt++;
+ p++;
+ break;
+ case '%':
+ /* masking char for % found */
+ p++;
+ break;
+ default:
+ /* some other placeholder found */
+ return -1;
+ }
+ }
+ }
+ return cnt;
+}
+
/***********************************************************************/
/* MakeSrcdef: make the SQL statement from SRDEF option. */
/***********************************************************************/
@@ -308,16 +341,29 @@ bool TDBEXT::MakeSrcdef(PGLOBAL g)
? To_CondFil->Having : PlugDup(g, "1=1");
} // endif ph
- if (!stricmp(ph, "W")) {
+ int n_placeholders = count_placeholders(Srcdef);
+ if (n_placeholders < 0)
+ {
+ strcpy(g->Message, "MakeSQL: Wrong place holders specification");
+ return true;
+ }
+
+ if (!stricmp(ph, "W") && n_placeholders <= 1) {
Query = new(g)STRING(g, strlen(Srcdef) + strlen(fil1));
Query->SetLength(sprintf(Query->GetStr(), Srcdef, fil1));
- } else if (!stricmp(ph, "WH")) {
+ }
+ else if (!stricmp(ph, "WH") && n_placeholders <= 2)
+ {
Query = new(g)STRING(g, strlen(Srcdef) + strlen(fil1) + strlen(fil2));
Query->SetLength(sprintf(Query->GetStr(), Srcdef, fil1, fil2));
- } else if (!stricmp(ph, "H")) {
+ }
+ else if (!stricmp(ph, "H") && n_placeholders <= 1)
+ {
Query = new(g)STRING(g, strlen(Srcdef) + strlen(fil2));
Query->SetLength(sprintf(Query->GetStr(), Srcdef, fil2));
- } else if (!stricmp(ph, "HW")) {
+ }
+ else if (!stricmp(ph, "HW") && n_placeholders <= 2)
+ {
Query = new(g)STRING(g, strlen(Srcdef) + strlen(fil1) + strlen(fil2));
Query->SetLength(sprintf(Query->GetStr(), Srcdef, fil2, fil1));
} else {
diff --git a/storage/connect/tabjson.cpp b/storage/connect/tabjson.cpp
index 56f22fa91ec..2697be2da13 100644
--- a/storage/connect/tabjson.cpp
+++ b/storage/connect/tabjson.cpp
@@ -1384,7 +1384,7 @@ bool JSONCOL::SetArrayOptions(PGLOBAL g, char *p, int i, PSZ nm)
p[--n] = 0;
} else if (!IsNum(p)) {
// Wrong array specification
- sprintf(g->Message, "Invalid array specification %s for %s", p, Name);
+ snprintf(g->Message, sizeof(g->Message), "Invalid array specification %s for %s", p, Name);
return true;
} // endif p
diff --git a/storage/connect/tabmysql.cpp b/storage/connect/tabmysql.cpp
index 674580535a5..b677f862cc8 100644
--- a/storage/connect/tabmysql.cpp
+++ b/storage/connect/tabmysql.cpp
@@ -904,6 +904,11 @@ bool TDBMYSQL::OpenDB(PGLOBAL g)
/*********************************************************************/
if (Mode == MODE_READ || Mode == MODE_READX) {
MakeSelect(g, Mode == MODE_READX);
+ if (Mode == MODE_READ && !Query)
+ {
+ Myc.Close();
+ return true;
+ }
m_Rc = (Mode == MODE_READ)
? Myc.ExecSQL(g, Query->GetStr()) : RC_OK;
diff --git a/storage/connect/tabxml.cpp b/storage/connect/tabxml.cpp
index 6990fa4abba..693450668db 100644
--- a/storage/connect/tabxml.cpp
+++ b/storage/connect/tabxml.cpp
@@ -1517,9 +1517,13 @@ bool XMLCOL::ParseXpath(PGLOBAL g, bool mode)
if (!mode)
// Take care of an eventual extra column node a la html
if (Tdbp->Colname) {
- sprintf(pbuf, Tdbp->Colname, Rank + ((Tdbp->Usedom) ? 0 : 1));
- strcat(pbuf, "/");
- } // endif Colname
+ char *p = strstr(Tdbp->Colname, "%d");
+ if (p)
+ snprintf(pbuf, len + 3, "%.*s%d%s/", (int) (p - Tdbp->Colname), Tdbp->Colname,
+ Rank + (Tdbp->Usedom ? 0 : 1), p + 2);
+ else
+ snprintf(pbuf, len + 3, "%s/", Tdbp->Colname);
+ } // endif Colname
if (Xname) {
if (Type == 2) {
@@ -1809,6 +1813,9 @@ void XMLCOL::WriteColumn(PGLOBAL g)
else if (Tdbp->Clist)
ColNode = NULL;
+ // refresh CList in case its Listp was freed in SelectSingleNode above
+ if (Tdbp->Clist)
+ Tdbp->RowNode->SelectNodes(g, Tdbp->Colname, Tdbp->Clist);
} // endfor i
/*********************************************************************/
diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc
index 2cfca67ddd1..864311a0abf 100644
--- a/storage/innobase/buf/buf0flu.cc
+++ b/storage/innobase/buf/buf0flu.cc
@@ -192,12 +192,6 @@ static page_cleaner_t page_cleaner;
my_bool innodb_page_cleaner_disabled_debug;
#endif /* UNIV_DEBUG */
-/** If LRU list of a buf_pool is less than this size then LRU eviction
-should not happen. This is because when we do LRU flushing we also put
-the blocks on free list. If LRU list is very small then we can end up
-in thrashing. */
-#define BUF_LRU_MIN_LEN 256
-
/* @} */
/******************************************************************//**
diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc
index 816306d6c88..1d42e889538 100644
--- a/storage/innobase/fts/fts0fts.cc
+++ b/storage/innobase/fts/fts0fts.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2011, 2021, Oracle and/or its affiliates.
-Copyright (c) 2016, 2021, MariaDB Corporation.
+Copyright (c) 2016, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -31,7 +31,7 @@ Full Text Search interface
#include "fts0fts.h"
#include "fts0priv.h"
#include "fts0types.h"
-#include "fts0types.ic"
+#include "fts0types.inl"
#include "fts0vlc.h"
#include "fts0plugin.h"
#include "dict0priv.h"
@@ -230,9 +230,7 @@ ulint
fts_add_doc_by_id(
/*==============*/
fts_trx_table_t*ftt, /*!< in: FTS trx table */
- doc_id_t doc_id, /*!< in: doc id */
- ib_vector_t* fts_indexes MY_ATTRIBUTE((unused)));
- /*!< in: affected fts indexes */
+ doc_id_t doc_id); /*!< in: doc id */
/******************************************************************//**
Update the last document id. This function could create a new
transaction to update the last document id.
@@ -2832,7 +2830,7 @@ fts_add(
ut_a(row->state == FTS_INSERT || row->state == FTS_MODIFY);
- fts_add_doc_by_id(ftt, doc_id, row->fts_indexes);
+ fts_add_doc_by_id(ftt, doc_id);
mutex_enter(&table->fts->cache->deleted_lock);
++table->fts->cache->added;
@@ -3398,9 +3396,7 @@ ulint
fts_add_doc_by_id(
/*==============*/
fts_trx_table_t*ftt, /*!< in: FTS trx table */
- doc_id_t doc_id, /*!< in: doc id */
- ib_vector_t* fts_indexes MY_ATTRIBUTE((unused)))
- /*!< in: affected fts indexes */
+ doc_id_t doc_id) /*!< in: doc id */
{
mtr_t mtr;
mem_heap_t* heap;
@@ -4644,7 +4640,7 @@ fts_tokenize_add_word_for_parser(
ut_ad(boolean_info->position >= 0);
position = boolean_info->position + fts_param->add_pos;
*/
- position = fts_param->add_pos;
+ position = fts_param->add_pos++;
fts_add_token(result_doc, str, position);
diff --git a/storage/innobase/gis/gis0rtree.cc b/storage/innobase/gis/gis0rtree.cc
index 122402eb34d..77dd6f7ae27 100644
--- a/storage/innobase/gis/gis0rtree.cc
+++ b/storage/innobase/gis/gis0rtree.cc
@@ -1258,15 +1258,6 @@ after_insert:
page_zip = buf_block_get_page_zip(root_block);
page_set_ssn_id(root_block, page_zip, next_ssn, mtr);
- /* Insert fit on the page: update the free bits for the
- left and right pages in the same mtr */
-
- if (page_is_leaf(page)) {
- ibuf_update_free_bits_for_two_pages_low(
- block, new_block, mtr);
- }
-
-
/* If the new res insert fail, we need to do another split
again. */
if (!rec) {
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 257074ae56d..4dd004178d6 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -4,7 +4,7 @@ Copyright (c) 2000, 2020, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, 2009 Google Inc.
Copyright (c) 2009, Percona Inc.
Copyright (c) 2012, Facebook Inc.
-Copyright (c) 2013, 2021, MariaDB Corporation.
+Copyright (c) 2013, 2022, MariaDB Corporation.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
@@ -3575,6 +3575,59 @@ static int innodb_init_abort()
DBUG_RETURN(1);
}
+/** Return the minimum buffer pool size based on page size */
+static inline ulint min_buffer_pool_size()
+{
+ ulint s= (BUF_LRU_MIN_LEN + BUF_LRU_MIN_LEN / 4) * srv_page_size;
+ /* buf_pool_chunk_size minimum is 1M, so round up to a multiple */
+ ulint alignment= 1U << 20;
+ return UT_CALC_ALIGN(s, alignment);
+}
+
+/** Validate the requested buffer pool size. Also, reserve the necessary
+memory needed for buffer pool resize.
+@param[in] thd thread handle
+@param[in] var pointer to system variable
+@param[out] save immediate result for update function
+@param[in] value incoming string
+@return 0 on success, 1 on failure.
+*/
+static
+int
+innodb_buffer_pool_size_validate(
+ THD* thd,
+ struct st_mysql_sys_var* var,
+ void* save,
+ struct st_mysql_value* value);
+
+/** Update the system variable innodb_buffer_pool_size using the "saved"
+value. This function is registered as a callback with MySQL.
+@param[in] thd thread handle
+@param[in] var pointer to system variable
+@param[out] var_ptr where the formal string goes
+@param[in] save immediate result from check function */
+static
+void
+innodb_buffer_pool_size_update(
+ THD* thd,
+ struct st_mysql_sys_var* var,
+ void* var_ptr,
+ const void* save);
+
+/* If the default value of innodb_buffer_pool_size is increased to be more than
+BUF_POOL_SIZE_THRESHOLD (srv/srv0start.cc), then srv_buf_pool_instances_default
+can be removed and 8 used instead. The problem with the current setup is that
+with 128MiB default buffer pool size and 8 instances by default we would emit
+a warning when no options are specified. */
+static MYSQL_SYSVAR_ULONGLONG(buffer_pool_size, innobase_buffer_pool_size,
+ PLUGIN_VAR_RQCMDARG,
+ "The size of the memory buffer InnoDB uses to cache data and indexes of its tables.",
+ innodb_buffer_pool_size_validate,
+ innodb_buffer_pool_size_update,
+ 128ULL << 20,
+ 2ULL << 20,
+ LLONG_MAX, 1024*1024L);
+
/** Deprecation message about innodb_idle_flush_pct */
static const char* deprecated_idle_flush_pct
= "innodb_idle_flush_pct is DEPRECATED and has no effect.";
@@ -3763,12 +3816,15 @@ static int innodb_init_params()
/* The buffer pool needs to be able to accommodate enough many
pages, even for larger pages */
- if (srv_page_size > UNIV_PAGE_SIZE_DEF
- && innobase_buffer_pool_size < (24 * 1024 * 1024)) {
+ MYSQL_SYSVAR_NAME(buffer_pool_size).min_val= min_buffer_pool_size();
+
+ if (innobase_buffer_pool_size < MYSQL_SYSVAR_NAME(buffer_pool_size).min_val) {
ib::error() << "innodb_page_size="
<< srv_page_size << " requires "
- << "innodb_buffer_pool_size > 24M current "
- << innobase_buffer_pool_size;
+ << "innodb_buffer_pool_size >= "
+ << (MYSQL_SYSVAR_NAME(buffer_pool_size).min_val >> 20)
+ << "MiB current " << (innobase_buffer_pool_size >> 20)
+ << "MiB";
DBUG_RETURN(HA_ERR_INITIALIZATION);
}
@@ -11557,9 +11613,12 @@ create_table_info_t::create_options_are_invalid()
break;
}
- if (m_create_info->data_file_name
- && m_create_info->data_file_name[0] != '\0'
- && !create_option_data_directory_is_valid()) {
+ if (!m_create_info->data_file_name
+ || !m_create_info->data_file_name[0]) {
+ } else if (!my_use_symdir) {
+ my_error(WARN_OPTION_IGNORED, MYF(ME_WARNING),
+ "DATA DIRECTORY");
+ } else if (!create_option_data_directory_is_valid()) {
ret = "DATA DIRECTORY";
}
@@ -11831,7 +11890,8 @@ create_table_info_t::parse_table_name(
CREATE TABLE ... DATA DIRECTORY={path} TABLESPACE={name}... ;
we ignore the DATA DIRECTORY. */
if (m_create_info->data_file_name
- && m_create_info->data_file_name[0] != '\0') {
+ && m_create_info->data_file_name[0]
+ && my_use_symdir) {
if (!create_option_data_directory_is_valid()) {
push_warning_printf(
m_thd, Sql_condition::WARN_LEVEL_WARN,
@@ -12289,8 +12349,9 @@ create_table_info_t::set_tablespace_type(
used with TEMPORARY tables. */
m_use_data_dir =
m_use_file_per_table
- && (m_create_info->data_file_name != NULL)
- && (m_create_info->data_file_name[0] != '\0');
+ && m_create_info->data_file_name
+ && m_create_info->data_file_name[0]
+ && my_use_symdir;
}
/** Initialize the create_table_info_t object.
@@ -19216,36 +19277,6 @@ static MYSQL_SYSVAR_ULONG(autoextend_increment,
"Data file autoextend increment in megabytes",
NULL, NULL, 64L, 1L, 1000L, 0);
-/** Validate the requested buffer pool size. Also, reserve the necessary
-memory needed for buffer pool resize.
-@param[in] thd thread handle
-@param[in] var pointer to system variable
-@param[out] save immediate result for update function
-@param[in] value incoming string
-@return 0 on success, 1 on failure.
-*/
-static
-int
-innodb_buffer_pool_size_validate(
- THD* thd,
- struct st_mysql_sys_var* var,
- void* save,
- struct st_mysql_value* value);
-
-/* If the default value of innodb_buffer_pool_size is increased to be more than
-BUF_POOL_SIZE_THRESHOLD (srv/srv0start.cc), then srv_buf_pool_instances_default
-can be removed and 8 used instead. The problem with the current setup is that
-with 128MiB default buffer pool size and 8 instances by default we would emit
-a warning when no options are specified. */
-static MYSQL_SYSVAR_ULONGLONG(buffer_pool_size, innobase_buffer_pool_size,
- PLUGIN_VAR_RQCMDARG,
- "The size of the memory buffer InnoDB uses to cache data and indexes of its tables.",
- innodb_buffer_pool_size_validate,
- innodb_buffer_pool_size_update,
- srv_buf_pool_def_size,
- srv_buf_pool_min_size,
- LLONG_MAX, 1024*1024L);
-
static MYSQL_SYSVAR_ULONG(buffer_pool_chunk_size, srv_buf_pool_chunk_unit,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
"Size of a single memory chunk within each buffer pool instance"
@@ -21365,8 +21396,19 @@ innodb_buffer_pool_size_validate(
struct st_mysql_value* value)
{
longlong intbuf;
+
value->val_int(value, &intbuf);
+ if (static_cast<ulonglong>(intbuf) < MYSQL_SYSVAR_NAME(buffer_pool_size).min_val) {
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_WRONG_ARGUMENTS,
+ "innodb_buffer_pool_size must be at least"
+ " %lld for innodb_page_size=%lu",
+ MYSQL_SYSVAR_NAME(buffer_pool_size).min_val,
+ srv_page_size);
+ return(1);
+ }
+
if (!srv_was_started) {
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
ER_WRONG_ARGUMENTS,
@@ -21779,3 +21821,21 @@ void ins_node_t::vers_update_end(row_prebuilt_t *prebuilt, bool history_row)
if (UNIV_LIKELY_NULL(local_heap))
mem_heap_free(local_heap);
}
+
+/** Calculate aligned buffer pool size based on srv_buf_pool_chunk_unit,
+if needed.
+@param[in] size size in bytes
+@return aligned size */
+ulint
+buf_pool_size_align(
+ ulint size)
+{
+ const ib_uint64_t m = ((ib_uint64_t)srv_buf_pool_instances) * srv_buf_pool_chunk_unit;
+ size = ut_max((size_t) size, (size_t) MYSQL_SYSVAR_NAME(buffer_pool_size).min_val);
+
+ if (size % m == 0) {
+ return(size);
+ } else {
+ return (ulint)((size / m + 1) * m);
+ }
+}
diff --git a/storage/innobase/include/btr0btr.h b/storage/innobase/include/btr0btr.h
index 54aea9d2d3d..ed64a92688a 100644
--- a/storage/innobase/include/btr0btr.h
+++ b/storage/innobase/include/btr0btr.h
@@ -792,7 +792,7 @@ btr_lift_page_up(
#define BTR_N_LEAF_PAGES 1
#define BTR_TOTAL_SIZE 2
-#include "btr0btr.ic"
+#include "btr0btr.inl"
/****************************************************************
Global variable controlling if scrubbing should be performed */
diff --git a/storage/innobase/include/btr0btr.ic b/storage/innobase/include/btr0btr.inl
index d3827b7dc6f..d3827b7dc6f 100644
--- a/storage/innobase/include/btr0btr.ic
+++ b/storage/innobase/include/btr0btr.inl
diff --git a/storage/innobase/include/btr0cur.h b/storage/innobase/include/btr0cur.h
index 1f1ac2a09e7..0eb06a3bc99 100644
--- a/storage/innobase/include/btr0cur.h
+++ b/storage/innobase/include/btr0cur.h
@@ -1058,6 +1058,6 @@ extern ulint btr_cur_n_sea_old;
extern uint btr_cur_limit_optimistic_insert_debug;
#endif /* UNIV_DEBUG */
-#include "btr0cur.ic"
+#include "btr0cur.inl"
#endif
diff --git a/storage/innobase/include/btr0cur.ic b/storage/innobase/include/btr0cur.inl
index be6ac28129e..be6ac28129e 100644
--- a/storage/innobase/include/btr0cur.ic
+++ b/storage/innobase/include/btr0cur.inl
diff --git a/storage/innobase/include/btr0pcur.h b/storage/innobase/include/btr0pcur.h
index b0b61a4d1ff..d8f9a0961e8 100644
--- a/storage/innobase/include/btr0pcur.h
+++ b/storage/innobase/include/btr0pcur.h
@@ -540,6 +540,6 @@ struct btr_pcur_t{
dict_index_t* index() const { return(btr_cur.index); }
};
-#include "btr0pcur.ic"
+#include "btr0pcur.inl"
#endif
diff --git a/storage/innobase/include/btr0pcur.ic b/storage/innobase/include/btr0pcur.inl
index d93da475a1f..d93da475a1f 100644
--- a/storage/innobase/include/btr0pcur.ic
+++ b/storage/innobase/include/btr0pcur.inl
diff --git a/storage/innobase/include/btr0sea.h b/storage/innobase/include/btr0sea.h
index adb14a7c16f..8ed0a13f0b5 100644
--- a/storage/innobase/include/btr0sea.h
+++ b/storage/innobase/include/btr0sea.h
@@ -308,6 +308,6 @@ again set this much timeout. This is to reduce contention. */
#define BTR_SEA_TIMEOUT 10000
#endif /* BTR_CUR_HASH_ADAPT */
-#include "btr0sea.ic"
+#include "btr0sea.inl"
#endif
diff --git a/storage/innobase/include/btr0sea.ic b/storage/innobase/include/btr0sea.inl
index 9db0084ce59..9db0084ce59 100644
--- a/storage/innobase/include/btr0sea.ic
+++ b/storage/innobase/include/btr0sea.inl
diff --git a/storage/innobase/include/buf0buddy.h b/storage/innobase/include/buf0buddy.h
index 5119a1c58c4..63ec8cd0001 100644
--- a/storage/innobase/include/buf0buddy.h
+++ b/storage/innobase/include/buf0buddy.h
@@ -82,6 +82,6 @@ void
buf_buddy_condense_free(
buf_pool_t* buf_pool);
-#include "buf0buddy.ic"
+#include "buf0buddy.inl"
#endif /* buf0buddy_h */
diff --git a/storage/innobase/include/buf0buddy.ic b/storage/innobase/include/buf0buddy.inl
index 39ab46d80dd..39ab46d80dd 100644
--- a/storage/innobase/include/buf0buddy.ic
+++ b/storage/innobase/include/buf0buddy.inl
diff --git a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h
index 1aba6adeb83..e61e3e4c283 100644
--- a/storage/innobase/include/buf0buf.h
+++ b/storage/innobase/include/buf0buf.h
@@ -94,6 +94,12 @@ struct fil_addr_t;
#define MAX_PAGE_HASH_LOCKS 1024 /*!< The maximum number of
page_hash locks */
+/** If LRU list of a buf_pool is less than this size then LRU eviction
+should not happen. This is because when we do LRU flushing we also put
+the blocks on free list. If LRU list is very small then we can end up
+in thrashing. */
+#define BUF_LRU_MIN_LEN 256
+
extern buf_pool_t* buf_pool_ptr; /*!< The buffer pools
of the database */
@@ -1394,7 +1400,6 @@ buf_get_nth_chunk_block(
if needed.
@param[in] size size in bytes
@return aligned size */
-UNIV_INLINE
ulint
buf_pool_size_align(
ulint size);
@@ -2485,7 +2490,7 @@ struct CheckUnzipLRUAndLRUList {
};
#endif /* UNIV_DEBUG || defined UNIV_BUF_DEBUG */
-#include "buf0buf.ic"
+#include "buf0buf.inl"
#endif /* !UNIV_INNOCHECKSUM */
diff --git a/storage/innobase/include/buf0buf.ic b/storage/innobase/include/buf0buf.inl
index 9fcac6e2695..ac50588c217 100644
--- a/storage/innobase/include/buf0buf.ic
+++ b/storage/innobase/include/buf0buf.inl
@@ -1390,22 +1390,3 @@ buf_page_get_frame(
return ((buf_block_t*) bpage)->frame;
}
}
-
-/** Calculate aligned buffer pool size based on srv_buf_pool_chunk_unit,
-if needed.
-@param[in] size size in bytes
-@return aligned size */
-UNIV_INLINE
-ulint
-buf_pool_size_align(
- ulint size)
-{
- const ib_uint64_t m = ((ib_uint64_t)srv_buf_pool_instances) * srv_buf_pool_chunk_unit;
- size = ut_max(size, srv_buf_pool_min_size);
-
- if (size % m == 0) {
- return(size);
- } else {
- return (ulint)((size / m + 1) * m);
- }
-}
diff --git a/storage/innobase/include/buf0flu.h b/storage/innobase/include/buf0flu.h
index e022dd55215..aa9eb78b8ef 100644
--- a/storage/innobase/include/buf0flu.h
+++ b/storage/innobase/include/buf0flu.h
@@ -397,6 +397,6 @@ private:
bool m_interrupted;
};
-#include "buf0flu.ic"
+#include "buf0flu.inl"
#endif
diff --git a/storage/innobase/include/buf0flu.ic b/storage/innobase/include/buf0flu.inl
index 02f3d8ced57..02f3d8ced57 100644
--- a/storage/innobase/include/buf0flu.ic
+++ b/storage/innobase/include/buf0flu.inl
diff --git a/storage/innobase/include/data0data.h b/storage/innobase/include/data0data.h
index fc774b6ee60..c2b8c3e00b6 100644
--- a/storage/innobase/include/data0data.h
+++ b/storage/innobase/include/data0data.h
@@ -705,6 +705,6 @@ struct big_rec_t {
ulint n_fld);
};
-#include "data0data.ic"
+#include "data0data.inl"
#endif
diff --git a/storage/innobase/include/data0data.ic b/storage/innobase/include/data0data.inl
index 39ade7b1e09..39ade7b1e09 100644
--- a/storage/innobase/include/data0data.ic
+++ b/storage/innobase/include/data0data.inl
diff --git a/storage/innobase/include/data0type.h b/storage/innobase/include/data0type.h
index 0e496085113..3523a487d74 100644
--- a/storage/innobase/include/data0type.h
+++ b/storage/innobase/include/data0type.h
@@ -600,6 +600,6 @@ static const byte REC_INFO_METADATA_ADD
static const byte REC_INFO_METADATA_ALTER
= REC_INFO_METADATA_ADD | REC_INFO_DELETED_FLAG;
-#include "data0type.ic"
+#include "data0type.inl"
#endif
diff --git a/storage/innobase/include/data0type.ic b/storage/innobase/include/data0type.inl
index 037a71a9345..037a71a9345 100644
--- a/storage/innobase/include/data0type.ic
+++ b/storage/innobase/include/data0type.inl
diff --git a/storage/innobase/include/dict0boot.h b/storage/innobase/include/dict0boot.h
index 778471b77ae..4daa1d23c4f 100644
--- a/storage/innobase/include/dict0boot.h
+++ b/storage/innobase/include/dict0boot.h
@@ -340,6 +340,6 @@ two) is assigned, the field DICT_HDR_ROW_ID on the dictionary header page is
updated */
#define DICT_HDR_ROW_ID_WRITE_MARGIN 256
-#include "dict0boot.ic"
+#include "dict0boot.inl"
#endif
diff --git a/storage/innobase/include/dict0boot.ic b/storage/innobase/include/dict0boot.inl
index 7b0a2fd0b86..7b0a2fd0b86 100644
--- a/storage/innobase/include/dict0boot.ic
+++ b/storage/innobase/include/dict0boot.inl
diff --git a/storage/innobase/include/dict0crea.h b/storage/innobase/include/dict0crea.h
index 92f55ce4a14..e3c40c794e9 100644
--- a/storage/innobase/include/dict0crea.h
+++ b/storage/innobase/include/dict0crea.h
@@ -320,6 +320,6 @@ dict_get_v_col_pos(
#define INDEX_CREATE_INDEX_TREE 3
#define INDEX_ADD_TO_CACHE 4
-#include "dict0crea.ic"
+#include "dict0crea.inl"
#endif
diff --git a/storage/innobase/include/dict0crea.ic b/storage/innobase/include/dict0crea.inl
index 5641206d313..5641206d313 100644
--- a/storage/innobase/include/dict0crea.ic
+++ b/storage/innobase/include/dict0crea.inl
diff --git a/storage/innobase/include/dict0dict.h b/storage/innobase/include/dict0dict.h
index 0f730ffbcb7..2326f00599b 100644
--- a/storage/innobase/include/dict0dict.h
+++ b/storage/innobase/include/dict0dict.h
@@ -1790,6 +1790,6 @@ bool
dict_table_have_virtual_index(
dict_table_t* table);
-#include "dict0dict.ic"
+#include "dict0dict.inl"
#endif
diff --git a/storage/innobase/include/dict0dict.ic b/storage/innobase/include/dict0dict.inl
index d00f4f8f6a3..d00f4f8f6a3 100644
--- a/storage/innobase/include/dict0dict.ic
+++ b/storage/innobase/include/dict0dict.inl
diff --git a/storage/innobase/include/dict0mem.h b/storage/innobase/include/dict0mem.h
index 8f0b08e7864..596800ee8d2 100644
--- a/storage/innobase/include/dict0mem.h
+++ b/storage/innobase/include/dict0mem.h
@@ -2521,6 +2521,6 @@ inline void dict_stats_empty_defrag_stats(dict_index_t* index)
index->stat_defrag_n_page_split = 0;
}
-#include "dict0mem.ic"
+#include "dict0mem.inl"
#endif /* dict0mem_h */
diff --git a/storage/innobase/include/dict0mem.ic b/storage/innobase/include/dict0mem.inl
index 090ec73278b..090ec73278b 100644
--- a/storage/innobase/include/dict0mem.ic
+++ b/storage/innobase/include/dict0mem.inl
diff --git a/storage/innobase/include/dict0pagecompress.h b/storage/innobase/include/dict0pagecompress.h
index dfa6f2a244d..f1272dc447d 100644
--- a/storage/innobase/include/dict0pagecompress.h
+++ b/storage/innobase/include/dict0pagecompress.h
@@ -56,6 +56,6 @@ dict_table_page_compression_level(
const dict_table_t* table) /*!< in: table */
__attribute__((const));
-#include "dict0pagecompress.ic"
+#include "dict0pagecompress.inl"
#endif
diff --git a/storage/innobase/include/dict0pagecompress.ic b/storage/innobase/include/dict0pagecompress.inl
index c959f9cada2..c959f9cada2 100644
--- a/storage/innobase/include/dict0pagecompress.ic
+++ b/storage/innobase/include/dict0pagecompress.inl
diff --git a/storage/innobase/include/dict0priv.h b/storage/innobase/include/dict0priv.h
index 3f2792054e0..bef0ddad0aa 100644
--- a/storage/innobase/include/dict0priv.h
+++ b/storage/innobase/include/dict0priv.h
@@ -45,6 +45,6 @@ dict_table_check_if_in_cache_low(
/*=============================*/
const char* table_name); /*!< in: table name */
-#include "dict0priv.ic"
+#include "dict0priv.inl"
#endif /* dict0priv.h */
diff --git a/storage/innobase/include/dict0priv.ic b/storage/innobase/include/dict0priv.inl
index ff645378175..ff645378175 100644
--- a/storage/innobase/include/dict0priv.ic
+++ b/storage/innobase/include/dict0priv.inl
diff --git a/storage/innobase/include/dict0stats.h b/storage/innobase/include/dict0stats.h
index 2e001cb56e9..dccb354f803 100644
--- a/storage/innobase/include/dict0stats.h
+++ b/storage/innobase/include/dict0stats.h
@@ -234,7 +234,7 @@ dberr_t
dict_stats_report_error(dict_table_t* table, bool defragment = false)
MY_ATTRIBUTE((nonnull, warn_unused_result));
-#include "dict0stats.ic"
+#include "dict0stats.inl"
#ifdef UNIV_ENABLE_UNIT_TEST_DICT_STATS
void test_dict_stats_all();
diff --git a/storage/innobase/include/dict0stats.ic b/storage/innobase/include/dict0stats.inl
index d4e23ecb0a4..d4e23ecb0a4 100644
--- a/storage/innobase/include/dict0stats.ic
+++ b/storage/innobase/include/dict0stats.inl
diff --git a/storage/innobase/include/eval0eval.h b/storage/innobase/include/eval0eval.h
index ebd40924a49..a3ea046250b 100644
--- a/storage/innobase/include/eval0eval.h
+++ b/storage/innobase/include/eval0eval.h
@@ -104,6 +104,6 @@ eval_cmp(
func_node_t* cmp_node); /*!< in: comparison node */
-#include "eval0eval.ic"
+#include "eval0eval.inl"
#endif
diff --git a/storage/innobase/include/eval0eval.ic b/storage/innobase/include/eval0eval.inl
index ae0887408b0..ae0887408b0 100644
--- a/storage/innobase/include/eval0eval.ic
+++ b/storage/innobase/include/eval0eval.inl
diff --git a/storage/innobase/include/eval0proc.h b/storage/innobase/include/eval0proc.h
index 71700bb5933..a93140bf053 100644
--- a/storage/innobase/include/eval0proc.h
+++ b/storage/innobase/include/eval0proc.h
@@ -89,6 +89,6 @@ return_step(
/*========*/
que_thr_t* thr); /*!< in: query thread */
-#include "eval0proc.ic"
+#include "eval0proc.inl"
#endif
diff --git a/storage/innobase/include/eval0proc.ic b/storage/innobase/include/eval0proc.inl
index b0c5f75b94e..b0c5f75b94e 100644
--- a/storage/innobase/include/eval0proc.ic
+++ b/storage/innobase/include/eval0proc.inl
diff --git a/storage/innobase/include/fil0crypt.h b/storage/innobase/include/fil0crypt.h
index 8a3023ae134..4182b0a7c9d 100644
--- a/storage/innobase/include/fil0crypt.h
+++ b/storage/innobase/include/fil0crypt.h
@@ -477,7 +477,7 @@ fil_space_get_scrub_status(
const fil_space_t* space,
fil_space_scrub_status_t* status);
-#include "fil0crypt.ic"
+#include "fil0crypt.inl"
#endif /* !UNIV_INNOCHECKSUM */
/**
diff --git a/storage/innobase/include/fil0crypt.ic b/storage/innobase/include/fil0crypt.inl
index cc59b394368..cc59b394368 100644
--- a/storage/innobase/include/fil0crypt.ic
+++ b/storage/innobase/include/fil0crypt.inl
diff --git a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fil.h
index 604ec51fced..0c0af083a00 100644
--- a/storage/innobase/include/fil0fil.h
+++ b/storage/innobase/include/fil0fil.h
@@ -1595,7 +1595,7 @@ UNIV_INTERN
ulint
fil_space_get_block_size(const fil_space_t* space, unsigned offset);
-#include "fil0fil.ic"
+#include "fil0fil.inl"
#endif /* UNIV_INNOCHECKSUM */
#endif /* fil0fil_h */
diff --git a/storage/innobase/include/fil0fil.ic b/storage/innobase/include/fil0fil.inl
index 24e4157d1f3..24e4157d1f3 100644
--- a/storage/innobase/include/fil0fil.ic
+++ b/storage/innobase/include/fil0fil.inl
diff --git a/storage/innobase/include/fsp0fsp.h b/storage/innobase/include/fsp0fsp.h
index 772577ed20c..16d3274e481 100644
--- a/storage/innobase/include/fsp0fsp.h
+++ b/storage/innobase/include/fsp0fsp.h
@@ -783,6 +783,6 @@ inline ulint xdes_calc_descriptor_page(ulint zip_size, ulint offset)
#endif /* UNIV_INNOCHECKSUM */
-#include "fsp0fsp.ic"
+#include "fsp0fsp.inl"
#endif
diff --git a/storage/innobase/include/fsp0fsp.ic b/storage/innobase/include/fsp0fsp.inl
index 31b9d8c5dbe..31b9d8c5dbe 100644
--- a/storage/innobase/include/fsp0fsp.ic
+++ b/storage/innobase/include/fsp0fsp.inl
diff --git a/storage/innobase/include/fsp0pagecompress.h b/storage/innobase/include/fsp0pagecompress.h
index 27423858435..34a132582c6 100644
--- a/storage/innobase/include/fsp0pagecompress.h
+++ b/storage/innobase/include/fsp0pagecompress.h
@@ -48,6 +48,6 @@ fsp_flags_get_page_compression_level(
/*=================================*/
ulint flags); /*!< in: tablespace flags */
-#include "fsp0pagecompress.ic"
+#include "fsp0pagecompress.inl"
#endif
diff --git a/storage/innobase/include/fsp0pagecompress.ic b/storage/innobase/include/fsp0pagecompress.inl
index 590a609c309..590a609c309 100644
--- a/storage/innobase/include/fsp0pagecompress.ic
+++ b/storage/innobase/include/fsp0pagecompress.inl
diff --git a/storage/innobase/include/fts0priv.h b/storage/innobase/include/fts0priv.h
index 6f00504525f..5517f05f1b6 100644
--- a/storage/innobase/include/fts0priv.h
+++ b/storage/innobase/include/fts0priv.h
@@ -511,6 +511,6 @@ fts_config_create_index_param_name(
const dict_index_t* index) /*!< in: index for config */
MY_ATTRIBUTE((nonnull, malloc, warn_unused_result));
-#include "fts0priv.ic"
+#include "fts0priv.inl"
#endif /* INNOBASE_FTS0PRIV_H */
diff --git a/storage/innobase/include/fts0priv.ic b/storage/innobase/include/fts0priv.inl
index da14cfcb013..da14cfcb013 100644
--- a/storage/innobase/include/fts0priv.ic
+++ b/storage/innobase/include/fts0priv.inl
diff --git a/storage/innobase/include/fts0types.h b/storage/innobase/include/fts0types.h
index d49bc7c0254..2cddf152d04 100644
--- a/storage/innobase/include/fts0types.h
+++ b/storage/innobase/include/fts0types.h
@@ -351,6 +351,6 @@ fts_select_index(
const byte* str,
ulint len);
-#include "fts0types.ic"
+#include "fts0types.inl"
#endif /* INNOBASE_FTS0TYPES_H */
diff --git a/storage/innobase/include/fts0types.ic b/storage/innobase/include/fts0types.inl
index ed61726ff80..ed61726ff80 100644
--- a/storage/innobase/include/fts0types.ic
+++ b/storage/innobase/include/fts0types.inl
diff --git a/storage/innobase/include/fut0lst.h b/storage/innobase/include/fut0lst.h
index 9fa928eda23..0782781b8df 100644
--- a/storage/innobase/include/fut0lst.h
+++ b/storage/innobase/include/fut0lst.h
@@ -195,7 +195,7 @@ flst_validate(
const flst_base_node_t* base, /*!< in: pointer to base node of list */
mtr_t* mtr1); /*!< in: mtr */
-#include "fut0lst.ic"
+#include "fut0lst.inl"
#endif /* !UNIV_INNOCHECKSUM */
diff --git a/storage/innobase/include/fut0lst.ic b/storage/innobase/include/fut0lst.inl
index ec4181b2c93..ec4181b2c93 100644
--- a/storage/innobase/include/fut0lst.ic
+++ b/storage/innobase/include/fut0lst.inl
diff --git a/storage/innobase/include/gis0rtree.h b/storage/innobase/include/gis0rtree.h
index 01fcc2943d2..b4646cd357b 100644
--- a/storage/innobase/include/gis0rtree.h
+++ b/storage/innobase/include/gis0rtree.h
@@ -491,5 +491,5 @@ rtr_estimate_n_rows_in_range(
const dtuple_t* tuple,
page_cur_mode_t mode);
-#include "gis0rtree.ic"
+#include "gis0rtree.inl"
#endif /*!< gis0rtree.h */
diff --git a/storage/innobase/include/gis0rtree.ic b/storage/innobase/include/gis0rtree.inl
index c829f0de255..c829f0de255 100644
--- a/storage/innobase/include/gis0rtree.ic
+++ b/storage/innobase/include/gis0rtree.inl
diff --git a/storage/innobase/include/ha0ha.h b/storage/innobase/include/ha0ha.h
index 1944309c8ec..b4a28e44e04 100644
--- a/storage/innobase/include/ha0ha.h
+++ b/storage/innobase/include/ha0ha.h
@@ -236,6 +236,6 @@ hash_assert_can_search(
#define hash_assert_can_search(t, f)
#endif /* UNIV_DEBUG */
-#include "ha0ha.ic"
+#include "ha0ha.inl"
#endif
diff --git a/storage/innobase/include/ha0ha.ic b/storage/innobase/include/ha0ha.inl
index 0612ef1bb25..0612ef1bb25 100644
--- a/storage/innobase/include/ha0ha.ic
+++ b/storage/innobase/include/ha0ha.inl
diff --git a/storage/innobase/include/ha0storage.h b/storage/innobase/include/ha0storage.h
index db23ddc66ed..fdf50a2ee4a 100644
--- a/storage/innobase/include/ha0storage.h
+++ b/storage/innobase/include/ha0storage.h
@@ -132,6 +132,6 @@ ha_storage_get_size(
/*================*/
const ha_storage_t* storage); /*!< in: hash storage */
-#include "ha0storage.ic"
+#include "ha0storage.inl"
#endif /* ha0storage_h */
diff --git a/storage/innobase/include/ha0storage.ic b/storage/innobase/include/ha0storage.inl
index 8cc487faf47..8cc487faf47 100644
--- a/storage/innobase/include/ha0storage.ic
+++ b/storage/innobase/include/ha0storage.inl
diff --git a/storage/innobase/include/hash0hash.h b/storage/innobase/include/hash0hash.h
index 4f55b051d80..e2565c62169 100644
--- a/storage/innobase/include/hash0hash.h
+++ b/storage/innobase/include/hash0hash.h
@@ -520,6 +520,6 @@ struct hash_table_t {
#endif /* UNIV_DEBUG */
};
-#include "hash0hash.ic"
+#include "hash0hash.inl"
#endif
diff --git a/storage/innobase/include/hash0hash.ic b/storage/innobase/include/hash0hash.inl
index d6dd104572f..d6dd104572f 100644
--- a/storage/innobase/include/hash0hash.ic
+++ b/storage/innobase/include/hash0hash.inl
diff --git a/storage/innobase/include/ibuf0ibuf.h b/storage/innobase/include/ibuf0ibuf.h
index 45d674f2c02..73f7054c9fb 100644
--- a/storage/innobase/include/ibuf0ibuf.h
+++ b/storage/innobase/include/ibuf0ibuf.h
@@ -416,6 +416,6 @@ for the file segment from which the pages for the ibuf tree are allocated */
/* The insert buffer tree itself is always located in space 0. */
#define IBUF_SPACE_ID static_cast<ulint>(0)
-#include "ibuf0ibuf.ic"
+#include "ibuf0ibuf.inl"
#endif
diff --git a/storage/innobase/include/ibuf0ibuf.ic b/storage/innobase/include/ibuf0ibuf.inl
index db8c122c0f7..db8c122c0f7 100644
--- a/storage/innobase/include/ibuf0ibuf.ic
+++ b/storage/innobase/include/ibuf0ibuf.inl
diff --git a/storage/innobase/include/lock0lock.h b/storage/innobase/include/lock0lock.h
index 53e8761971d..9c3f5d57f01 100644
--- a/storage/innobase/include/lock0lock.h
+++ b/storage/innobase/include/lock0lock.h
@@ -1047,6 +1047,6 @@ lock_get_info(
#endif /* WITH_WSREP */
-#include "lock0lock.ic"
+#include "lock0lock.inl"
#endif
diff --git a/storage/innobase/include/lock0lock.ic b/storage/innobase/include/lock0lock.inl
index abe5052627b..abe5052627b 100644
--- a/storage/innobase/include/lock0lock.ic
+++ b/storage/innobase/include/lock0lock.inl
diff --git a/storage/innobase/include/lock0priv.h b/storage/innobase/include/lock0priv.h
index 1a950ac1cfa..b7dcbfa2b86 100644
--- a/storage/innobase/include/lock0priv.h
+++ b/storage/innobase/include/lock0priv.h
@@ -685,6 +685,6 @@ inline void lock_reset_lock_and_trx_wait(lock_t* lock)
lock->type_mode &= ~LOCK_WAIT;
}
-#include "lock0priv.ic"
+#include "lock0priv.inl"
#endif /* lock0priv_h */
diff --git a/storage/innobase/include/lock0priv.ic b/storage/innobase/include/lock0priv.inl
index 8bb145e41fc..8bb145e41fc 100644
--- a/storage/innobase/include/lock0priv.ic
+++ b/storage/innobase/include/lock0priv.inl
diff --git a/storage/innobase/include/log0log.h b/storage/innobase/include/log0log.h
index fb027e1a823..477bb0a1d05 100644
--- a/storage/innobase/include/log0log.h
+++ b/storage/innobase/include/log0log.h
@@ -803,6 +803,6 @@ extern os_event_t log_scrub_event;
/** Whether log_scrub_thread is active */
extern bool log_scrub_thread_active;
-#include "log0log.ic"
+#include "log0log.inl"
#endif
diff --git a/storage/innobase/include/log0log.ic b/storage/innobase/include/log0log.inl
index 8dfd86d3078..8dfd86d3078 100644
--- a/storage/innobase/include/log0log.ic
+++ b/storage/innobase/include/log0log.inl
diff --git a/storage/innobase/include/mach0data.h b/storage/innobase/include/mach0data.h
index 7b776759a67..d160ddbcb9e 100644
--- a/storage/innobase/include/mach0data.h
+++ b/storage/innobase/include/mach0data.h
@@ -389,6 +389,6 @@ mach_write_ulonglong(
#endif /* !UNIV_INNOCHECKSUM */
-#include "mach0data.ic"
+#include "mach0data.inl"
#endif
diff --git a/storage/innobase/include/mach0data.ic b/storage/innobase/include/mach0data.inl
index 80bd925d70b..80bd925d70b 100644
--- a/storage/innobase/include/mach0data.ic
+++ b/storage/innobase/include/mach0data.inl
diff --git a/storage/innobase/include/mem0mem.h b/storage/innobase/include/mem0mem.h
index 18ae845955a..3f0db717be8 100644
--- a/storage/innobase/include/mem0mem.h
+++ b/storage/innobase/include/mem0mem.h
@@ -343,5 +343,5 @@ struct mem_block_info_t {
#define MEM_BLOCK_HEADER_SIZE UT_CALC_ALIGN(sizeof(mem_block_info_t),\
UNIV_MEM_ALIGNMENT)
-#include "mem0mem.ic"
+#include "mem0mem.inl"
#endif
diff --git a/storage/innobase/include/mem0mem.ic b/storage/innobase/include/mem0mem.inl
index 9236bbef05d..9236bbef05d 100644
--- a/storage/innobase/include/mem0mem.ic
+++ b/storage/innobase/include/mem0mem.inl
diff --git a/storage/innobase/include/mtr0log.h b/storage/innobase/include/mtr0log.h
index 0c58f524015..d8060d106d6 100644
--- a/storage/innobase/include/mtr0log.h
+++ b/storage/innobase/include/mtr0log.h
@@ -252,6 +252,6 @@ mlog_parse_index(
extra mlog buffer size for variable size data */
#define MLOG_BUF_MARGIN 256
-#include "mtr0log.ic"
+#include "mtr0log.inl"
#endif /* mtr0log_h */
diff --git a/storage/innobase/include/mtr0log.ic b/storage/innobase/include/mtr0log.inl
index 70bcaf43b9e..70bcaf43b9e 100644
--- a/storage/innobase/include/mtr0log.ic
+++ b/storage/innobase/include/mtr0log.inl
diff --git a/storage/innobase/include/mtr0mtr.h b/storage/innobase/include/mtr0mtr.h
index 08e7deb052b..f8a15aef7f9 100644
--- a/storage/innobase/include/mtr0mtr.h
+++ b/storage/innobase/include/mtr0mtr.h
@@ -486,6 +486,6 @@ private:
lsn_t m_commit_lsn;
};
-#include "mtr0mtr.ic"
+#include "mtr0mtr.inl"
#endif /* mtr0mtr_h */
diff --git a/storage/innobase/include/mtr0mtr.ic b/storage/innobase/include/mtr0mtr.inl
index c35de2bcbf9..c35de2bcbf9 100644
--- a/storage/innobase/include/mtr0mtr.ic
+++ b/storage/innobase/include/mtr0mtr.inl
diff --git a/storage/innobase/include/os0file.h b/storage/innobase/include/os0file.h
index 6ea3e3d399d..b301fcf5dfa 100644
--- a/storage/innobase/include/os0file.h
+++ b/storage/innobase/include/os0file.h
@@ -1566,6 +1566,6 @@ is_absolute_path(
return(false);
}
-#include "os0file.ic"
+#include "os0file.inl"
#endif /* os0file_h */
diff --git a/storage/innobase/include/os0file.ic b/storage/innobase/include/os0file.inl
index e01fcb41afb..e01fcb41afb 100644
--- a/storage/innobase/include/os0file.ic
+++ b/storage/innobase/include/os0file.inl
diff --git a/storage/innobase/include/page0cur.h b/storage/innobase/include/page0cur.h
index 3cba50947a7..1de6952b7eb 100644
--- a/storage/innobase/include/page0cur.h
+++ b/storage/innobase/include/page0cur.h
@@ -397,6 +397,6 @@ struct page_cur_t{
buf_block_t* block; /*!< pointer to the block containing rec */
};
-#include "page0cur.ic"
+#include "page0cur.inl"
#endif
diff --git a/storage/innobase/include/page0cur.ic b/storage/innobase/include/page0cur.inl
index e53f6d8f463..e53f6d8f463 100644
--- a/storage/innobase/include/page0cur.ic
+++ b/storage/innobase/include/page0cur.inl
diff --git a/storage/innobase/include/page0page.h b/storage/innobase/include/page0page.h
index 34792c27b68..e80a9a050fe 100644
--- a/storage/innobase/include/page0page.h
+++ b/storage/innobase/include/page0page.h
@@ -1307,6 +1307,6 @@ page_find_rec_max_not_deleted(
#endif /* !UNIV_INNOCHECKSUM */
-#include "page0page.ic"
+#include "page0page.inl"
#endif
diff --git a/storage/innobase/include/page0page.ic b/storage/innobase/include/page0page.inl
index 04e850ea301..04e850ea301 100644
--- a/storage/innobase/include/page0page.ic
+++ b/storage/innobase/include/page0page.inl
diff --git a/storage/innobase/include/page0zip.h b/storage/innobase/include/page0zip.h
index ec205fd79bf..4c2c88e6de0 100644
--- a/storage/innobase/include/page0zip.h
+++ b/storage/innobase/include/page0zip.h
@@ -531,7 +531,7 @@ void
page_zip_reset_stat_per_index();
/*===========================*/
-#include "page0zip.ic"
+#include "page0zip.inl"
#endif /* !UNIV_INNOCHECKSUM */
#endif /* page0zip_h */
diff --git a/storage/innobase/include/page0zip.ic b/storage/innobase/include/page0zip.inl
index 337debd30e9..337debd30e9 100644
--- a/storage/innobase/include/page0zip.ic
+++ b/storage/innobase/include/page0zip.inl
diff --git a/storage/innobase/include/que0que.h b/storage/innobase/include/que0que.h
index f018f73527d..594219bd5d9 100644
--- a/storage/innobase/include/que0que.h
+++ b/storage/innobase/include/que0que.h
@@ -431,6 +431,6 @@ struct que_fork_t{
/* Flag which is ORed to control structure statement node types */
#define QUE_NODE_CONTROL_STAT 1024
-#include "que0que.ic"
+#include "que0que.inl"
#endif
diff --git a/storage/innobase/include/que0que.ic b/storage/innobase/include/que0que.inl
index 1c3ac242bf2..1c3ac242bf2 100644
--- a/storage/innobase/include/que0que.ic
+++ b/storage/innobase/include/que0que.inl
diff --git a/storage/innobase/include/rem0cmp.h b/storage/innobase/include/rem0cmp.h
index 65504d14416..43319e4c4d0 100644
--- a/storage/innobase/include/rem0cmp.h
+++ b/storage/innobase/include/rem0cmp.h
@@ -231,6 +231,6 @@ cmp_dfield_dfield_like_prefix(
const dfield_t* dfield1,
const dfield_t* dfield2);
-#include "rem0cmp.ic"
+#include "rem0cmp.inl"
#endif
diff --git a/storage/innobase/include/rem0cmp.ic b/storage/innobase/include/rem0cmp.inl
index 4230543615a..4230543615a 100644
--- a/storage/innobase/include/rem0cmp.ic
+++ b/storage/innobase/include/rem0cmp.inl
diff --git a/storage/innobase/include/rem0rec.h b/storage/innobase/include/rem0rec.h
index 34e7c5f1b0f..23956dcb068 100644
--- a/storage/innobase/include/rem0rec.h
+++ b/storage/innobase/include/rem0rec.h
@@ -1390,7 +1390,7 @@ int wsrep_rec_get_foreign_key(
ibool new_protocol); /* in: protocol > 1 */
#endif /* WITH_WSREP */
-#include "rem0rec.ic"
+#include "rem0rec.inl"
#endif /* !UNIV_INNOCHECKSUM */
#endif /* rem0rec_h */
diff --git a/storage/innobase/include/rem0rec.ic b/storage/innobase/include/rem0rec.inl
index 6cecd9f1f08..6cecd9f1f08 100644
--- a/storage/innobase/include/rem0rec.ic
+++ b/storage/innobase/include/rem0rec.inl
diff --git a/storage/innobase/include/row0ext.h b/storage/innobase/include/row0ext.h
index 251f3125667..78886332aa6 100644
--- a/storage/innobase/include/row0ext.h
+++ b/storage/innobase/include/row0ext.h
@@ -96,6 +96,6 @@ struct row_ext_t{
ulint len[1]; /*!< prefix lengths; 0 if not cached */
};
-#include "row0ext.ic"
+#include "row0ext.inl"
#endif
diff --git a/storage/innobase/include/row0ext.ic b/storage/innobase/include/row0ext.inl
index 913b51b34d2..913b51b34d2 100644
--- a/storage/innobase/include/row0ext.ic
+++ b/storage/innobase/include/row0ext.inl
diff --git a/storage/innobase/include/row0log.h b/storage/innobase/include/row0log.h
index 93aa5c24230..35826e2f4d5 100644
--- a/storage/innobase/include/row0log.h
+++ b/storage/innobase/include/row0log.h
@@ -263,6 +263,6 @@ row_log_estimate_work(
const dict_index_t* index);
#endif /* HAVE_PSI_STAGE_INTERFACE */
-#include "row0log.ic"
+#include "row0log.inl"
#endif /* row0log.h */
diff --git a/storage/innobase/include/row0log.ic b/storage/innobase/include/row0log.inl
index 44d17bbcdf1..44d17bbcdf1 100644
--- a/storage/innobase/include/row0log.ic
+++ b/storage/innobase/include/row0log.inl
diff --git a/storage/innobase/include/row0row.h b/storage/innobase/include/row0row.h
index b4dab3c2f1b..1e0fdc65238 100644
--- a/storage/innobase/include/row0row.h
+++ b/storage/innobase/include/row0row.h
@@ -427,6 +427,6 @@ row_mtr_start(mtr_t* mtr, dict_index_t* index, bool pessimistic)
log_free_check();
}
-#include "row0row.ic"
+#include "row0row.inl"
#endif
diff --git a/storage/innobase/include/row0row.ic b/storage/innobase/include/row0row.inl
index e89adb581f4..e89adb581f4 100644
--- a/storage/innobase/include/row0row.ic
+++ b/storage/innobase/include/row0row.inl
diff --git a/storage/innobase/include/row0sel.h b/storage/innobase/include/row0sel.h
index 717e1a2be0b..a683a2178e4 100644
--- a/storage/innobase/include/row0sel.h
+++ b/storage/innobase/include/row0sel.h
@@ -477,6 +477,6 @@ row_sel_field_store_in_mysql_format_func(
const byte* data, /*!< in: data to store */
ulint len); /*!< in: length of the data */
-#include "row0sel.ic"
+#include "row0sel.inl"
#endif
diff --git a/storage/innobase/include/row0sel.ic b/storage/innobase/include/row0sel.inl
index 7880605ca8f..7880605ca8f 100644
--- a/storage/innobase/include/row0sel.ic
+++ b/storage/innobase/include/row0sel.inl
diff --git a/storage/innobase/include/row0upd.h b/storage/innobase/include/row0upd.h
index 2b06d406296..2615bf55a04 100644
--- a/storage/innobase/include/row0upd.h
+++ b/storage/innobase/include/row0upd.h
@@ -638,6 +638,6 @@ public:
changed in the update */
-#include "row0upd.ic"
+#include "row0upd.inl"
#endif
diff --git a/storage/innobase/include/row0upd.ic b/storage/innobase/include/row0upd.inl
index fffb7650da3..fffb7650da3 100644
--- a/storage/innobase/include/row0upd.ic
+++ b/storage/innobase/include/row0upd.inl
diff --git a/storage/innobase/include/srv0mon.h b/storage/innobase/include/srv0mon.h
index 934f88ac8ae..bfc24f43441 100644
--- a/storage/innobase/include/srv0mon.h
+++ b/storage/innobase/include/srv0mon.h
@@ -904,6 +904,6 @@ void
srv_mon_default_on(void);
/*====================*/
-#include "srv0mon.ic"
+#include "srv0mon.inl"
#endif
diff --git a/storage/innobase/include/srv0mon.ic b/storage/innobase/include/srv0mon.inl
index 158345b2f8c..158345b2f8c 100644
--- a/storage/innobase/include/srv0mon.ic
+++ b/storage/innobase/include/srv0mon.inl
diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
index e08a54eac7b..40b382e8721 100644
--- a/storage/innobase/include/srv0srv.h
+++ b/storage/innobase/include/srv0srv.h
@@ -362,10 +362,6 @@ extern my_bool srv_load_corrupted;
/** Requested size in bytes */
extern ulint srv_buf_pool_size;
-/** Minimum pool size in bytes */
-extern const ulint srv_buf_pool_min_size;
-/** Default pool size in bytes */
-extern const ulint srv_buf_pool_def_size;
/** Requested buffer pool chunk size. Each buffer pool instance consists
of one or more chunks. */
extern ulong srv_buf_pool_chunk_unit;
diff --git a/storage/innobase/include/sync0arr.h b/storage/innobase/include/sync0arr.h
index e4186b74370..99f980e28e0 100644
--- a/storage/innobase/include/sync0arr.h
+++ b/storage/innobase/include/sync0arr.h
@@ -125,6 +125,6 @@ sync_array_get_nth_cell(
sync_array_t* arr, /*!< in: sync array */
ulint n); /*!< in: index */
-#include "sync0arr.ic"
+#include "sync0arr.inl"
#endif /* sync0arr_h */
diff --git a/storage/innobase/include/sync0arr.ic b/storage/innobase/include/sync0arr.inl
index 962226b4934..962226b4934 100644
--- a/storage/innobase/include/sync0arr.ic
+++ b/storage/innobase/include/sync0arr.inl
diff --git a/storage/innobase/include/sync0rw.h b/storage/innobase/include/sync0rw.h
index 948a5442c53..87d123fc7a9 100644
--- a/storage/innobase/include/sync0rw.h
+++ b/storage/innobase/include/sync0rw.h
@@ -835,6 +835,6 @@ pfs_rw_lock_free_func(
rw_lock_t* lock); /*!< in: rw-lock */
#endif /* UNIV_PFS_RWLOCK */
-#include "sync0rw.ic"
+#include "sync0rw.inl"
#endif /* sync0rw.h */
diff --git a/storage/innobase/include/sync0rw.ic b/storage/innobase/include/sync0rw.inl
index 603e902d01c..603e902d01c 100644
--- a/storage/innobase/include/sync0rw.ic
+++ b/storage/innobase/include/sync0rw.inl
diff --git a/storage/innobase/include/trx0purge.h b/storage/innobase/include/trx0purge.h
index 4c0528ba5ec..a5a27555f5d 100644
--- a/storage/innobase/include/trx0purge.h
+++ b/storage/innobase/include/trx0purge.h
@@ -274,6 +274,6 @@ struct trx_purge_rec_t {
roll_ptr_t roll_ptr; /*!< File pointr to UNDO record */
};
-#include "trx0purge.ic"
+#include "trx0purge.inl"
#endif /* trx0purge_h */
diff --git a/storage/innobase/include/trx0purge.ic b/storage/innobase/include/trx0purge.inl
index e460676d58e..e460676d58e 100644
--- a/storage/innobase/include/trx0purge.ic
+++ b/storage/innobase/include/trx0purge.inl
diff --git a/storage/innobase/include/trx0rec.h b/storage/innobase/include/trx0rec.h
index f27d8af0368..fa084ff274c 100644
--- a/storage/innobase/include/trx0rec.h
+++ b/storage/innobase/include/trx0rec.h
@@ -327,6 +327,6 @@ record */
/** The search tuple corresponding to TRX_UNDO_INSERT_METADATA */
extern const dtuple_t trx_undo_metadata;
-#include "trx0rec.ic"
+#include "trx0rec.inl"
#endif /* trx0rec_h */
diff --git a/storage/innobase/include/trx0rec.ic b/storage/innobase/include/trx0rec.inl
index 02244d68b6f..02244d68b6f 100644
--- a/storage/innobase/include/trx0rec.ic
+++ b/storage/innobase/include/trx0rec.inl
diff --git a/storage/innobase/include/trx0rseg.h b/storage/innobase/include/trx0rseg.h
index 27548e96b0a..32153f82198 100644
--- a/storage/innobase/include/trx0rseg.h
+++ b/storage/innobase/include/trx0rseg.h
@@ -304,6 +304,6 @@ up to which replication has proceeded.
void
trx_rseg_update_binlog_offset(byte* rseg_header, const trx_t* trx, mtr_t* mtr);
-#include "trx0rseg.ic"
+#include "trx0rseg.inl"
#endif
diff --git a/storage/innobase/include/trx0rseg.ic b/storage/innobase/include/trx0rseg.inl
index 0cff8fa1f5c..0cff8fa1f5c 100644
--- a/storage/innobase/include/trx0rseg.ic
+++ b/storage/innobase/include/trx0rseg.inl
diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h
index fa5ad1422e5..b84f458374e 100644
--- a/storage/innobase/include/trx0trx.h
+++ b/storage/innobase/include/trx0trx.h
@@ -1158,6 +1158,6 @@ struct commit_node_t{
mutex_exit(&t->mutex); \
} while (0)
-#include "trx0trx.ic"
+#include "trx0trx.inl"
#endif
diff --git a/storage/innobase/include/trx0trx.ic b/storage/innobase/include/trx0trx.inl
index 72310cbba06..72310cbba06 100644
--- a/storage/innobase/include/trx0trx.ic
+++ b/storage/innobase/include/trx0trx.inl
diff --git a/storage/innobase/include/trx0undo.h b/storage/innobase/include/trx0undo.h
index 6b043112af0..55b73f45faa 100644
--- a/storage/innobase/include/trx0undo.h
+++ b/storage/innobase/include/trx0undo.h
@@ -497,7 +497,7 @@ quite a large overhead. */
with the XA XID */
/* @} */
-#include "trx0undo.ic"
+#include "trx0undo.inl"
#endif /* !UNIV_INNOCHECKSUM */
#endif
diff --git a/storage/innobase/include/trx0undo.ic b/storage/innobase/include/trx0undo.inl
index 6d1ec16869e..6d1ec16869e 100644
--- a/storage/innobase/include/trx0undo.ic
+++ b/storage/innobase/include/trx0undo.inl
diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i
index f1e355ade4d..ddb27c107ff 100644
--- a/storage/innobase/include/univ.i
+++ b/storage/innobase/include/univ.i
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2013, 2021, MariaDB Corporation.
+Copyright (c) 2013, 2022, MariaDB Corporation.
Copyright (c) 2008, Google Inc.
Portions of this file contain modifications contributed and copyrighted by
diff --git a/storage/innobase/include/ut0byte.h b/storage/innobase/include/ut0byte.h
index 4ce931e0189..1a90b523b2d 100644
--- a/storage/innobase/include/ut0byte.h
+++ b/storage/innobase/include/ut0byte.h
@@ -112,6 +112,6 @@ ut_bit_set_nth(
ulint n, /*!< in: nth bit requested */
ibool val); /*!< in: value for the bit to set */
-#include "ut0byte.ic"
+#include "ut0byte.inl"
#endif
diff --git a/storage/innobase/include/ut0byte.ic b/storage/innobase/include/ut0byte.inl
index 6dd48090c3a..6dd48090c3a 100644
--- a/storage/innobase/include/ut0byte.ic
+++ b/storage/innobase/include/ut0byte.inl
diff --git a/storage/innobase/include/ut0list.h b/storage/innobase/include/ut0list.h
index 7e27e10884b..765f6a2a339 100644
--- a/storage/innobase/include/ut0list.h
+++ b/storage/innobase/include/ut0list.h
@@ -141,6 +141,6 @@ struct ib_list_helper_t {
void* data; /*!< user data */
};
-#include "ut0list.ic"
+#include "ut0list.inl"
#endif
diff --git a/storage/innobase/include/ut0list.ic b/storage/innobase/include/ut0list.inl
index 3bdba52bfaa..3bdba52bfaa 100644
--- a/storage/innobase/include/ut0list.ic
+++ b/storage/innobase/include/ut0list.inl
diff --git a/storage/innobase/include/ut0mem.h b/storage/innobase/include/ut0mem.h
index 32d557d4f2a..99811c400da 100644
--- a/storage/innobase/include/ut0mem.h
+++ b/storage/innobase/include/ut0mem.h
@@ -126,6 +126,6 @@ ut_str_sql_format(
ulint buf_size); /*!< in: output buffer size
in bytes */
-#include "ut0mem.ic"
+#include "ut0mem.inl"
#endif
diff --git a/storage/innobase/include/ut0mem.ic b/storage/innobase/include/ut0mem.inl
index 8c8788a38aa..8c8788a38aa 100644
--- a/storage/innobase/include/ut0mem.ic
+++ b/storage/innobase/include/ut0mem.inl
diff --git a/storage/innobase/include/ut0rnd.h b/storage/innobase/include/ut0rnd.h
index 5b1ae5bc0da..dba8d3f1a06 100644
--- a/storage/innobase/include/ut0rnd.h
+++ b/storage/innobase/include/ut0rnd.h
@@ -132,6 +132,6 @@ ut_fold_binary(
ulint len) /*!< in: length */
MY_ATTRIBUTE((pure));
-#include "ut0rnd.ic"
+#include "ut0rnd.inl"
#endif
diff --git a/storage/innobase/include/ut0rnd.ic b/storage/innobase/include/ut0rnd.inl
index c0105160a42..c0105160a42 100644
--- a/storage/innobase/include/ut0rnd.ic
+++ b/storage/innobase/include/ut0rnd.inl
diff --git a/storage/innobase/include/ut0ut.h b/storage/innobase/include/ut0ut.h
index 807d99fb872..7031fc47f6a 100644
--- a/storage/innobase/include/ut0ut.h
+++ b/storage/innobase/include/ut0ut.h
@@ -455,7 +455,7 @@ private:
} // namespace ib
-#include "ut0ut.ic"
+#include "ut0ut.inl"
#endif
diff --git a/storage/innobase/include/ut0ut.ic b/storage/innobase/include/ut0ut.inl
index 73feaf82c6a..73feaf82c6a 100644
--- a/storage/innobase/include/ut0ut.ic
+++ b/storage/innobase/include/ut0ut.inl
diff --git a/storage/innobase/include/ut0vec.h b/storage/innobase/include/ut0vec.h
index cfdaee607be..f4660f9646c 100644
--- a/storage/innobase/include/ut0vec.h
+++ b/storage/innobase/include/ut0vec.h
@@ -280,6 +280,6 @@ struct ib_vector_t {
ulint sizeof_value;
};
-#include "ut0vec.ic"
+#include "ut0vec.inl"
#endif /* IB_VECTOR_H */
diff --git a/storage/innobase/include/ut0vec.ic b/storage/innobase/include/ut0vec.inl
index 531f0f22ae0..531f0f22ae0 100644
--- a/storage/innobase/include/ut0vec.ic
+++ b/storage/innobase/include/ut0vec.inl
diff --git a/storage/innobase/row/row0import.cc b/storage/innobase/row/row0import.cc
index e29684f6081..cd8e46fe623 100644
--- a/storage/innobase/row/row0import.cc
+++ b/storage/innobase/row/row0import.cc
@@ -1342,15 +1342,7 @@ row_import::match_schema(
{
/* Do some simple checks. */
- if (m_table->n_cols != m_n_cols) {
- ib_errf(thd, IB_LOG_LEVEL_ERROR, ER_TABLE_SCHEMA_MISMATCH,
- "Number of columns don't match, table has %u "
- "columns but the tablespace meta-data file has "
- ULINTPF " columns",
- m_table->n_cols, m_n_cols);
-
- return(DB_ERROR);
- } else if (UT_LIST_GET_LEN(m_table->indexes) != m_n_indexes) {
+ if (UT_LIST_GET_LEN(m_table->indexes) != m_n_indexes) {
/* If the number of indexes don't match then it is better
to abort the IMPORT. It is easy for the user to create a
diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc
index 8934a393a1d..2bfb1ffcd1d 100644
--- a/storage/innobase/srv/srv0srv.cc
+++ b/storage/innobase/srv/srv0srv.cc
@@ -216,9 +216,6 @@ UNIV_INTERN os_event_t srv_allow_writes_event;
/** copy of innodb_buffer_pool_size */
ulint srv_buf_pool_size;
-const ulint srv_buf_pool_min_size = 5 * 1024 * 1024;
-/** Default pool size in bytes */
-const ulint srv_buf_pool_def_size = 128 * 1024 * 1024;
/** Requested buffer pool chunk size. Each buffer pool instance consists
of one or more chunks. */
ulong srv_buf_pool_chunk_unit;
diff --git a/storage/maria/ma_ft_boolean_search.c b/storage/maria/ma_ft_boolean_search.c
index 70ab6b2e3f6..7fe6d8ca2cc 100644
--- a/storage/maria/ma_ft_boolean_search.c
+++ b/storage/maria/ma_ft_boolean_search.c
@@ -195,11 +195,7 @@ static int ftb_query_add_word(MYSQL_FTPARSER_PARAM *param,
switch (info->type) {
case FT_TOKEN_WORD:
ftbw= (FTB_WORD *)alloc_root(&ftb_param->ftb->mem_root,
- sizeof(FTB_WORD) +
- (info->trunc ? MARIA_MAX_KEY_BUFF :
- word_len * ftb_param->ftb->charset->mbmaxlen +
- HA_FT_WLEN +
- ftb_param->ftb->info->s->rec_reflength));
+ sizeof(FTB_WORD) + HA_MAX_KEY_BUFF);
ftbw->len= word_len + 1;
ftbw->flags= 0;
ftbw->off= 0;
diff --git a/storage/rocksdb/CMakeLists.txt b/storage/rocksdb/CMakeLists.txt
index 2af53142fc7..de0f7a111fc 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 b4fcb097b71..ce9bb7d49e2 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(
@@ -5204,6 +5217,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(
@@ -5635,7 +5655,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);
@@ -6699,6 +6726,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;
@@ -11593,6 +11640,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 270c8c6f319..766b04ac7d2 100644
--- a/storage/rocksdb/ha_rocksdb.h
+++ b/storage/rocksdb/ha_rocksdb.h
@@ -1060,6 +1060,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 47f7bb923ba..01fa9dac7fd 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 202 'Found data corruption.' from ROCKSDB
+ERROR HY000: Got error 203 '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 202 'Found data corruption.' from ROCKSDB
+ERROR HY000: Got error 203 '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 202 'Found data corruption.' from ROCKSDB
+ERROR HY000: Got error 203 '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 202 'Found data corruption.' from ROCKSDB
+ERROR HY000: Got error 203 '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 202 'Found data corruption.' from ROCKSDB
+ERROR HY000: Got error 203 '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/i_s_deadlock.result b/storage/rocksdb/mysql-test/rocksdb/r/i_s_deadlock.result
index 3ec9294e3a1..7824839808e 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/i_s_deadlock.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/i_s_deadlock.result
@@ -13,15 +13,15 @@ connection default;
show create table information_schema.rocksdb_deadlock;
Table Create Table
ROCKSDB_DEADLOCK CREATE TEMPORARY TABLE `ROCKSDB_DEADLOCK` (
- `DEADLOCK_ID` bigint(8) NOT NULL DEFAULT 0,
- `TIMESTAMP` bigint(8) NOT NULL DEFAULT 0,
- `TRANSACTION_ID` bigint(8) NOT NULL DEFAULT 0,
- `CF_NAME` varchar(193) NOT NULL DEFAULT '',
- `WAITING_KEY` varchar(513) NOT NULL DEFAULT '',
- `LOCK_TYPE` varchar(193) NOT NULL DEFAULT '',
- `INDEX_NAME` varchar(193) NOT NULL DEFAULT '',
- `TABLE_NAME` varchar(193) NOT NULL DEFAULT '',
- `ROLLED_BACK` bigint(8) NOT NULL DEFAULT 0
+ `DEADLOCK_ID` bigint(8) NOT NULL,
+ `TIMESTAMP` bigint(8) NOT NULL,
+ `TRANSACTION_ID` bigint(8) NOT NULL,
+ `CF_NAME` varchar(193) NOT NULL,
+ `WAITING_KEY` varchar(513) NOT NULL,
+ `LOCK_TYPE` varchar(193) NOT NULL,
+ `INDEX_NAME` varchar(193) NOT NULL,
+ `TABLE_NAME` varchar(193) NOT NULL,
+ `ROLLED_BACK` bigint(8) NOT NULL
) ENGINE=MEMORY DEFAULT CHARSET=utf8
create table t (i int primary key) engine=rocksdb;
insert into t values (1), (2), (3);
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result
index daca7f7f78d..4f0d68845a3 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 95dae68b4e6..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: 198 "Unknown error 198")
+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: 198 "Unknown error 198")
-Warning 1296 Got error 198 '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: 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 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: 198 "Unknown error 198")
+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: 198 "Unknown error 198")
-Warning 1296 Got error 198 '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: 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 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 99f1178d897..cad6833e466 100644
--- a/storage/rocksdb/rdb_datadic.cc
+++ b/storage/rocksdb/rdb_datadic.cc
@@ -5261,6 +5261,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();
}
}
diff --git a/storage/spider/ha_spider.cc b/storage/spider/ha_spider.cc
index 988c2305b04..eb4052abdf5 100644
--- a/storage/spider/ha_spider.cc
+++ b/storage/spider/ha_spider.cc
@@ -1126,7 +1126,8 @@ THR_LOCK_DATA **ha_spider::store_lock(
if (
sql_command == SQLCOM_DROP_TABLE ||
sql_command == SQLCOM_ALTER_TABLE ||
- sql_command == SQLCOM_SHOW_CREATE
+ sql_command == SQLCOM_SHOW_CREATE ||
+ sql_command == SQLCOM_SHOW_FIELDS
) {
if (
lock_type == TL_READ_NO_INSERT &&
@@ -8797,7 +8798,8 @@ int ha_spider::info(
spider_param_table_init_error_interval())
{
pthread_mutex_unlock(&share->sts_mutex);
- if (sql_command == SQLCOM_SHOW_CREATE)
+ if (sql_command == SQLCOM_SHOW_CREATE ||
+ sql_command == SQLCOM_SHOW_FIELDS)
{
if (thd->is_error())
{
@@ -8871,7 +8873,8 @@ int ha_spider::info(
share->init_error = TRUE;
share->init = TRUE;
}
- if (sql_command == SQLCOM_SHOW_CREATE)
+ if (sql_command == SQLCOM_SHOW_CREATE ||
+ sql_command == SQLCOM_SHOW_FIELDS)
{
if (thd->is_error())
{
@@ -8934,7 +8937,8 @@ int ha_spider::info(
share->init_error = TRUE;
share->init = TRUE;
}
- if (sql_command == SQLCOM_SHOW_CREATE)
+ if (sql_command == SQLCOM_SHOW_CREATE ||
+ sql_command == SQLCOM_SHOW_FIELDS)
{
if (thd->is_error())
{
@@ -8963,7 +8967,8 @@ int ha_spider::info(
if ((error_num = spider_create_sts_thread(share)))
{
pthread_mutex_unlock(&share->sts_mutex);
- if (sql_command == SQLCOM_SHOW_CREATE)
+ if (sql_command == SQLCOM_SHOW_CREATE ||
+ sql_command == SQLCOM_SHOW_FIELDS)
{
if (thd->is_error())
{
@@ -8994,7 +8999,8 @@ int ha_spider::info(
{
if ((error_num = check_crd()))
{
- if (sql_command == SQLCOM_SHOW_CREATE)
+ if (sql_command == SQLCOM_SHOW_CREATE ||
+ sql_command == SQLCOM_SHOW_FIELDS)
{
if (thd->is_error())
{
diff --git a/storage/spider/mysql-test/spider/r/ha_part.result b/storage/spider/mysql-test/spider/r/ha_part.result
index 315f37298bc..d70d62404c0 100644
--- a/storage/spider/mysql-test/spider/r/ha_part.result
+++ b/storage/spider/mysql-test/spider/r/ha_part.result
@@ -248,6 +248,15 @@ a b date_format(c, '%Y-%m-%d %H:%i:%s')
8 g 2011-05-05 21:33:30
9 h 2011-05-05 22:32:10
DROP TABLE ta_l2;
+connection master_1;
+CREATE TABLE t (c INT) PARTITION BY LIST COLUMNS (c) (PARTITION p DEFAULT ENGINE=SPIDER);
+SHOW FIELDS FROM t;
+Field Type Null Key Default Extra
+c int(11) YES NULL
+SHOW FIELDS FROM t;
+Field Type Null Key Default Extra
+c int(11) YES NULL
+DROP TABLE t;
deinit
connection master_1;
diff --git a/storage/spider/mysql-test/spider/t/ha_part.test b/storage/spider/mysql-test/spider/t/ha_part.test
index 72ddcfd1f10..7e9d6f7715c 100644
--- a/storage/spider/mysql-test/spider/t/ha_part.test
+++ b/storage/spider/mysql-test/spider/t/ha_part.test
@@ -982,6 +982,13 @@ if ($HAVE_PARTITION)
}
}
+--connection master_1
+
+CREATE TABLE t (c INT) PARTITION BY LIST COLUMNS (c) (PARTITION p DEFAULT ENGINE=SPIDER);
+SHOW FIELDS FROM t;
+SHOW FIELDS FROM t;
+DROP TABLE t;
+
--echo
--echo deinit
--disable_warnings