summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2022-02-01 20:33:04 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2022-02-01 20:33:04 +0100
commitcf63eecef44f189ce2d221612dee9dfc1885ba4e (patch)
tree93b4e6645a1d371bd8012a0aa8e6e3a3d541b2a6 /storage
parentfb40a2fabf8d8cf765c83a0b8e609dd893c75ec3 (diff)
parentc04a203a10e282e1f33fd04d8a1b7ff0b076bce5 (diff)
downloadmariadb-git-cf63eecef44f189ce2d221612dee9dfc1885ba4e.tar.gz
Merge branch '10.4' into 10.5
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/federated/ha_federated.h15
-rw-r--r--storage/federatedx/ha_federatedx.h15
-rw-r--r--storage/innobase/CMakeLists.txt112
-rw-r--r--storage/innobase/buf/buf0flu.cc6
-rw-r--r--storage/innobase/dict/dict0mem.cc20
-rw-r--r--storage/innobase/fts/fts0fts.cc16
-rw-r--r--storage/innobase/gis/gis0rtree.cc9
-rw-r--r--storage/innobase/handler/ha_innodb.cc137
-rw-r--r--storage/innobase/handler/handler0alter.cc8
-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.h1
-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.h7
-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/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/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/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/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.h7
-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/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/rem/rem0cmp.cc306
-rw-r--r--storage/innobase/row/row0import.cc15
-rw-r--r--storage/innobase/srv/srv0srv.cc6
-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/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/bugfix/r/mdev_26583.result34
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_26583.cnf3
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_26583.test44
-rw-r--r--storage/spider/mysql-test/spider/r/ha_part.result9
-rw-r--r--storage/spider/mysql-test/spider/t/ha_part.test7
165 files changed, 1242 insertions, 777 deletions
diff --git a/storage/connect/bsonudf.cpp b/storage/connect/bsonudf.cpp
index be58437a766..12f19484458 100644
--- a/storage/connect/bsonudf.cpp
+++ b/storage/connect/bsonudf.cpp
@@ -202,7 +202,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 bd599b9abcc..ce04852324b 100644
--- a/storage/connect/ha_connect.cc
+++ b/storage/connect/ha_connect.cc
@@ -5720,10 +5720,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 8185be66687..04558469762 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 ca3728471b1..e0f30a159e9 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 0fe2881234d..48003dbf3fd 100644
--- a/storage/connect/odbconn.cpp
+++ b/storage/connect/odbconn.cpp
@@ -1419,7 +1419,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;
@@ -1486,15 +1486,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())
@@ -1516,18 +1517,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 871a54c8c94..23bac92efd8 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 212d27f06d1..4dc0f4e86d9 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 76a1f742b7f..4321a906cf0 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 b14b0b14231..fb5d1b35bc2 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 2d8df9a4053..0691d6380d8 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/federated/ha_federated.h b/storage/federated/ha_federated.h
index 2e785f87858..0c6285f3ac6 100644
--- a/storage/federated/ha_federated.h
+++ b/storage/federated/ha_federated.h
@@ -146,7 +146,7 @@ public:
HA_NO_PREFIX_CHAR_KEYS | HA_PRIMARY_KEY_REQUIRED_FOR_DELETE |
HA_NO_TRANSACTIONS /* until fixed by WL#2952 */ |
HA_PARTIAL_COLUMN_READ | HA_NULL_IN_KEY |
- HA_CAN_ONLINE_BACKUPS |
+ HA_CAN_ONLINE_BACKUPS | HA_NON_COMPARABLE_ROWID |
HA_CAN_REPAIR);
}
/*
@@ -238,6 +238,19 @@ public:
int rnd_next_int(uchar *buf);
int rnd_pos(uchar *buf, uchar *pos); //required
void position(const uchar *record); //required
+ /*
+ A ref is a pointer inside a local buffer. It is not comparable to
+ other ref's. This is never called as HA_NON_COMPARABLE_ROWID is set.
+ */
+ int cmp_ref(const uchar *ref1, const uchar *ref2)
+ {
+#ifdef NOT_YET
+ DBUG_ASSERT(0);
+ return 0;
+#else
+ return handler::cmp_ref(ref1,ref2); /* Works if table scan is used */
+#endif
+ }
int info(uint); //required
int extra(ha_extra_function operation);
diff --git a/storage/federatedx/ha_federatedx.h b/storage/federatedx/ha_federatedx.h
index 473d3ecd3e2..374a623a975 100644
--- a/storage/federatedx/ha_federatedx.h
+++ b/storage/federatedx/ha_federatedx.h
@@ -338,7 +338,7 @@ public:
| HA_REC_NOT_IN_SEQ | HA_AUTO_PART_KEY | HA_CAN_INDEX_BLOBS |
HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE | HA_CAN_REPAIR |
HA_PRIMARY_KEY_REQUIRED_FOR_DELETE | HA_CAN_ONLINE_BACKUPS |
- HA_PARTIAL_COLUMN_READ | HA_NULL_IN_KEY);
+ HA_PARTIAL_COLUMN_READ | HA_NULL_IN_KEY | HA_NON_COMPARABLE_ROWID);
}
/*
This is a bitmap of flags that says how the storage engine
@@ -428,6 +428,19 @@ public:
int rnd_next(uchar *buf); //required
int rnd_pos(uchar *buf, uchar *pos); //required
void position(const uchar *record); //required
+ /*
+ A ref is a pointer inside a local buffer. It is not comparable to
+ other ref's. This is never called as HA_NON_COMPARABLE_ROWID is set.
+ */
+ int cmp_ref(const uchar *ref1, const uchar *ref2)
+ {
+#ifdef NOT_YET
+ DBUG_ASSERT(0);
+ return 0;
+#else
+ return handler::cmp_ref(ref1,ref2); /* Works if table scan is used */
+#endif
+ }
int info(uint); //required
int extra(ha_extra_function operation);
diff --git a/storage/innobase/CMakeLists.txt b/storage/innobase/CMakeLists.txt
index 7a95b19678c..9daf7009ff3 100644
--- a/storage/innobase/CMakeLists.txt
+++ b/storage/innobase/CMakeLists.txt
@@ -77,61 +77,61 @@ SET(INNOBASE_SOURCES
handler/i_s.cc
ibuf/ibuf0ibuf.cc
include/btr0btr.h
- include/btr0btr.ic
+ include/btr0btr.inl
include/btr0bulk.h
include/btr0cur.h
- include/btr0cur.ic
+ include/btr0cur.inl
include/btr0defragment.h
include/btr0pcur.h
- include/btr0pcur.ic
+ include/btr0pcur.inl
include/btr0sea.h
- include/btr0sea.ic
+ include/btr0sea.inl
include/btr0types.h
include/buf0buddy.h
include/buf0buf.h
- include/buf0buf.ic
+ include/buf0buf.inl
include/buf0checksum.h
include/buf0dblwr.h
include/buf0dump.h
include/buf0flu.h
- include/buf0flu.ic
+ include/buf0flu.inl
include/buf0lru.h
include/buf0rea.h
include/buf0types.h
include/data0data.h
- include/data0data.ic
+ include/data0data.inl
include/data0type.h
- include/data0type.ic
+ include/data0type.inl
include/data0types.h
include/db0err.h
include/dict0boot.h
- include/dict0boot.ic
+ include/dict0boot.inl
include/dict0crea.h
- include/dict0crea.ic
+ include/dict0crea.inl
include/dict0defrag_bg.h
include/dict0dict.h
- include/dict0dict.ic
+ include/dict0dict.inl
include/dict0load.h
include/dict0mem.h
- include/dict0mem.ic
+ include/dict0mem.inl
include/dict0pagecompress.h
- include/dict0pagecompress.ic
+ include/dict0pagecompress.inl
include/dict0priv.h
- include/dict0priv.ic
+ include/dict0priv.inl
include/dict0stats.h
- include/dict0stats.ic
+ include/dict0stats.inl
include/dict0stats_bg.h
include/dict0types.h
include/dyn0buf.h
include/dyn0types.h
include/eval0eval.h
- include/eval0eval.ic
+ include/eval0eval.inl
include/eval0proc.h
- include/eval0proc.ic
+ include/eval0proc.inl
include/fil0crypt.h
- include/fil0crypt.ic
+ include/fil0crypt.inl
include/fil0fil.h
- include/fil0fil.ic
+ include/fil0fil.inl
include/fil0pagecompress.h
include/fsp0file.h
include/fsp0fsp.h
@@ -145,144 +145,144 @@ SET(INNOBASE_SOURCES
include/fts0pars.h
include/fts0plugin.h
include/fts0priv.h
- include/fts0priv.ic
+ include/fts0priv.inl
include/fts0tlex.h
include/fts0tokenize.h
include/fts0types.h
- include/fts0types.ic
+ include/fts0types.inl
include/fts0vlc.h
include/fut0fut.h
include/fut0lst.h
include/gis0geo.h
include/gis0rtree.h
- include/gis0rtree.ic
+ include/gis0rtree.inl
include/gis0type.h
include/ha_prototypes.h
include/ha0ha.h
- include/ha0ha.ic
+ include/ha0ha.inl
include/ha0storage.h
- include/ha0storage.ic
+ include/ha0storage.inl
include/handler0alter.h
include/hash0hash.h
include/ib0mutex.h
include/ibuf0ibuf.h
- include/ibuf0ibuf.ic
+ include/ibuf0ibuf.inl/
include/ibuf0types.h
include/lock0iter.h
include/lock0lock.h
- include/lock0lock.ic
+ include/lock0lock.inl
include/lock0prdt.h
include/lock0priv.h
- include/lock0priv.ic
+ include/lock0priv.inl
include/lock0types.h
include/log0crypt.h
include/log0log.h
- include/log0log.ic
+ include/log0log.inl
include/log0recv.h
include/log0types.h
include/mach0data.h
- include/mach0data.ic
+ include/mach0data.inl
include/mem0mem.h
- include/mem0mem.ic
+ include/mem0mem.inl
include/mtr0log.h
include/mtr0mtr.h
- include/mtr0mtr.ic
+ include/mtr0mtr.inl
include/mtr0types.h
include/os0event.h
include/os0file.h
- include/os0file.ic
+ include/os0file.inl
include/os0thread.h
include/page0cur.h
- include/page0cur.ic
+ include/page0cur.inl
include/page0page.h
- include/page0page.ic
+ include/page0page.inl
include/page0types.h
include/page0zip.h
- include/page0zip.ic
+ include/page0zip.inl
include/pars0grm.h
include/pars0opt.h
include/pars0pars.h
include/pars0sym.h
include/pars0types.h
include/que0que.h
- include/que0que.ic
+ include/que0que.inl
include/que0types.h
include/read0types.h
include/rem0cmp.h
- include/rem0cmp.ic
+ include/rem0cmp.inl
include/rem0rec.h
- include/rem0rec.ic
+ include/rem0rec.inl
include/rem0types.h
include/row0ext.h
- include/row0ext.ic
+ include/row0ext.inl
include/row0ftsort.h
include/row0import.h
include/row0ins.h
include/row0log.h
- include/row0log.ic
+ include/row0log.inl
include/row0merge.h
include/row0mysql.h
include/row0purge.h
include/row0quiesce.h
include/row0row.h
- include/row0row.ic
+ include/row0row.inl
include/row0sel.h
- include/row0sel.ic
+ include/row0sel.inl
include/row0types.h
include/row0uins.h
include/row0umod.h
include/row0undo.h
include/row0upd.h
- include/row0upd.ic
+ include/row0upd.inl
include/row0vers.h
include/srv0mon.h
- include/srv0mon.ic
+ include/srv0mon.inl
include/srv0srv.h
include/srv0start.h
include/sync0arr.h
- include/sync0arr.ic
+ include/sync0arr.inl
include/sync0debug.h
include/sync0policy.h
include/sync0rw.h
- include/sync0rw.ic
+ include/sync0rw.inl
include/sync0sync.h
include/sync0types.h
include/trx0i_s.h
include/trx0purge.h
include/trx0rec.h
- include/trx0rec.ic
+ include/trx0rec.inl
include/trx0roll.h
include/trx0rseg.h
- include/trx0rseg.ic
+ include/trx0rseg.inl
include/trx0sys.h
include/trx0trx.h
- include/trx0trx.ic
+ include/trx0trx.inl
include/trx0types.h
include/trx0undo.h
- include/trx0undo.ic
+ include/trx0undo.inl
include/trx0xa.h
include/univ.i
include/ut0byte.h
- include/ut0byte.ic
+ include/ut0byte.inl
include/ut0counter.h
include/ut0dbg.h
include/ut0list.h
- include/ut0list.ic
+ include/ut0list.inl
include/ut0lst.h
include/ut0mem.h
- include/ut0mem.ic
+ include/ut0mem.inl
include/ut0mutex.h
include/ut0new.h
include/ut0pool.h
include/ut0rbt.h
include/ut0rnd.h
- include/ut0rnd.ic
+ include/ut0rnd.inl
include/ut0sort.h
include/ut0stage.h
include/ut0ut.h
- include/ut0ut.ic
+ include/ut0ut.inl
include/ut0vec.h
- include/ut0vec.ic
+ include/ut0vec.inl
include/ut0wqueue.h
lock/lock0iter.cc
lock/lock0prdt.cc
diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc
index ce8f8dc34c4..60108af6cf6 100644
--- a/storage/innobase/buf/buf0flu.cc
+++ b/storage/innobase/buf/buf0flu.cc
@@ -87,12 +87,6 @@ static struct
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
-
/* @} */
#ifdef UNIV_DEBUG
diff --git a/storage/innobase/dict/dict0mem.cc b/storage/innobase/dict/dict0mem.cc
index 97889e22981..236370e93df 100644
--- a/storage/innobase/dict/dict0mem.cc
+++ b/storage/innobase/dict/dict0mem.cc
@@ -1210,8 +1210,9 @@ bool dict_foreign_t::affects_fulltext() const
return false;
}
-/** Reconstruct the clustered index fields. */
-inline void dict_index_t::reconstruct_fields()
+/** Reconstruct the clustered index fields.
+@return whether metadata is incorrect */
+inline bool dict_index_t::reconstruct_fields()
{
DBUG_ASSERT(is_primary());
@@ -1245,10 +1246,14 @@ inline void dict_index_t::reconstruct_fields()
fields + n_first, fields + n_fields,
[c](const dict_field_t& o)
{ return o.col->ind == c.ind(); });
+
+ if (old >= fields + n_fields
+ || old->prefix_len
+ || old->col != &table->cols[c.ind()]) {
+ return true;
+ }
+
ut_ad(old >= &fields[n_first]);
- ut_ad(old < &fields[n_fields]);
- DBUG_ASSERT(!old->prefix_len);
- DBUG_ASSERT(old->col == &table->cols[c.ind()]);
f = *old;
}
@@ -1261,6 +1266,8 @@ inline void dict_index_t::reconstruct_fields()
fields = tfields;
n_core_null_bytes = static_cast<byte>(UT_BITS_IN_BYTES(n_core_null));
+
+ return false;
}
/** Reconstruct dropped or reordered columns.
@@ -1325,8 +1332,7 @@ bool dict_table_t::deserialise_columns(const byte* metadata, ulint len)
}
DBUG_ASSERT(col == &dropped_cols[n_dropped_cols]);
- UT_LIST_GET_FIRST(indexes)->reconstruct_fields();
- return false;
+ return UT_LIST_GET_FIRST(indexes)->reconstruct_fields();
}
/** Check if record in clustered index is historical row.
diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc
index 0225099836c..d9cf788d196 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.
@@ -2819,7 +2817,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;
@@ -3385,9 +3383,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;
@@ -4623,7 +4619,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 22e6e08f139..66fa3670ebd 100644
--- a/storage/innobase/gis/gis0rtree.cc
+++ b/storage/innobase/gis/gis0rtree.cc
@@ -1171,15 +1171,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 646e2619348..b4a3b423df6 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
@@ -3200,6 +3200,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);
+
static const char* deprecated_innodb_checksum_algorithm
= "Setting innodb_checksum_algorithm to values other than"
" crc32, full_crc32, strict_crc32 or strict_full_crc32"
@@ -3511,12 +3564,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);
}
@@ -11026,9 +11082,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";
}
@@ -11300,7 +11359,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,
@@ -11760,8 +11820,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.
@@ -19196,31 +19257,6 @@ static MYSQL_SYSVAR_UINT(autoextend_increment,
"Data file autoextend increment in megabytes",
NULL, NULL, 64, 1, 1000, 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);
-
-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"
@@ -21114,8 +21150,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,
@@ -21563,3 +21610,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 ulong m = 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/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc
index 3779de1c7ed..a5ebd434187 100644
--- a/storage/innobase/handler/handler0alter.cc
+++ b/storage/innobase/handler/handler0alter.cc
@@ -8863,6 +8863,14 @@ func_exit:
row_mysql_unlock_data_dictionary(prebuilt->trx);
}
+
+ if (ctx->add_vcol) {
+ for (ulint i = 0; i < ctx->num_to_add_vcol; i++) {
+ ctx->add_vcol[i].~dict_v_col_t();
+ }
+ ctx->num_to_add_vcol = 0;
+ ctx->add_vcol = nullptr;
+ }
}
/* Reset dict_col_t::ord_part for those columns fail to be indexed,
diff --git a/storage/innobase/include/btr0btr.h b/storage/innobase/include/btr0btr.h
index 8b2859bd770..c0dcc6f39d3 100644
--- a/storage/innobase/include/btr0btr.h
+++ b/storage/innobase/include/btr0btr.h
@@ -751,7 +751,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 89826e8f214..89826e8f214 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 7136d726db0..3f9cad12004 100644
--- a/storage/innobase/include/btr0cur.h
+++ b/storage/innobase/include/btr0cur.h
@@ -1005,6 +1005,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 8a45b714936..8a45b714936 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 7facea7b80e..6d103843ef3 100644
--- a/storage/innobase/include/btr0pcur.h
+++ b/storage/innobase/include/btr0pcur.h
@@ -541,6 +541,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 1e6b667c324..db4c54008c2 100644
--- a/storage/innobase/include/btr0sea.h
+++ b/storage/innobase/include/btr0sea.h
@@ -387,6 +387,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 40eb5d86ead..40eb5d86ead 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 cba31074413..bb9994203d6 100644
--- a/storage/innobase/include/buf0buddy.h
+++ b/storage/innobase/include/buf0buddy.h
@@ -88,5 +88,4 @@ bool buf_buddy_realloc(void* buf, ulint size);
/** Combine all pairs of free buddies. */
void buf_buddy_condense_free();
-
#endif /* buf0buddy_h */
diff --git a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h
index e5e15730253..89987b05fdb 100644
--- a/storage/innobase/include/buf0buf.h
+++ b/storage/innobase/include/buf0buf.h
@@ -68,6 +68,12 @@ struct fil_addr_t;
#define BUF_EVICT_IF_IN_POOL 20 /*!< evict a clean block if found */
/* @} */
+/** 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
+
# ifdef UNIV_DEBUG
extern my_bool buf_disable_resize_buffer_pool_debug; /*!< if TRUE, resizing
buffer pool is not allowed. */
@@ -688,7 +694,6 @@ dberr_t buf_page_read_complete(buf_page_t *bpage, const fil_node_t &node);
if needed.
@param[in] size size in bytes
@return aligned size */
-UNIV_INLINE
ulint
buf_pool_size_align(
ulint size);
@@ -2421,7 +2426,7 @@ struct CheckUnzipLRUAndLRUList {
};
#endif /* UNIV_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 4d8cef4c4b2..364f04d3f69 100644
--- a/storage/innobase/include/buf0buf.ic
+++ b/storage/innobase/include/buf0buf.inl
@@ -401,22 +401,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 ulong m = 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 e1be95ebcd0..10ead048fa6 100644
--- a/storage/innobase/include/buf0flu.h
+++ b/storage/innobase/include/buf0flu.h
@@ -145,6 +145,6 @@ void buf_flush_sync_batch(lsn_t lsn);
NOTE: The calling thread is not allowed to hold any buffer page latches! */
void buf_flush_sync();
-#include "buf0flu.ic"
+#include "buf0flu.inl"
#endif
diff --git a/storage/innobase/include/buf0flu.ic b/storage/innobase/include/buf0flu.inl
index b8a9b6d1f5d..b8a9b6d1f5d 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 2d1bf5a2d50..2d1bf5a2d50 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 750c35341d6..9528443e7a8 100644
--- a/storage/innobase/include/data0type.h
+++ b/storage/innobase/include/data0type.h
@@ -601,6 +601,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 b81b68e69e9..b81b68e69e9 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 0f96df8fd9f..186fd30f89f 100644
--- a/storage/innobase/include/dict0boot.h
+++ b/storage/innobase/include/dict0boot.h
@@ -325,6 +325,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 d920bddecee..d920bddecee 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 13706d6bfad..50f7f34a8e8 100644
--- a/storage/innobase/include/dict0crea.h
+++ b/storage/innobase/include/dict0crea.h
@@ -319,6 +319,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 e17da733351..5682a10c889 100644
--- a/storage/innobase/include/dict0dict.h
+++ b/storage/innobase/include/dict0dict.h
@@ -1799,6 +1799,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 eda639ba7c1..eda639ba7c1 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 a039776dfbf..70b028d7c63 100644
--- a/storage/innobase/include/dict0mem.h
+++ b/storage/innobase/include/dict0mem.h
@@ -1321,8 +1321,9 @@ public:
ulint get_new_n_vcol() const
{ return new_vcol_info ? new_vcol_info->n_v_col : 0; }
- /** Reconstruct the clustered index fields. */
- inline void reconstruct_fields();
+ /** Reconstruct the clustered index fields.
+ @return whether metadata is incorrect */
+ inline bool reconstruct_fields();
/** Check if the index contains a column or a prefix of that column.
@param[in] n column number
@@ -2537,6 +2538,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 0a554a54dbd..0a554a54dbd 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 2fcadc055e1..2fcadc055e1 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 cf0e2adab76..34c1bef26c5 100644
--- a/storage/innobase/include/dict0stats.h
+++ b/storage/innobase/include/dict0stats.h
@@ -242,7 +242,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 4972efe8961..4972efe8961 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 0ea4057fdad..0ea4057fdad 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 45e88bb023c..62043003a6c 100644
--- a/storage/innobase/include/fil0crypt.h
+++ b/storage/innobase/include/fil0crypt.h
@@ -427,7 +427,7 @@ void
fil_crypt_total_stat(
fil_crypt_stat_t *stat);
-#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 ea4a0b93516..9d5bbcadc65 100644
--- a/storage/innobase/include/fil0fil.h
+++ b/storage/innobase/include/fil0fil.h
@@ -1801,7 +1801,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 fd5f5bc1db9..fd5f5bc1db9 100644
--- a/storage/innobase/include/fil0fil.ic
+++ b/storage/innobase/include/fil0fil.inl
diff --git a/storage/innobase/include/fts0priv.h b/storage/innobase/include/fts0priv.h
index 4261fc25773..660f7459249 100644
--- a/storage/innobase/include/fts0priv.h
+++ b/storage/innobase/include/fts0priv.h
@@ -497,6 +497,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 facc1e5c40b..facc1e5c40b 100644
--- a/storage/innobase/include/fts0types.ic
+++ b/storage/innobase/include/fts0types.inl
diff --git a/storage/innobase/include/gis0rtree.h b/storage/innobase/include/gis0rtree.h
index f7a2d6cd4cd..1a27422a0d8 100644
--- a/storage/innobase/include/gis0rtree.h
+++ b/storage/innobase/include/gis0rtree.h
@@ -490,5 +490,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 1b53caa306b..1b53caa306b 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 561c322521e..5aaa559b885 100644
--- a/storage/innobase/include/ha0ha.h
+++ b/storage/innobase/include/ha0ha.h
@@ -54,7 +54,7 @@ struct ha_node_t {
const rec_t* data; /*!< pointer to the data */
};
-#include "ha0ha.ic"
+#include "ha0ha.inl"
#endif /* BTR_CUR_HASH_ADAPT */
#endif
diff --git a/storage/innobase/include/ha0ha.ic b/storage/innobase/include/ha0ha.inl
index 0b256257214..0b256257214 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 df9679cf997..df9679cf997 100644
--- a/storage/innobase/include/ha0storage.ic
+++ b/storage/innobase/include/ha0storage.inl
diff --git a/storage/innobase/include/ibuf0ibuf.h b/storage/innobase/include/ibuf0ibuf.h
index cb418e57532..ff80db5f92a 100644
--- a/storage/innobase/include/ibuf0ibuf.h
+++ b/storage/innobase/include/ibuf0ibuf.h
@@ -406,6 +406,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 2c2620511c7..2c2620511c7 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 4f19575d3fe..fa36cf8eef1 100644
--- a/storage/innobase/include/lock0lock.h
+++ b/storage/innobase/include/lock0lock.h
@@ -997,6 +997,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 2d35796e3c4..2d35796e3c4 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 17200138ada..46b4597a0d8 100644
--- a/storage/innobase/include/lock0priv.h
+++ b/storage/innobase/include/lock0priv.h
@@ -659,6 +659,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 966c8a22028..966c8a22028 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 46cd6bbc4a2..b40237acea8 100644
--- a/storage/innobase/include/log0log.h
+++ b/storage/innobase/include/log0log.h
@@ -730,6 +730,6 @@ inline void log_t::file::set_lsn_offset(lsn_t a_lsn)
lsn_offset= a_lsn;
}
-#include "log0log.ic"
+#include "log0log.inl"
#endif
diff --git a/storage/innobase/include/log0log.ic b/storage/innobase/include/log0log.inl
index d503e3ffec9..d503e3ffec9 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 4f4c9a4b596..79cbd7d18a1 100644
--- a/storage/innobase/include/mach0data.h
+++ b/storage/innobase/include/mach0data.h
@@ -370,6 +370,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 bfccf611991..bfccf611991 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 b7fd9c098a6..959147a61fc 100644
--- a/storage/innobase/include/mem0mem.h
+++ b/storage/innobase/include/mem0mem.h
@@ -341,5 +341,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/mtr0mtr.h b/storage/innobase/include/mtr0mtr.h
index 263c9945e65..3e72bf9acd7 100644
--- a/storage/innobase/include/mtr0mtr.h
+++ b/storage/innobase/include/mtr0mtr.h
@@ -694,6 +694,6 @@ private:
range_set *m_freed_pages= nullptr;
};
-#include "mtr0mtr.ic"
+#include "mtr0mtr.inl"
#endif /* mtr0mtr_h */
diff --git a/storage/innobase/include/mtr0mtr.ic b/storage/innobase/include/mtr0mtr.inl
index 48bdb9bb6d1..48bdb9bb6d1 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 ba252433315..81a98ef7e01 100644
--- a/storage/innobase/include/os0file.h
+++ b/storage/innobase/include/os0file.h
@@ -1226,6 +1226,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 e88f94b8ff3..e88f94b8ff3 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 c0f3bf6866e..6ce31dea0c1 100644
--- a/storage/innobase/include/page0cur.h
+++ b/storage/innobase/include/page0cur.h
@@ -345,6 +345,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 828be6840d2..828be6840d2 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 abb395938fc..eb6bf56e8dd 100644
--- a/storage/innobase/include/page0page.h
+++ b/storage/innobase/include/page0page.h
@@ -1166,6 +1166,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 6514886dd67..6514886dd67 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 5a70e995a1e..5b98fdea004 100644
--- a/storage/innobase/include/page0zip.h
+++ b/storage/innobase/include/page0zip.h
@@ -386,7 +386,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 b0622ba79c3..b0622ba79c3 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 e77857f40c3..962bd359f0b 100644
--- a/storage/innobase/include/que0que.h
+++ b/storage/innobase/include/que0que.h
@@ -430,6 +430,6 @@ inline void que_thr_t::set_active(bool active) { graph->set_active(active); };
/* 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 8d770405fcc..6f2201971d1 100644
--- a/storage/innobase/include/rem0cmp.h
+++ b/storage/innobase/include/rem0cmp.h
@@ -258,6 +258,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 6e21382d187..6e21382d187 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 dbcff3e6fd6..c2ebad91ecd 100644
--- a/storage/innobase/include/rem0rec.h
+++ b/storage/innobase/include/rem0rec.h
@@ -1293,7 +1293,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 30c72a7415a..30c72a7415a 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 88fce314bc5..978a3f906c0 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 6010771291f..eb83a4bcad6 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 58c60a0a4da..9ee5d77f5e5 100644
--- a/storage/innobase/include/row0upd.h
+++ b/storage/innobase/include/row0upd.h
@@ -563,6 +563,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 13aacf3f003..13aacf3f003 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 cbda9d06338..0070537cc2a 100644
--- a/storage/innobase/include/srv0mon.h
+++ b/storage/innobase/include/srv0mon.h
@@ -887,6 +887,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 fe2c33e219f..889652039a9 100644
--- a/storage/innobase/include/srv0srv.h
+++ b/storage/innobase/include/srv0srv.h
@@ -303,11 +303,8 @@ 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 */
+/** Requested buffer pool chunk size. Each buffer pool instance consists
+of one or more chunks. */
extern ulong srv_buf_pool_chunk_unit;
/** Scan depth for LRU flush batch i.e.: number of blocks scanned*/
extern ulong srv_LRU_scan_depth;
diff --git a/storage/innobase/include/sync0arr.h b/storage/innobase/include/sync0arr.h
index f9f923f9939..60dabf419c0 100644
--- a/storage/innobase/include/sync0arr.h
+++ b/storage/innobase/include/sync0arr.h
@@ -124,6 +124,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 084acc51d1f..73ce55af1f2 100644
--- a/storage/innobase/include/sync0rw.h
+++ b/storage/innobase/include/sync0rw.h
@@ -833,6 +833,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 169cbdd9aa5..169cbdd9aa5 100644
--- a/storage/innobase/include/sync0rw.ic
+++ b/storage/innobase/include/sync0rw.inl
diff --git a/storage/innobase/include/trx0rec.h b/storage/innobase/include/trx0rec.h
index 9aeff6312f6..665c987adff 100644
--- a/storage/innobase/include/trx0rec.h
+++ b/storage/innobase/include/trx0rec.h
@@ -316,6 +316,6 @@ inline table_id_t trx_undo_rec_get_table_id(const trx_undo_rec_t *rec)
return mach_read_next_much_compressed(&rec);
}
-#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 2f78841e90d..d08ed709b14 100644
--- a/storage/innobase/include/trx0rseg.h
+++ b/storage/innobase/include/trx0rseg.h
@@ -274,6 +274,6 @@ up to which replication has proceeded.
void trx_rseg_update_binlog_offset(buf_block_t *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 b293d9f1ae1..b293d9f1ae1 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 00eb4c4c03a..5954c3141fa 100644
--- a/storage/innobase/include/trx0trx.h
+++ b/storage/innobase/include/trx0trx.h
@@ -1123,6 +1123,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 93c9591e0c2..93c9591e0c2 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 319ea4ee8d9..1ae23856087 100644
--- a/storage/innobase/include/trx0undo.h
+++ b/storage/innobase/include/trx0undo.h
@@ -459,7 +459,7 @@ which purge would not result in removing delete-marked records. */
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 43af932708e..43af932708e 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 11778813d14..cb18caa0f28 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 1a428d73d23..7ed64c61c4b 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 a4b5d4a7d8f..a4b5d4a7d8f 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 2fc864d49a2..a5ed72f9f02 100644
--- a/storage/innobase/include/ut0mem.h
+++ b/storage/innobase/include/ut0mem.h
@@ -71,6 +71,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 cc95a03642e..cc95a03642e 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 9f11944cd67..4ae4739ecfc 100644
--- a/storage/innobase/include/ut0ut.h
+++ b/storage/innobase/include/ut0ut.h
@@ -447,7 +447,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/rem/rem0cmp.cc b/storage/innobase/rem/rem0cmp.cc
index 70c0255d46a..6c42aaa0f38 100644
--- a/storage/innobase/rem/rem0cmp.cc
+++ b/storage/innobase/rem/rem0cmp.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1994, 2019, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2020, MariaDB Corporation.
+Copyright (c) 2020, 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
@@ -49,48 +49,25 @@ At the present, the comparison functions return 0 in the case,
where two records disagree only in the way that one
has more fields than the other. */
-/** Compare two data fields.
-@param[in] prtype precise type
-@param[in] a data field
-@param[in] a_length length of a, in bytes (not UNIV_SQL_NULL)
-@param[in] b data field
-@param[in] b_length length of b, in bytes (not UNIV_SQL_NULL)
-@return positive, 0, negative, if a is greater, equal, less than b,
-respectively */
-UNIV_INLINE
-int
-innobase_mysql_cmp(
- ulint prtype,
- const byte* a,
- ulint a_length,
- const byte* b,
- ulint b_length)
+#ifndef DBUG_OFF
+/** @return whether a data type is compatible with strnncoll() functions */
+static bool is_strnncoll_compatible(ulint type)
{
-#ifdef UNIV_DEBUG
- switch (prtype & DATA_MYSQL_TYPE_MASK) {
- case MYSQL_TYPE_BIT:
- case MYSQL_TYPE_STRING:
- case MYSQL_TYPE_VAR_STRING:
- case MYSQL_TYPE_TINY_BLOB:
- case MYSQL_TYPE_MEDIUM_BLOB:
- case MYSQL_TYPE_BLOB:
- case MYSQL_TYPE_LONG_BLOB:
- case MYSQL_TYPE_VARCHAR:
- break;
- default:
- ut_error;
- }
-#endif /* UNIV_DEBUG */
-
- uint cs_num = (uint) dtype_get_charset_coll(prtype);
-
- if (CHARSET_INFO* cs = get_charset(cs_num, MYF(MY_WME))) {
- return(cs->strnncollsp(a, a_length, b, b_length));
- }
-
- ib::fatal() << "Unable to find charset-collation " << cs_num;
- return(0);
+ switch (type) {
+ case MYSQL_TYPE_BIT:
+ case MYSQL_TYPE_STRING:
+ case MYSQL_TYPE_VAR_STRING:
+ case MYSQL_TYPE_TINY_BLOB:
+ case MYSQL_TYPE_MEDIUM_BLOB:
+ case MYSQL_TYPE_BLOB:
+ case MYSQL_TYPE_LONG_BLOB:
+ case MYSQL_TYPE_VARCHAR:
+ return true;
+ default:
+ return false;
+ }
}
+#endif /* DBUG_OFF */
/*************************************************************//**
Returns TRUE if two columns are equal for comparison purposes.
@@ -213,146 +190,123 @@ cmp_decimal(const byte* a, ulint a_length, const byte* b, ulint b_length)
}
/** Compare two data fields.
-@param[in] mtype main type
-@param[in] prtype precise type
-@param[in] data1 data field
-@param[in] len1 length of data1 in bytes, or UNIV_SQL_NULL
-@param[in] data2 data field
-@param[in] len2 length of data2 in bytes, or UNIV_SQL_NULL
+@param mtype main type
+@param prtype precise type
+@param data1 data field
+@param len1 length of data1 in bytes, or UNIV_SQL_NULL
+@param data2 data field
+@param len2 length of data2 in bytes, or UNIV_SQL_NULL
@return the comparison result of data1 and data2
@retval 0 if data1 is equal to data2
@retval negative if data1 is less than data2
@retval positive if data1 is greater than data2 */
-inline
-int
-cmp_data(
- ulint mtype,
- ulint prtype,
- const byte* data1,
- ulint len1,
- const byte* data2,
- ulint len2)
+static int cmp_data(ulint mtype, ulint prtype, const byte *data1, ulint len1,
+ const byte *data2, ulint len2)
{
- ut_ad(len1 != UNIV_SQL_DEFAULT);
- ut_ad(len2 != UNIV_SQL_DEFAULT);
-
- if (len1 == UNIV_SQL_NULL || len2 == UNIV_SQL_NULL) {
- if (len1 == len2) {
- return(0);
- }
-
- /* We define the SQL null to be the smallest possible
- value of a field. */
- return(len1 == UNIV_SQL_NULL ? -1 : 1);
- }
-
- ulint pad;
-
- switch (mtype) {
- default:
- ib::fatal() << "Unknown data type number " << mtype;
- case DATA_FIXBINARY:
- case DATA_BINARY:
- if (dtype_get_charset_coll(prtype)
- != DATA_MYSQL_BINARY_CHARSET_COLL) {
- pad = 0x20;
- break;
- }
- /* fall through */
- case DATA_INT:
- case DATA_SYS_CHILD:
- case DATA_SYS:
- pad = ULINT_UNDEFINED;
- break;
- case DATA_GEOMETRY:
- ut_ad(prtype & DATA_BINARY_TYPE);
- if (prtype & DATA_GIS_MBR) {
- ut_ad(len1 == DATA_MBR_LEN);
- ut_ad(len2 == DATA_MBR_LEN);
- return cmp_geometry_field(data1, data2);
- }
- pad = ULINT_UNDEFINED;
- break;
- case DATA_BLOB:
- if (prtype & DATA_BINARY_TYPE) {
- pad = ULINT_UNDEFINED;
- break;
- }
- if (prtype & DATA_BINARY_TYPE) {
- ib::error() << "Comparing a binary BLOB"
- " using a character set collation!";
- ut_ad(0);
- }
- /* fall through */
- case DATA_VARMYSQL:
- case DATA_MYSQL:
- return innobase_mysql_cmp(prtype, data1, len1, data2, len2);
- case DATA_VARCHAR:
- case DATA_CHAR:
- return my_charset_latin1.strnncollsp(data1, len1, data2, len2);
- case DATA_DECIMAL:
- return cmp_decimal(data1, len1, data2, len2);
- case DATA_DOUBLE:
- {
- double d_1 = mach_double_read(data1);
- double d_2 = mach_double_read(data2);
-
- if (d_1 > d_2) {
- return 1;
- } else if (d_2 > d_1) {
- return -1;
- }
- }
- return 0;
-
- case DATA_FLOAT:
- float f_1 = mach_float_read(data1);
- float f_2 = mach_float_read(data2);
-
- if (f_1 > f_2) {
- return 1;
- } else if (f_2 > f_1) {
- return -1;
- }
-
- return 0;
- }
-
- ulint len = std::min(len1, len2);
- int cmp = len ? memcmp(data1, data2, len) : 0;
-
- if (cmp) {
- return (cmp);
- }
-
- data1 += len;
- data2 += len;
- len1 -= len;
- len2 -= len;
-
- cmp = (int) (len1 - len2);
-
- if (!cmp || pad == ULINT_UNDEFINED) {
- return(cmp);
- }
-
- len = 0;
-
- if (len1) {
- do {
- cmp = static_cast<int>(
- mach_read_from_1(&data1[len++]) - pad);
- } while (cmp == 0 && len < len1);
- } else {
- ut_ad(len2 > 0);
-
- do {
- cmp = static_cast<int>(
- pad - mach_read_from_1(&data2[len++]));
- } while (cmp == 0 && len < len2);
- }
-
- return(cmp);
+ ut_ad(len1 != UNIV_SQL_DEFAULT);
+ ut_ad(len2 != UNIV_SQL_DEFAULT);
+
+ if (len1 == UNIV_SQL_NULL || len2 == UNIV_SQL_NULL)
+ {
+ if (len1 == len2)
+ return 0;
+
+ /* We define the SQL null to be the smallest possible value of a field. */
+ return len1 == UNIV_SQL_NULL ? -1 : 1;
+ }
+
+ switch (mtype) {
+ default:
+ ib::fatal() << "Unknown data type number " << mtype;
+ case DATA_DECIMAL:
+ return cmp_decimal(data1, len1, data2, len2);
+ case DATA_DOUBLE:
+ {
+ const double af= mach_double_read(data1), bf= mach_double_read(data2);
+ return af > bf ? 1 : bf > af ? -1 : 0;
+ }
+ case DATA_FLOAT:
+ {
+ const float af= mach_float_read(data1), bf= mach_float_read(data2);
+ return af > bf ? 1 : bf > af ? -1 : 0;
+ }
+ case DATA_FIXBINARY:
+ case DATA_BINARY:
+ if (dtype_get_charset_coll(prtype) != DATA_MYSQL_BINARY_CHARSET_COLL)
+ {
+ if (ulint len= std::min(len1, len2))
+ {
+ if (int cmp= memcmp(data1, data2, len))
+ return cmp;
+ data1+= len;
+ data2+= len;
+ len1-= len;
+ len2-= len;
+ }
+
+ int cmp= 0;
+ if (len1)
+ {
+ const byte *end= &data1[len1];
+ do
+ cmp= static_cast<int>(*data1++ - byte{0x20});
+ while (cmp == 0 && data1 < end);
+ }
+ else if (len2)
+ {
+ const byte *end= &data2[len2];
+ do
+ cmp= static_cast<int>(byte{0x20} - *data2++);
+ while (cmp == 0 && data2 < end);
+ }
+ return cmp;
+ }
+ /* fall through */
+ case DATA_INT:
+ case DATA_SYS_CHILD:
+ case DATA_SYS:
+ break;
+ case DATA_GEOMETRY:
+ ut_ad(prtype & DATA_BINARY_TYPE);
+ if (prtype & DATA_GIS_MBR)
+ {
+ ut_ad(len1 == DATA_MBR_LEN);
+ ut_ad(len2 == DATA_MBR_LEN);
+ return cmp_geometry_field(data1, data2);
+ }
+ break;
+ case DATA_BLOB:
+ if (prtype & DATA_BINARY_TYPE)
+ break;
+ /* fall through */
+ case DATA_VARMYSQL:
+ DBUG_ASSERT(is_strnncoll_compatible(prtype & DATA_MYSQL_TYPE_MASK));
+ if (CHARSET_INFO *cs= get_charset(dtype_get_charset_coll(prtype),
+ MYF(MY_WME)))
+ return cs->coll->strnncollsp(cs, data1, len1, data2, len2);
+ no_collation:
+ ib::fatal() << "Unable to find charset-collation for " << prtype;
+ case DATA_MYSQL:
+ DBUG_ASSERT(is_strnncoll_compatible(prtype & DATA_MYSQL_TYPE_MASK));
+ if (CHARSET_INFO *cs= get_charset(dtype_get_charset_coll(prtype),
+ MYF(MY_WME)))
+ return cs->coll->strnncollsp_nchars(cs, data1, len1, data2, len2,
+ std::max(len1, len2));
+ goto no_collation;
+ case DATA_VARCHAR:
+ case DATA_CHAR:
+ /* latin1_swedish_ci is treated as a special case in InnoDB.
+ Because it is a fixed-length encoding (mbminlen=mbmaxlen=1),
+ non-NULL CHAR(n) values will always occupy n bytes and we
+ can invoke strnncollsp() instead of strnncollsp_nchars(). */
+ return my_charset_latin1.strnncollsp(data1, len1, data2, len2);
+ }
+
+ if (ulint len= std::min(len1, len2))
+ if (int cmp= memcmp(data1, data2, len))
+ return cmp;
+
+ return len1 > len2 ? 1 : len2 > len1 ? -1 : 0;
}
/** Compare two data fields.
diff --git a/storage/innobase/row/row0import.cc b/storage/innobase/row/row0import.cc
index 3df29ac1830..15d3b69ccfd 100644
--- a/storage/innobase/row/row0import.cc
+++ b/storage/innobase/row/row0import.cc
@@ -1362,15 +1362,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
@@ -3274,7 +3266,10 @@ static dberr_t handle_instant_metadata(dict_table_t *table,
}
mem_heap_t *heap= NULL;
- SCOPE_EXIT([&heap]() { mem_heap_free(heap); });
+ SCOPE_EXIT([&heap]() {
+ if (heap)
+ mem_heap_free(heap);
+ });
while (btr_page_get_level(page.get()) != 0)
{
diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc
index c05562daca3..09cf547b831 100644
--- a/storage/innobase/srv/srv0srv.cc
+++ b/storage/innobase/srv/srv0srv.cc
@@ -200,10 +200,8 @@ 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 */
+/** Requested buffer pool chunk size. Each buffer pool instance consists
+of one or more chunks. */
ulong srv_buf_pool_chunk_unit;
/** innodb_lru_scan_depth; number of blocks scanned in LRU flush batch */
ulong srv_LRU_scan_depth;
diff --git a/storage/maria/ma_ft_boolean_search.c b/storage/maria/ma_ft_boolean_search.c
index 596c50ee497..91e39716a2b 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 c803016574f..3a7922515a7 100644
--- a/storage/rocksdb/CMakeLists.txt
+++ b/storage/rocksdb/CMakeLists.txt
@@ -129,7 +129,8 @@ SET(ROCKSDB_SE_SOURCES
# This is a strong requirement coming from RocksDB. No conditional checks here.
#ADD_DEFINITIONS(-DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX
#)
-if(CMAKE_SYSTEM_PROCESSOR STREQUAL "riscv64")
+
+if (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
SET(ATOMIC_EXTRA_LIBS -latomic)
else()
SET(ATOMIC_EXTRA_LIBS)
diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc
index 1f2913b1d67..79398a49648 100644
--- a/storage/rocksdb/ha_rocksdb.cc
+++ b/storage/rocksdb/ha_rocksdb.cc
@@ -637,6 +637,8 @@ static my_bool rocksdb_large_prefix = 0;
static my_bool rocksdb_allow_to_start_after_corruption = 0;
static char* rocksdb_git_hash;
+uint32_t rocksdb_ignore_datadic_errors = 0;
+
char *compression_types_val=
const_cast<char*>(get_rocksdb_supported_compression_types());
static unsigned long rocksdb_write_policy =
@@ -1907,6 +1909,15 @@ static MYSQL_SYSVAR_UINT(
nullptr, nullptr, 1 /* default value */, 0 /* min value */,
2 /* max value */, 0);
+static MYSQL_SYSVAR_UINT(
+ ignore_datadic_errors, rocksdb_ignore_datadic_errors,
+ PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
+ "Ignore MyRocks' data directory errors. "
+ "(CAUTION: Use only to start the server and perform repairs. Do NOT use "
+ "for regular operation)",
+ nullptr, nullptr, 0 /* default value */, 0 /* min value */,
+ 1 /* max value */, 0);
+
static MYSQL_SYSVAR_STR(datadir, rocksdb_datadir,
PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY,
"RocksDB data directory", nullptr, nullptr,
@@ -2142,6 +2153,8 @@ static struct st_mysql_sys_var *rocksdb_system_variables[] = {
MYSQL_SYSVAR(rollback_on_timeout),
MYSQL_SYSVAR(enable_insert_with_update_caching),
+
+ MYSQL_SYSVAR(ignore_datadic_errors),
nullptr};
static rocksdb::WriteOptions rdb_get_rocksdb_write_options(
@@ -5215,6 +5228,13 @@ static int rocksdb_init_func(void *const p) {
DBUG_RETURN(1);
}
+ if (rocksdb_ignore_datadic_errors)
+ {
+ sql_print_information(
+ "CAUTION: Running with rocksdb_ignore_datadic_errors=1. "
+ " This should only be used to perform repairs");
+ }
+
if (rdb_check_rocksdb_corruption()) {
// NO_LINT_DEBUG
sql_print_error(
@@ -5645,7 +5665,14 @@ static int rocksdb_init_func(void *const p) {
if (ddl_manager.init(&dict_manager, &cf_manager, rocksdb_validate_tables)) {
// NO_LINT_DEBUG
sql_print_error("RocksDB: Failed to initialize DDL manager.");
- DBUG_RETURN(HA_EXIT_FAILURE);
+
+ if (rocksdb_ignore_datadic_errors)
+ {
+ sql_print_error("RocksDB: rocksdb_ignore_datadic_errors=1, "
+ "trying to continue");
+ }
+ else
+ DBUG_RETURN(HA_EXIT_FAILURE);
}
Rdb_sst_info::init(rdb);
@@ -6718,6 +6745,26 @@ int ha_rocksdb::open(const char *const name, int mode, uint test_if_locked) {
"dictionary");
DBUG_RETURN(HA_ERR_ROCKSDB_INVALID_TABLE);
}
+ if (m_tbl_def->m_key_count != table->s->keys + has_hidden_pk(table)? 1:0)
+ {
+ sql_print_error("MyRocks: DDL mismatch: .frm file has %u indexes, "
+ "MyRocks has %u (%s hidden pk)",
+ table->s->keys, m_tbl_def->m_key_count,
+ has_hidden_pk(table)? "1" : "no");
+
+ if (rocksdb_ignore_datadic_errors)
+ {
+ sql_print_error("MyRocks: rocksdb_ignore_datadic_errors=1, "
+ "trying to continue");
+ }
+ else
+ {
+ my_error(ER_INTERNAL_ERROR, MYF(0),
+ "MyRocks: DDL mismatch. Check the error log for details");
+ DBUG_RETURN(HA_ERR_ROCKSDB_INVALID_TABLE);
+ }
+ }
+
m_lock_rows = RDB_LOCK_NONE;
m_key_descr_arr = m_tbl_def->m_key_descr_arr;
@@ -11613,6 +11660,12 @@ void Rdb_drop_index_thread::run() {
"from cf id %u. MyRocks data dictionary may "
"get corrupted.",
d.cf_id);
+ if (rocksdb_ignore_datadic_errors)
+ {
+ sql_print_error("RocksDB: rocksdb_ignore_datadic_errors=1, "
+ "trying to continue");
+ continue;
+ }
abort();
}
rocksdb::ColumnFamilyHandle *cfh = cf_manager.get_cf(d.cf_id);
diff --git a/storage/rocksdb/ha_rocksdb.h b/storage/rocksdb/ha_rocksdb.h
index d17b513ec01..00dd0ff4624 100644
--- a/storage/rocksdb/ha_rocksdb.h
+++ b/storage/rocksdb/ha_rocksdb.h
@@ -1061,6 +1061,8 @@ const int MYROCKS_MARIADB_PLUGIN_MATURITY_LEVEL= MariaDB_PLUGIN_MATURITY_STABLE;
extern bool prevent_myrocks_loading;
+extern uint32_t rocksdb_ignore_datadic_errors;
+
void sql_print_verbose_info(const char *format, ...);
} // namespace myrocks
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_not_null.result b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_not_null.result
index e5a8d2dd2d3..b3df869a0a7 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_not_null.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_not_null.result
@@ -157,13 +157,13 @@ Warning 1265 Data truncated for column 'v64' at row 1
Warning 1265 Data truncated for column 'v65000' at row 1
INSERT INTO t1 (v0,v1,v64,v65000) SELECT v65000, v65000, CONCAT('a',v65000), CONCAT(v65000,v1) FROM t1;
Warnings:
-Warning 1265 Data truncated for column 'v0' at row 5
-Warning 1265 Data truncated for column 'v1' at row 5
-Warning 1265 Data truncated for column 'v64' at row 5
-Warning 1265 Data truncated for column 'v0' at row 6
-Warning 1265 Data truncated for column 'v1' at row 6
-Warning 1265 Data truncated for column 'v64' at row 6
-Warning 1265 Data truncated for column 'v65000' at row 6
+Warning 1265 Data truncated for column 'v0' at row 2
+Warning 1265 Data truncated for column 'v1' at row 2
+Warning 1265 Data truncated for column 'v64' at row 2
+Warning 1265 Data truncated for column 'v0' at row 3
+Warning 1265 Data truncated for column 'v1' at row 3
+Warning 1265 Data truncated for column 'v64' at row 3
+Warning 1265 Data truncated for column 'v65000' at row 3
SELECT HEX(v0), HEX(v1), HEX(v64), LENGTH(HEX(v65000)) FROM t1;
HEX(v0) HEX(v1) HEX(v64) LENGTH(HEX(v65000))
0
@@ -675,15 +675,15 @@ Warning 1265 Data truncated for column 'c20' at row 1
Warning 1265 Data truncated for column 'c255' at row 1
INSERT INTO t1 (c,c0,c1,c20,c255) SELECT c255, c255, c255, c255, CONCAT('a',c255,c1) FROM t1;
Warnings:
-Warning 1265 Data truncated for column 'c' at row 5
-Warning 1265 Data truncated for column 'c0' at row 5
-Warning 1265 Data truncated for column 'c1' at row 5
-Warning 1265 Data truncated for column 'c20' at row 5
-Warning 1265 Data truncated for column 'c' at row 6
-Warning 1265 Data truncated for column 'c0' at row 6
-Warning 1265 Data truncated for column 'c1' at row 6
-Warning 1265 Data truncated for column 'c20' at row 6
-Warning 1265 Data truncated for column 'c255' at row 6
+Warning 1265 Data truncated for column 'c' at row 2
+Warning 1265 Data truncated for column 'c0' at row 2
+Warning 1265 Data truncated for column 'c1' at row 2
+Warning 1265 Data truncated for column 'c20' at row 2
+Warning 1265 Data truncated for column 'c' at row 3
+Warning 1265 Data truncated for column 'c0' at row 3
+Warning 1265 Data truncated for column 'c1' at row 3
+Warning 1265 Data truncated for column 'c20' at row 3
+Warning 1265 Data truncated for column 'c255' at row 3
SELECT c,c0,c1,c20,c255 FROM t1;
c c0 c1 c20 c255
@@ -845,13 +845,13 @@ Warning 1265 Data truncated for column 'v64' at row 1
Warning 1265 Data truncated for column 'v65000' at row 1
INSERT INTO t1 (v0,v1,v64,v65000) SELECT v65000, v65000, CONCAT('a',v65000), CONCAT(v65000,v1) FROM t1;
Warnings:
-Warning 1265 Data truncated for column 'v0' at row 5
-Warning 1265 Data truncated for column 'v1' at row 5
-Warning 1265 Data truncated for column 'v64' at row 5
-Warning 1265 Data truncated for column 'v65000' at row 5
-Warning 1265 Data truncated for column 'v0' at row 6
-Warning 1265 Data truncated for column 'v1' at row 6
-Warning 1265 Data truncated for column 'v64' at row 6
+Warning 1265 Data truncated for column 'v0' at row 2
+Warning 1265 Data truncated for column 'v1' at row 2
+Warning 1265 Data truncated for column 'v64' at row 2
+Warning 1265 Data truncated for column 'v65000' at row 2
+Warning 1265 Data truncated for column 'v0' at row 3
+Warning 1265 Data truncated for column 'v1' at row 3
+Warning 1265 Data truncated for column 'v64' at row 3
SELECT v0, v1, v64, LENGTH(v65000) FROM t1;
v0 v1 v64 LENGTH(v65000)
0
@@ -2038,70 +2038,70 @@ Warning 1264 Out of range value for column 'b1' at row 1
Warning 1264 Out of range value for column 'b20' at row 1
INSERT INTO t1 (i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20) SELECT b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b FROM t1 WHERE b IN (-9223372036854775808,9223372036854775807,18446744073709551615);
Warnings:
-Warning 1264 Out of range value for column 'i' at row 8
-Warning 1264 Out of range value for column 'i0' at row 8
-Warning 1264 Out of range value for column 'i1' at row 8
-Warning 1264 Out of range value for column 'i20' at row 8
-Warning 1264 Out of range value for column 't' at row 8
-Warning 1264 Out of range value for column 't0' at row 8
-Warning 1264 Out of range value for column 't1' at row 8
-Warning 1264 Out of range value for column 't20' at row 8
-Warning 1264 Out of range value for column 's' at row 8
-Warning 1264 Out of range value for column 's0' at row 8
-Warning 1264 Out of range value for column 's1' at row 8
-Warning 1264 Out of range value for column 's20' at row 8
-Warning 1264 Out of range value for column 'm' at row 8
-Warning 1264 Out of range value for column 'm0' at row 8
-Warning 1264 Out of range value for column 'm1' at row 8
-Warning 1264 Out of range value for column 'm20' at row 8
-Warning 1264 Out of range value for column 'i' at row 9
-Warning 1264 Out of range value for column 'i0' at row 9
-Warning 1264 Out of range value for column 'i1' at row 9
-Warning 1264 Out of range value for column 'i20' at row 9
-Warning 1264 Out of range value for column 't' at row 9
-Warning 1264 Out of range value for column 't0' at row 9
-Warning 1264 Out of range value for column 't1' at row 9
-Warning 1264 Out of range value for column 't20' at row 9
-Warning 1264 Out of range value for column 's' at row 9
-Warning 1264 Out of range value for column 's0' at row 9
-Warning 1264 Out of range value for column 's1' at row 9
-Warning 1264 Out of range value for column 's20' at row 9
-Warning 1264 Out of range value for column 'm' at row 9
-Warning 1264 Out of range value for column 'm0' at row 9
-Warning 1264 Out of range value for column 'm1' at row 9
-Warning 1264 Out of range value for column 'm20' at row 9
-Warning 1264 Out of range value for column 'i' at row 10
-Warning 1264 Out of range value for column 'i0' at row 10
-Warning 1264 Out of range value for column 'i1' at row 10
-Warning 1264 Out of range value for column 'i20' at row 10
-Warning 1264 Out of range value for column 't' at row 10
-Warning 1264 Out of range value for column 't0' at row 10
-Warning 1264 Out of range value for column 't1' at row 10
-Warning 1264 Out of range value for column 't20' at row 10
-Warning 1264 Out of range value for column 's' at row 10
-Warning 1264 Out of range value for column 's0' at row 10
-Warning 1264 Out of range value for column 's1' at row 10
-Warning 1264 Out of range value for column 's20' at row 10
-Warning 1264 Out of range value for column 'm' at row 10
-Warning 1264 Out of range value for column 'm0' at row 10
-Warning 1264 Out of range value for column 'm1' at row 10
-Warning 1264 Out of range value for column 'm20' at row 10
-Warning 1264 Out of range value for column 'i' at row 11
-Warning 1264 Out of range value for column 'i0' at row 11
-Warning 1264 Out of range value for column 'i1' at row 11
-Warning 1264 Out of range value for column 'i20' at row 11
-Warning 1264 Out of range value for column 't' at row 11
-Warning 1264 Out of range value for column 't0' at row 11
-Warning 1264 Out of range value for column 't1' at row 11
-Warning 1264 Out of range value for column 't20' at row 11
-Warning 1264 Out of range value for column 's' at row 11
-Warning 1264 Out of range value for column 's0' at row 11
-Warning 1264 Out of range value for column 's1' at row 11
-Warning 1264 Out of range value for column 's20' at row 11
-Warning 1264 Out of range value for column 'm' at row 11
-Warning 1264 Out of range value for column 'm0' at row 11
-Warning 1264 Out of range value for column 'm1' at row 11
-Warning 1264 Out of range value for column 'm20' at row 11
+Warning 1264 Out of range value for column 'i' at row 1
+Warning 1264 Out of range value for column 'i0' at row 1
+Warning 1264 Out of range value for column 'i1' at row 1
+Warning 1264 Out of range value for column 'i20' at row 1
+Warning 1264 Out of range value for column 't' at row 1
+Warning 1264 Out of range value for column 't0' at row 1
+Warning 1264 Out of range value for column 't1' at row 1
+Warning 1264 Out of range value for column 't20' at row 1
+Warning 1264 Out of range value for column 's' at row 1
+Warning 1264 Out of range value for column 's0' at row 1
+Warning 1264 Out of range value for column 's1' at row 1
+Warning 1264 Out of range value for column 's20' at row 1
+Warning 1264 Out of range value for column 'm' at row 1
+Warning 1264 Out of range value for column 'm0' at row 1
+Warning 1264 Out of range value for column 'm1' at row 1
+Warning 1264 Out of range value for column 'm20' at row 1
+Warning 1264 Out of range value for column 'i' at row 2
+Warning 1264 Out of range value for column 'i0' at row 2
+Warning 1264 Out of range value for column 'i1' at row 2
+Warning 1264 Out of range value for column 'i20' at row 2
+Warning 1264 Out of range value for column 't' at row 2
+Warning 1264 Out of range value for column 't0' at row 2
+Warning 1264 Out of range value for column 't1' at row 2
+Warning 1264 Out of range value for column 't20' at row 2
+Warning 1264 Out of range value for column 's' at row 2
+Warning 1264 Out of range value for column 's0' at row 2
+Warning 1264 Out of range value for column 's1' at row 2
+Warning 1264 Out of range value for column 's20' at row 2
+Warning 1264 Out of range value for column 'm' at row 2
+Warning 1264 Out of range value for column 'm0' at row 2
+Warning 1264 Out of range value for column 'm1' at row 2
+Warning 1264 Out of range value for column 'm20' at row 2
+Warning 1264 Out of range value for column 'i' at row 3
+Warning 1264 Out of range value for column 'i0' at row 3
+Warning 1264 Out of range value for column 'i1' at row 3
+Warning 1264 Out of range value for column 'i20' at row 3
+Warning 1264 Out of range value for column 't' at row 3
+Warning 1264 Out of range value for column 't0' at row 3
+Warning 1264 Out of range value for column 't1' at row 3
+Warning 1264 Out of range value for column 't20' at row 3
+Warning 1264 Out of range value for column 's' at row 3
+Warning 1264 Out of range value for column 's0' at row 3
+Warning 1264 Out of range value for column 's1' at row 3
+Warning 1264 Out of range value for column 's20' at row 3
+Warning 1264 Out of range value for column 'm' at row 3
+Warning 1264 Out of range value for column 'm0' at row 3
+Warning 1264 Out of range value for column 'm1' at row 3
+Warning 1264 Out of range value for column 'm20' at row 3
+Warning 1264 Out of range value for column 'i' at row 4
+Warning 1264 Out of range value for column 'i0' at row 4
+Warning 1264 Out of range value for column 'i1' at row 4
+Warning 1264 Out of range value for column 'i20' at row 4
+Warning 1264 Out of range value for column 't' at row 4
+Warning 1264 Out of range value for column 't0' at row 4
+Warning 1264 Out of range value for column 't1' at row 4
+Warning 1264 Out of range value for column 't20' at row 4
+Warning 1264 Out of range value for column 's' at row 4
+Warning 1264 Out of range value for column 's0' at row 4
+Warning 1264 Out of range value for column 's1' at row 4
+Warning 1264 Out of range value for column 's20' at row 4
+Warning 1264 Out of range value for column 'm' at row 4
+Warning 1264 Out of range value for column 'm0' at row 4
+Warning 1264 Out of range value for column 'm1' at row 4
+Warning 1264 Out of range value for column 'm20' at row 4
SELECT i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20 FROM t1;
i i0 i1 i20 t t0 t1 t20 s s0 s1 s20 m m0 m1 m20 b b0 b1 b20
-2147483648 -2147483648 -2147483648 -2147483648 -128 -128 -128 -128 -32768 -32768 -32768 -32768 -8388608 -8388608 -8388608 -8388608 -9223372036854775808 -9223372036854775808 -9223372036854775808 -9223372036854775808
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_null.result b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_null.result
index ac87cb02571..f0cd1a7e8b3 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_null.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_null.result
@@ -146,13 +146,13 @@ Warning 1265 Data truncated for column 'v64' at row 1
Warning 1265 Data truncated for column 'v65000' at row 1
INSERT INTO t1 (v0,v1,v64,v65000) SELECT v65000, v65000, CONCAT('a',v65000), CONCAT(v65000,v1) FROM t1;
Warnings:
-Warning 1265 Data truncated for column 'v0' at row 5
-Warning 1265 Data truncated for column 'v1' at row 5
-Warning 1265 Data truncated for column 'v64' at row 5
-Warning 1265 Data truncated for column 'v0' at row 6
-Warning 1265 Data truncated for column 'v1' at row 6
-Warning 1265 Data truncated for column 'v64' at row 6
-Warning 1265 Data truncated for column 'v65000' at row 6
+Warning 1265 Data truncated for column 'v0' at row 2
+Warning 1265 Data truncated for column 'v1' at row 2
+Warning 1265 Data truncated for column 'v64' at row 2
+Warning 1265 Data truncated for column 'v0' at row 3
+Warning 1265 Data truncated for column 'v1' at row 3
+Warning 1265 Data truncated for column 'v64' at row 3
+Warning 1265 Data truncated for column 'v65000' at row 3
SELECT HEX(v0), HEX(v1), HEX(v64), LENGTH(HEX(v65000)) FROM t1;
HEX(v0) HEX(v1) HEX(v64) LENGTH(HEX(v65000))
0
@@ -587,15 +587,15 @@ Warning 1265 Data truncated for column 'c20' at row 1
Warning 1265 Data truncated for column 'c255' at row 1
INSERT INTO t1 (c,c0,c1,c20,c255) SELECT c255, c255, c255, c255, CONCAT('a',c255,c1) FROM t1;
Warnings:
-Warning 1265 Data truncated for column 'c' at row 5
-Warning 1265 Data truncated for column 'c0' at row 5
-Warning 1265 Data truncated for column 'c1' at row 5
-Warning 1265 Data truncated for column 'c20' at row 5
-Warning 1265 Data truncated for column 'c' at row 6
-Warning 1265 Data truncated for column 'c0' at row 6
-Warning 1265 Data truncated for column 'c1' at row 6
-Warning 1265 Data truncated for column 'c20' at row 6
-Warning 1265 Data truncated for column 'c255' at row 6
+Warning 1265 Data truncated for column 'c' at row 2
+Warning 1265 Data truncated for column 'c0' at row 2
+Warning 1265 Data truncated for column 'c1' at row 2
+Warning 1265 Data truncated for column 'c20' at row 2
+Warning 1265 Data truncated for column 'c' at row 3
+Warning 1265 Data truncated for column 'c0' at row 3
+Warning 1265 Data truncated for column 'c1' at row 3
+Warning 1265 Data truncated for column 'c20' at row 3
+Warning 1265 Data truncated for column 'c255' at row 3
SELECT c,c0,c1,c20,c255 FROM t1;
c c0 c1 c20 c255
@@ -746,13 +746,13 @@ Warning 1265 Data truncated for column 'v64' at row 1
Warning 1265 Data truncated for column 'v65000' at row 1
INSERT INTO t1 (v0,v1,v64,v65000) SELECT v65000, v65000, CONCAT('a',v65000), CONCAT(v65000,v1) FROM t1;
Warnings:
-Warning 1265 Data truncated for column 'v0' at row 5
-Warning 1265 Data truncated for column 'v1' at row 5
-Warning 1265 Data truncated for column 'v64' at row 5
-Warning 1265 Data truncated for column 'v65000' at row 5
-Warning 1265 Data truncated for column 'v0' at row 6
-Warning 1265 Data truncated for column 'v1' at row 6
-Warning 1265 Data truncated for column 'v64' at row 6
+Warning 1265 Data truncated for column 'v0' at row 2
+Warning 1265 Data truncated for column 'v1' at row 2
+Warning 1265 Data truncated for column 'v64' at row 2
+Warning 1265 Data truncated for column 'v65000' at row 2
+Warning 1265 Data truncated for column 'v0' at row 3
+Warning 1265 Data truncated for column 'v1' at row 3
+Warning 1265 Data truncated for column 'v64' at row 3
SELECT v0, v1, v64, LENGTH(v65000) FROM t1;
v0 v1 v64 LENGTH(v65000)
0
@@ -1803,70 +1803,70 @@ Warning 1264 Out of range value for column 'b1' at row 1
Warning 1264 Out of range value for column 'b20' at row 1
INSERT INTO t1 (i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20) SELECT b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b FROM t1 WHERE b IN (-9223372036854775808,9223372036854775807,18446744073709551615);
Warnings:
-Warning 1264 Out of range value for column 'i' at row 8
-Warning 1264 Out of range value for column 'i0' at row 8
-Warning 1264 Out of range value for column 'i1' at row 8
-Warning 1264 Out of range value for column 'i20' at row 8
-Warning 1264 Out of range value for column 't' at row 8
-Warning 1264 Out of range value for column 't0' at row 8
-Warning 1264 Out of range value for column 't1' at row 8
-Warning 1264 Out of range value for column 't20' at row 8
-Warning 1264 Out of range value for column 's' at row 8
-Warning 1264 Out of range value for column 's0' at row 8
-Warning 1264 Out of range value for column 's1' at row 8
-Warning 1264 Out of range value for column 's20' at row 8
-Warning 1264 Out of range value for column 'm' at row 8
-Warning 1264 Out of range value for column 'm0' at row 8
-Warning 1264 Out of range value for column 'm1' at row 8
-Warning 1264 Out of range value for column 'm20' at row 8
-Warning 1264 Out of range value for column 'i' at row 9
-Warning 1264 Out of range value for column 'i0' at row 9
-Warning 1264 Out of range value for column 'i1' at row 9
-Warning 1264 Out of range value for column 'i20' at row 9
-Warning 1264 Out of range value for column 't' at row 9
-Warning 1264 Out of range value for column 't0' at row 9
-Warning 1264 Out of range value for column 't1' at row 9
-Warning 1264 Out of range value for column 't20' at row 9
-Warning 1264 Out of range value for column 's' at row 9
-Warning 1264 Out of range value for column 's0' at row 9
-Warning 1264 Out of range value for column 's1' at row 9
-Warning 1264 Out of range value for column 's20' at row 9
-Warning 1264 Out of range value for column 'm' at row 9
-Warning 1264 Out of range value for column 'm0' at row 9
-Warning 1264 Out of range value for column 'm1' at row 9
-Warning 1264 Out of range value for column 'm20' at row 9
-Warning 1264 Out of range value for column 'i' at row 10
-Warning 1264 Out of range value for column 'i0' at row 10
-Warning 1264 Out of range value for column 'i1' at row 10
-Warning 1264 Out of range value for column 'i20' at row 10
-Warning 1264 Out of range value for column 't' at row 10
-Warning 1264 Out of range value for column 't0' at row 10
-Warning 1264 Out of range value for column 't1' at row 10
-Warning 1264 Out of range value for column 't20' at row 10
-Warning 1264 Out of range value for column 's' at row 10
-Warning 1264 Out of range value for column 's0' at row 10
-Warning 1264 Out of range value for column 's1' at row 10
-Warning 1264 Out of range value for column 's20' at row 10
-Warning 1264 Out of range value for column 'm' at row 10
-Warning 1264 Out of range value for column 'm0' at row 10
-Warning 1264 Out of range value for column 'm1' at row 10
-Warning 1264 Out of range value for column 'm20' at row 10
-Warning 1264 Out of range value for column 'i' at row 11
-Warning 1264 Out of range value for column 'i0' at row 11
-Warning 1264 Out of range value for column 'i1' at row 11
-Warning 1264 Out of range value for column 'i20' at row 11
-Warning 1264 Out of range value for column 't' at row 11
-Warning 1264 Out of range value for column 't0' at row 11
-Warning 1264 Out of range value for column 't1' at row 11
-Warning 1264 Out of range value for column 't20' at row 11
-Warning 1264 Out of range value for column 's' at row 11
-Warning 1264 Out of range value for column 's0' at row 11
-Warning 1264 Out of range value for column 's1' at row 11
-Warning 1264 Out of range value for column 's20' at row 11
-Warning 1264 Out of range value for column 'm' at row 11
-Warning 1264 Out of range value for column 'm0' at row 11
-Warning 1264 Out of range value for column 'm1' at row 11
-Warning 1264 Out of range value for column 'm20' at row 11
+Warning 1264 Out of range value for column 'i' at row 1
+Warning 1264 Out of range value for column 'i0' at row 1
+Warning 1264 Out of range value for column 'i1' at row 1
+Warning 1264 Out of range value for column 'i20' at row 1
+Warning 1264 Out of range value for column 't' at row 1
+Warning 1264 Out of range value for column 't0' at row 1
+Warning 1264 Out of range value for column 't1' at row 1
+Warning 1264 Out of range value for column 't20' at row 1
+Warning 1264 Out of range value for column 's' at row 1
+Warning 1264 Out of range value for column 's0' at row 1
+Warning 1264 Out of range value for column 's1' at row 1
+Warning 1264 Out of range value for column 's20' at row 1
+Warning 1264 Out of range value for column 'm' at row 1
+Warning 1264 Out of range value for column 'm0' at row 1
+Warning 1264 Out of range value for column 'm1' at row 1
+Warning 1264 Out of range value for column 'm20' at row 1
+Warning 1264 Out of range value for column 'i' at row 2
+Warning 1264 Out of range value for column 'i0' at row 2
+Warning 1264 Out of range value for column 'i1' at row 2
+Warning 1264 Out of range value for column 'i20' at row 2
+Warning 1264 Out of range value for column 't' at row 2
+Warning 1264 Out of range value for column 't0' at row 2
+Warning 1264 Out of range value for column 't1' at row 2
+Warning 1264 Out of range value for column 't20' at row 2
+Warning 1264 Out of range value for column 's' at row 2
+Warning 1264 Out of range value for column 's0' at row 2
+Warning 1264 Out of range value for column 's1' at row 2
+Warning 1264 Out of range value for column 's20' at row 2
+Warning 1264 Out of range value for column 'm' at row 2
+Warning 1264 Out of range value for column 'm0' at row 2
+Warning 1264 Out of range value for column 'm1' at row 2
+Warning 1264 Out of range value for column 'm20' at row 2
+Warning 1264 Out of range value for column 'i' at row 3
+Warning 1264 Out of range value for column 'i0' at row 3
+Warning 1264 Out of range value for column 'i1' at row 3
+Warning 1264 Out of range value for column 'i20' at row 3
+Warning 1264 Out of range value for column 't' at row 3
+Warning 1264 Out of range value for column 't0' at row 3
+Warning 1264 Out of range value for column 't1' at row 3
+Warning 1264 Out of range value for column 't20' at row 3
+Warning 1264 Out of range value for column 's' at row 3
+Warning 1264 Out of range value for column 's0' at row 3
+Warning 1264 Out of range value for column 's1' at row 3
+Warning 1264 Out of range value for column 's20' at row 3
+Warning 1264 Out of range value for column 'm' at row 3
+Warning 1264 Out of range value for column 'm0' at row 3
+Warning 1264 Out of range value for column 'm1' at row 3
+Warning 1264 Out of range value for column 'm20' at row 3
+Warning 1264 Out of range value for column 'i' at row 4
+Warning 1264 Out of range value for column 'i0' at row 4
+Warning 1264 Out of range value for column 'i1' at row 4
+Warning 1264 Out of range value for column 'i20' at row 4
+Warning 1264 Out of range value for column 't' at row 4
+Warning 1264 Out of range value for column 't0' at row 4
+Warning 1264 Out of range value for column 't1' at row 4
+Warning 1264 Out of range value for column 't20' at row 4
+Warning 1264 Out of range value for column 's' at row 4
+Warning 1264 Out of range value for column 's0' at row 4
+Warning 1264 Out of range value for column 's1' at row 4
+Warning 1264 Out of range value for column 's20' at row 4
+Warning 1264 Out of range value for column 'm' at row 4
+Warning 1264 Out of range value for column 'm0' at row 4
+Warning 1264 Out of range value for column 'm1' at row 4
+Warning 1264 Out of range value for column 'm20' at row 4
SELECT i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20 FROM t1;
i i0 i1 i20 t t0 t1 t20 s s0 s1 s20 m m0 m1 m20 b b0 b1 b20
-2147483648 -2147483648 -2147483648 -2147483648 -128 -128 -128 -128 -32768 -32768 -32768 -32768 -8388608 -8388608 -8388608 -8388608 -9223372036854775808 -9223372036854775808 -9223372036854775808 -9223372036854775808
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_unsigned.result b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_unsigned.result
index 439f9be9a8a..13445fc9326 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_unsigned.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_unsigned.result
@@ -656,54 +656,54 @@ Warning 1264 Out of range value for column 'b1' at row 1
Warning 1264 Out of range value for column 'b20' at row 1
INSERT INTO t1 (i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20) SELECT b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b FROM t1 WHERE b IN (-9223372036854775808,9223372036854775807,18446744073709551615);
Warnings:
-Warning 1264 Out of range value for column 'i' at row 8
-Warning 1264 Out of range value for column 'i0' at row 8
-Warning 1264 Out of range value for column 'i1' at row 8
-Warning 1264 Out of range value for column 'i20' at row 8
-Warning 1264 Out of range value for column 't' at row 8
-Warning 1264 Out of range value for column 't0' at row 8
-Warning 1264 Out of range value for column 't1' at row 8
-Warning 1264 Out of range value for column 't20' at row 8
-Warning 1264 Out of range value for column 's' at row 8
-Warning 1264 Out of range value for column 's0' at row 8
-Warning 1264 Out of range value for column 's1' at row 8
-Warning 1264 Out of range value for column 's20' at row 8
-Warning 1264 Out of range value for column 'm' at row 8
-Warning 1264 Out of range value for column 'm0' at row 8
-Warning 1264 Out of range value for column 'm1' at row 8
-Warning 1264 Out of range value for column 'm20' at row 8
-Warning 1264 Out of range value for column 'i' at row 9
-Warning 1264 Out of range value for column 'i0' at row 9
-Warning 1264 Out of range value for column 'i1' at row 9
-Warning 1264 Out of range value for column 'i20' at row 9
-Warning 1264 Out of range value for column 't' at row 9
-Warning 1264 Out of range value for column 't0' at row 9
-Warning 1264 Out of range value for column 't1' at row 9
-Warning 1264 Out of range value for column 't20' at row 9
-Warning 1264 Out of range value for column 's' at row 9
-Warning 1264 Out of range value for column 's0' at row 9
-Warning 1264 Out of range value for column 's1' at row 9
-Warning 1264 Out of range value for column 's20' at row 9
-Warning 1264 Out of range value for column 'm' at row 9
-Warning 1264 Out of range value for column 'm0' at row 9
-Warning 1264 Out of range value for column 'm1' at row 9
-Warning 1264 Out of range value for column 'm20' at row 9
-Warning 1264 Out of range value for column 'i' at row 10
-Warning 1264 Out of range value for column 'i0' at row 10
-Warning 1264 Out of range value for column 'i1' at row 10
-Warning 1264 Out of range value for column 'i20' at row 10
-Warning 1264 Out of range value for column 't' at row 10
-Warning 1264 Out of range value for column 't0' at row 10
-Warning 1264 Out of range value for column 't1' at row 10
-Warning 1264 Out of range value for column 't20' at row 10
-Warning 1264 Out of range value for column 's' at row 10
-Warning 1264 Out of range value for column 's0' at row 10
-Warning 1264 Out of range value for column 's1' at row 10
-Warning 1264 Out of range value for column 's20' at row 10
-Warning 1264 Out of range value for column 'm' at row 10
-Warning 1264 Out of range value for column 'm0' at row 10
-Warning 1264 Out of range value for column 'm1' at row 10
-Warning 1264 Out of range value for column 'm20' at row 10
+Warning 1264 Out of range value for column 'i' at row 1
+Warning 1264 Out of range value for column 'i0' at row 1
+Warning 1264 Out of range value for column 'i1' at row 1
+Warning 1264 Out of range value for column 'i20' at row 1
+Warning 1264 Out of range value for column 't' at row 1
+Warning 1264 Out of range value for column 't0' at row 1
+Warning 1264 Out of range value for column 't1' at row 1
+Warning 1264 Out of range value for column 't20' at row 1
+Warning 1264 Out of range value for column 's' at row 1
+Warning 1264 Out of range value for column 's0' at row 1
+Warning 1264 Out of range value for column 's1' at row 1
+Warning 1264 Out of range value for column 's20' at row 1
+Warning 1264 Out of range value for column 'm' at row 1
+Warning 1264 Out of range value for column 'm0' at row 1
+Warning 1264 Out of range value for column 'm1' at row 1
+Warning 1264 Out of range value for column 'm20' at row 1
+Warning 1264 Out of range value for column 'i' at row 2
+Warning 1264 Out of range value for column 'i0' at row 2
+Warning 1264 Out of range value for column 'i1' at row 2
+Warning 1264 Out of range value for column 'i20' at row 2
+Warning 1264 Out of range value for column 't' at row 2
+Warning 1264 Out of range value for column 't0' at row 2
+Warning 1264 Out of range value for column 't1' at row 2
+Warning 1264 Out of range value for column 't20' at row 2
+Warning 1264 Out of range value for column 's' at row 2
+Warning 1264 Out of range value for column 's0' at row 2
+Warning 1264 Out of range value for column 's1' at row 2
+Warning 1264 Out of range value for column 's20' at row 2
+Warning 1264 Out of range value for column 'm' at row 2
+Warning 1264 Out of range value for column 'm0' at row 2
+Warning 1264 Out of range value for column 'm1' at row 2
+Warning 1264 Out of range value for column 'm20' at row 2
+Warning 1264 Out of range value for column 'i' at row 3
+Warning 1264 Out of range value for column 'i0' at row 3
+Warning 1264 Out of range value for column 'i1' at row 3
+Warning 1264 Out of range value for column 'i20' at row 3
+Warning 1264 Out of range value for column 't' at row 3
+Warning 1264 Out of range value for column 't0' at row 3
+Warning 1264 Out of range value for column 't1' at row 3
+Warning 1264 Out of range value for column 't20' at row 3
+Warning 1264 Out of range value for column 's' at row 3
+Warning 1264 Out of range value for column 's0' at row 3
+Warning 1264 Out of range value for column 's1' at row 3
+Warning 1264 Out of range value for column 's20' at row 3
+Warning 1264 Out of range value for column 'm' at row 3
+Warning 1264 Out of range value for column 'm0' at row 3
+Warning 1264 Out of range value for column 'm1' at row 3
+Warning 1264 Out of range value for column 'm20' at row 3
SELECT i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20 FROM t1;
i i0 i1 i20 t t0 t1 t20 s s0 s1 s20 m m0 m1 m20 b b0 b1 b20
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/corrupted_data_reads_debug.result b/storage/rocksdb/mysql-test/rocksdb/r/corrupted_data_reads_debug.result
index 01fa9dac7fd..88a62028be9 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/corrupted_data_reads_debug.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/corrupted_data_reads_debug.result
@@ -20,7 +20,7 @@ set @tmp1=@@rocksdb_verify_row_debug_checksums;
set rocksdb_verify_row_debug_checksums=1;
set session debug_dbug= "+d,myrocks_simulate_bad_row_read1";
select * from t1 where pk=1;
-ERROR HY000: Got error 203 'Found data corruption.' from ROCKSDB
+ERROR HY000: Got error 204 'Found data corruption.' from ROCKSDB
set session debug_dbug= "-d,myrocks_simulate_bad_row_read1";
set rocksdb_verify_row_debug_checksums=@tmp1;
select * from t1 where pk=1;
@@ -28,11 +28,11 @@ pk col1
1 1
set session debug_dbug= "+d,myrocks_simulate_bad_row_read2";
select * from t1 where pk=1;
-ERROR HY000: Got error 203 'Found data corruption.' from ROCKSDB
+ERROR HY000: Got error 204 'Found data corruption.' from ROCKSDB
set session debug_dbug= "-d,myrocks_simulate_bad_row_read2";
set session debug_dbug= "+d,myrocks_simulate_bad_row_read3";
select * from t1 where pk=1;
-ERROR HY000: Got error 203 'Found data corruption.' from ROCKSDB
+ERROR HY000: Got error 204 'Found data corruption.' from ROCKSDB
set session debug_dbug= "-d,myrocks_simulate_bad_row_read3";
insert into t1 values(4,'0123456789');
select * from t1;
@@ -56,7 +56,7 @@ pk col1
ABCD 1
set session debug_dbug= "+d,myrocks_simulate_bad_pk_read1";
select * from t2;
-ERROR HY000: Got error 203 'Found data corruption.' from ROCKSDB
+ERROR HY000: Got error 204 'Found data corruption.' from ROCKSDB
set session debug_dbug= "-d,myrocks_simulate_bad_pk_read1";
drop table t2;
create table t2 (
@@ -69,6 +69,6 @@ pk col1
ABCD 1
set session debug_dbug= "+d,myrocks_simulate_bad_pk_read1";
select * from t2;
-ERROR HY000: Got error 203 'Found data corruption.' from ROCKSDB
+ERROR HY000: Got error 204 'Found data corruption.' from ROCKSDB
set session debug_dbug= "-d,myrocks_simulate_bad_pk_read1";
drop table t2;
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result
index 95cbc3e7026..2dc3d02d4b1 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result
@@ -932,6 +932,7 @@ rocksdb_force_flush_memtable_now OFF
rocksdb_force_index_records_in_range 0
rocksdb_git_hash #
rocksdb_hash_index_allow_collision ON
+rocksdb_ignore_datadic_errors 0
rocksdb_ignore_unknown_options ON
rocksdb_index_type kBinarySearch
rocksdb_info_log_level error_level
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/tbl_opt_data_index_dir.result b/storage/rocksdb/mysql-test/rocksdb/r/tbl_opt_data_index_dir.result
index 90f163b7d4b..9691eeeffdf 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/tbl_opt_data_index_dir.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/tbl_opt_data_index_dir.result
@@ -1,16 +1,16 @@
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(8)) ENGINE=rocksdb DATA DIRECTORY = '/foo/bar/data';
-ERROR HY000: Can't create table `test`.`t1` (errno: 199 "Unknown error 199")
+ERROR HY000: Can't create table `test`.`t1` (errno: XXX "Unknown error XXX")
show warnings;
Level Code Message
-Error 1005 Can't create table `test`.`t1` (errno: 199 "Unknown error 199")
-Warning 1296 Got error 199 'Specifying DATA DIRECTORY for an individual table is not supported.' from ROCKSDB
+Error 1005 Can't create table `test`.`t1` (errno: XXX "Unknown error XXX")
+Warning 1296 Got error XXX 'Specifying DATA DIRECTORY for an individual table is not supported.' from ROCKSDB
CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(8)) ENGINE=rocksdb INDEX DIRECTORY = '/foo/bar/index';
-ERROR HY000: Can't create table `test`.`t1` (errno: 200 "Unknown error 200")
+ERROR HY000: Can't create table `test`.`t1` (errno: XXX "Unknown error XXX")
show warnings;
Level Code Message
-Error 1005 Can't create table `test`.`t1` (errno: 200 "Unknown error 200")
-Warning 1296 Got error 200 'Specifying INDEX DIRECTORY for an individual table is not supported.' from ROCKSDB
+Error 1005 Can't create table `test`.`t1` (errno: XXX "Unknown error XXX")
+Warning 1296 Got error XXX 'Specifying INDEX DIRECTORY for an individual table is not supported.' from ROCKSDB
CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY) ENGINE=rocksdb PARTITION BY RANGE (id)
(
PARTITION P0 VALUES LESS THAN (1000)
@@ -19,11 +19,11 @@ PARTITION P1 VALUES LESS THAN (2000)
DATA DIRECTORY = '/foo/bar/data/',
PARTITION P2 VALUES LESS THAN (MAXVALUE)
);
-ERROR HY000: Can't create table `test`.`t1` (errno: 199 "Unknown error 199")
+ERROR HY000: Can't create table `test`.`t1` (errno: XXX "Unknown error XXX")
show warnings;
Level Code Message
-Error 1005 Can't create table `test`.`t1` (errno: 199 "Unknown error 199")
-Warning 1296 Got error 199 'Specifying DATA DIRECTORY for an individual table is not supported.' from ROCKSDB
+Error 1005 Can't create table `test`.`t1` (errno: XXX "Unknown error XXX")
+Warning 1296 Got error XXX 'Specifying DATA DIRECTORY for an individual table is not supported.' from ROCKSDB
Error 6 Error on delete of './test/t1.par' (Errcode: 2 "No such file or directory")
CREATE TABLE t1 (id int not null primary key) ENGINE=rocksdb PARTITION BY RANGE (id)
(
@@ -33,9 +33,9 @@ PARTITION P1 VALUES LESS THAN (2000)
INDEX DIRECTORY = '/foo/bar/data/',
PARTITION P2 VALUES LESS THAN (MAXVALUE)
);
-ERROR HY000: Can't create table `test`.`t1` (errno: 200 "Unknown error 200")
+ERROR HY000: Can't create table `test`.`t1` (errno: XXX "Unknown error XXX")
show warnings;
Level Code Message
-Error 1005 Can't create table `test`.`t1` (errno: 200 "Unknown error 200")
-Warning 1296 Got error 200 'Specifying INDEX DIRECTORY for an individual table is not supported.' from ROCKSDB
+Error 1005 Can't create table `test`.`t1` (errno: XXX "Unknown error XXX")
+Warning 1296 Got error XXX 'Specifying INDEX DIRECTORY for an individual table is not supported.' from ROCKSDB
Error 6 Error on delete of './test/t1.par' (Errcode: 2 "No such file or directory")
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/type_char.result b/storage/rocksdb/mysql-test/rocksdb/r/type_char.result
index 1786dfae1e7..b35b5cb1832 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/type_char.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/type_char.result
@@ -29,15 +29,15 @@ Warning 1265 Data truncated for column 'c20' at row 1
Warning 1265 Data truncated for column 'c255' at row 1
INSERT INTO t1 (c,c0,c1,c20,c255) SELECT c255, c255, c255, c255, CONCAT('a',c255,c1) FROM t1;
Warnings:
-Warning 1265 Data truncated for column 'c' at row 5
-Warning 1265 Data truncated for column 'c0' at row 5
-Warning 1265 Data truncated for column 'c1' at row 5
-Warning 1265 Data truncated for column 'c20' at row 5
-Warning 1265 Data truncated for column 'c' at row 6
-Warning 1265 Data truncated for column 'c0' at row 6
-Warning 1265 Data truncated for column 'c1' at row 6
-Warning 1265 Data truncated for column 'c20' at row 6
-Warning 1265 Data truncated for column 'c255' at row 6
+Warning 1265 Data truncated for column 'c' at row 2
+Warning 1265 Data truncated for column 'c0' at row 2
+Warning 1265 Data truncated for column 'c1' at row 2
+Warning 1265 Data truncated for column 'c20' at row 2
+Warning 1265 Data truncated for column 'c' at row 3
+Warning 1265 Data truncated for column 'c0' at row 3
+Warning 1265 Data truncated for column 'c1' at row 3
+Warning 1265 Data truncated for column 'c20' at row 3
+Warning 1265 Data truncated for column 'c255' at row 3
SELECT c,c0,c1,c20,c255 FROM t1;
c c0 c1 c20 c255
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/type_int.result b/storage/rocksdb/mysql-test/rocksdb/r/type_int.result
index 306042912d0..b949a723f22 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/type_int.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/type_int.result
@@ -129,70 +129,70 @@ Warning 1264 Out of range value for column 'b1' at row 1
Warning 1264 Out of range value for column 'b20' at row 1
INSERT INTO t1 (i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20) SELECT b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b FROM t1 WHERE b IN (-9223372036854775808,9223372036854775807,18446744073709551615);
Warnings:
-Warning 1264 Out of range value for column 'i' at row 8
-Warning 1264 Out of range value for column 'i0' at row 8
-Warning 1264 Out of range value for column 'i1' at row 8
-Warning 1264 Out of range value for column 'i20' at row 8
-Warning 1264 Out of range value for column 't' at row 8
-Warning 1264 Out of range value for column 't0' at row 8
-Warning 1264 Out of range value for column 't1' at row 8
-Warning 1264 Out of range value for column 't20' at row 8
-Warning 1264 Out of range value for column 's' at row 8
-Warning 1264 Out of range value for column 's0' at row 8
-Warning 1264 Out of range value for column 's1' at row 8
-Warning 1264 Out of range value for column 's20' at row 8
-Warning 1264 Out of range value for column 'm' at row 8
-Warning 1264 Out of range value for column 'm0' at row 8
-Warning 1264 Out of range value for column 'm1' at row 8
-Warning 1264 Out of range value for column 'm20' at row 8
-Warning 1264 Out of range value for column 'i' at row 9
-Warning 1264 Out of range value for column 'i0' at row 9
-Warning 1264 Out of range value for column 'i1' at row 9
-Warning 1264 Out of range value for column 'i20' at row 9
-Warning 1264 Out of range value for column 't' at row 9
-Warning 1264 Out of range value for column 't0' at row 9
-Warning 1264 Out of range value for column 't1' at row 9
-Warning 1264 Out of range value for column 't20' at row 9
-Warning 1264 Out of range value for column 's' at row 9
-Warning 1264 Out of range value for column 's0' at row 9
-Warning 1264 Out of range value for column 's1' at row 9
-Warning 1264 Out of range value for column 's20' at row 9
-Warning 1264 Out of range value for column 'm' at row 9
-Warning 1264 Out of range value for column 'm0' at row 9
-Warning 1264 Out of range value for column 'm1' at row 9
-Warning 1264 Out of range value for column 'm20' at row 9
-Warning 1264 Out of range value for column 'i' at row 10
-Warning 1264 Out of range value for column 'i0' at row 10
-Warning 1264 Out of range value for column 'i1' at row 10
-Warning 1264 Out of range value for column 'i20' at row 10
-Warning 1264 Out of range value for column 't' at row 10
-Warning 1264 Out of range value for column 't0' at row 10
-Warning 1264 Out of range value for column 't1' at row 10
-Warning 1264 Out of range value for column 't20' at row 10
-Warning 1264 Out of range value for column 's' at row 10
-Warning 1264 Out of range value for column 's0' at row 10
-Warning 1264 Out of range value for column 's1' at row 10
-Warning 1264 Out of range value for column 's20' at row 10
-Warning 1264 Out of range value for column 'm' at row 10
-Warning 1264 Out of range value for column 'm0' at row 10
-Warning 1264 Out of range value for column 'm1' at row 10
-Warning 1264 Out of range value for column 'm20' at row 10
-Warning 1264 Out of range value for column 'i' at row 11
-Warning 1264 Out of range value for column 'i0' at row 11
-Warning 1264 Out of range value for column 'i1' at row 11
-Warning 1264 Out of range value for column 'i20' at row 11
-Warning 1264 Out of range value for column 't' at row 11
-Warning 1264 Out of range value for column 't0' at row 11
-Warning 1264 Out of range value for column 't1' at row 11
-Warning 1264 Out of range value for column 't20' at row 11
-Warning 1264 Out of range value for column 's' at row 11
-Warning 1264 Out of range value for column 's0' at row 11
-Warning 1264 Out of range value for column 's1' at row 11
-Warning 1264 Out of range value for column 's20' at row 11
-Warning 1264 Out of range value for column 'm' at row 11
-Warning 1264 Out of range value for column 'm0' at row 11
-Warning 1264 Out of range value for column 'm1' at row 11
-Warning 1264 Out of range value for column 'm20' at row 11
+Warning 1264 Out of range value for column 'i' at row 1
+Warning 1264 Out of range value for column 'i0' at row 1
+Warning 1264 Out of range value for column 'i1' at row 1
+Warning 1264 Out of range value for column 'i20' at row 1
+Warning 1264 Out of range value for column 't' at row 1
+Warning 1264 Out of range value for column 't0' at row 1
+Warning 1264 Out of range value for column 't1' at row 1
+Warning 1264 Out of range value for column 't20' at row 1
+Warning 1264 Out of range value for column 's' at row 1
+Warning 1264 Out of range value for column 's0' at row 1
+Warning 1264 Out of range value for column 's1' at row 1
+Warning 1264 Out of range value for column 's20' at row 1
+Warning 1264 Out of range value for column 'm' at row 1
+Warning 1264 Out of range value for column 'm0' at row 1
+Warning 1264 Out of range value for column 'm1' at row 1
+Warning 1264 Out of range value for column 'm20' at row 1
+Warning 1264 Out of range value for column 'i' at row 2
+Warning 1264 Out of range value for column 'i0' at row 2
+Warning 1264 Out of range value for column 'i1' at row 2
+Warning 1264 Out of range value for column 'i20' at row 2
+Warning 1264 Out of range value for column 't' at row 2
+Warning 1264 Out of range value for column 't0' at row 2
+Warning 1264 Out of range value for column 't1' at row 2
+Warning 1264 Out of range value for column 't20' at row 2
+Warning 1264 Out of range value for column 's' at row 2
+Warning 1264 Out of range value for column 's0' at row 2
+Warning 1264 Out of range value for column 's1' at row 2
+Warning 1264 Out of range value for column 's20' at row 2
+Warning 1264 Out of range value for column 'm' at row 2
+Warning 1264 Out of range value for column 'm0' at row 2
+Warning 1264 Out of range value for column 'm1' at row 2
+Warning 1264 Out of range value for column 'm20' at row 2
+Warning 1264 Out of range value for column 'i' at row 3
+Warning 1264 Out of range value for column 'i0' at row 3
+Warning 1264 Out of range value for column 'i1' at row 3
+Warning 1264 Out of range value for column 'i20' at row 3
+Warning 1264 Out of range value for column 't' at row 3
+Warning 1264 Out of range value for column 't0' at row 3
+Warning 1264 Out of range value for column 't1' at row 3
+Warning 1264 Out of range value for column 't20' at row 3
+Warning 1264 Out of range value for column 's' at row 3
+Warning 1264 Out of range value for column 's0' at row 3
+Warning 1264 Out of range value for column 's1' at row 3
+Warning 1264 Out of range value for column 's20' at row 3
+Warning 1264 Out of range value for column 'm' at row 3
+Warning 1264 Out of range value for column 'm0' at row 3
+Warning 1264 Out of range value for column 'm1' at row 3
+Warning 1264 Out of range value for column 'm20' at row 3
+Warning 1264 Out of range value for column 'i' at row 4
+Warning 1264 Out of range value for column 'i0' at row 4
+Warning 1264 Out of range value for column 'i1' at row 4
+Warning 1264 Out of range value for column 'i20' at row 4
+Warning 1264 Out of range value for column 't' at row 4
+Warning 1264 Out of range value for column 't0' at row 4
+Warning 1264 Out of range value for column 't1' at row 4
+Warning 1264 Out of range value for column 't20' at row 4
+Warning 1264 Out of range value for column 's' at row 4
+Warning 1264 Out of range value for column 's0' at row 4
+Warning 1264 Out of range value for column 's1' at row 4
+Warning 1264 Out of range value for column 's20' at row 4
+Warning 1264 Out of range value for column 'm' at row 4
+Warning 1264 Out of range value for column 'm0' at row 4
+Warning 1264 Out of range value for column 'm1' at row 4
+Warning 1264 Out of range value for column 'm20' at row 4
SELECT i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20 FROM t1;
i i0 i1 i20 t t0 t1 t20 s s0 s1 s20 m m0 m1 m20 b b0 b1 b20
-2147483648 -2147483648 -2147483648 -2147483648 -128 -128 -128 -128 -32768 -32768 -32768 -32768 -8388608 -8388608 -8388608 -8388608 -9223372036854775808 -9223372036854775808 -9223372036854775808 -9223372036854775808
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/type_varbinary.result b/storage/rocksdb/mysql-test/rocksdb/r/type_varbinary.result
index 6de8c0331cd..090a9dbb4e2 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/type_varbinary.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/type_varbinary.result
@@ -65,13 +65,13 @@ Warning 1265 Data truncated for column 'v64' at row 1
Warning 1265 Data truncated for column 'v65000' at row 1
INSERT INTO t1 (v0,v1,v64,v65000) SELECT v65000, v65000, CONCAT('a',v65000), CONCAT(v65000,v1) FROM t1;
Warnings:
-Warning 1265 Data truncated for column 'v0' at row 5
-Warning 1265 Data truncated for column 'v1' at row 5
-Warning 1265 Data truncated for column 'v64' at row 5
-Warning 1265 Data truncated for column 'v0' at row 6
-Warning 1265 Data truncated for column 'v1' at row 6
-Warning 1265 Data truncated for column 'v64' at row 6
-Warning 1265 Data truncated for column 'v65000' at row 6
+Warning 1265 Data truncated for column 'v0' at row 2
+Warning 1265 Data truncated for column 'v1' at row 2
+Warning 1265 Data truncated for column 'v64' at row 2
+Warning 1265 Data truncated for column 'v0' at row 3
+Warning 1265 Data truncated for column 'v1' at row 3
+Warning 1265 Data truncated for column 'v64' at row 3
+Warning 1265 Data truncated for column 'v65000' at row 3
SELECT HEX(v0), HEX(v1), HEX(v64), LENGTH(HEX(v65000)) FROM t1;
HEX(v0) HEX(v1) HEX(v64) LENGTH(HEX(v65000))
0
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result b/storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result
index 4c5ef47590a..745cfa5991e 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result
@@ -110,13 +110,13 @@ Warning 1265 Data truncated for column 'v64' at row 1
Warning 1265 Data truncated for column 'v65000' at row 1
INSERT INTO t1 (v0,v1,v64,v65000) SELECT v65000, v65000, CONCAT('a',v65000), CONCAT(v65000,v1) FROM t1;
Warnings:
-Warning 1265 Data truncated for column 'v0' at row 5
-Warning 1265 Data truncated for column 'v1' at row 5
-Warning 1265 Data truncated for column 'v64' at row 5
-Warning 1265 Data truncated for column 'v65000' at row 5
-Warning 1265 Data truncated for column 'v0' at row 6
-Warning 1265 Data truncated for column 'v1' at row 6
-Warning 1265 Data truncated for column 'v64' at row 6
+Warning 1265 Data truncated for column 'v0' at row 2
+Warning 1265 Data truncated for column 'v1' at row 2
+Warning 1265 Data truncated for column 'v64' at row 2
+Warning 1265 Data truncated for column 'v65000' at row 2
+Warning 1265 Data truncated for column 'v0' at row 3
+Warning 1265 Data truncated for column 'v1' at row 3
+Warning 1265 Data truncated for column 'v64' at row 3
SELECT v0, v1, v64, LENGTH(v65000) FROM t1;
v0 v1 v64 LENGTH(v65000)
0
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/tbl_opt_data_index_dir.test b/storage/rocksdb/mysql-test/rocksdb/t/tbl_opt_data_index_dir.test
index 6fcfd491af1..e2595b10fd7 100644
--- a/storage/rocksdb/mysql-test/rocksdb/t/tbl_opt_data_index_dir.test
+++ b/storage/rocksdb/mysql-test/rocksdb/t/tbl_opt_data_index_dir.test
@@ -17,23 +17,23 @@ DROP TABLE IF EXISTS t1;
# opposed to "Unknown error nn" on Linux/etc.
# Replacing 'error:' with 'error' below to make the output uniform.
---replace_result error: error
+--replace_regex /err(no:|or):? \d+/err\1 XXX/
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(8)) ENGINE=rocksdb DATA DIRECTORY = '/foo/bar/data';
---replace_result error: error
+--replace_regex /err(no:|or):? \d+/err\1 XXX/
show warnings;
---replace_result error: error
+--replace_regex /err(no:|or):? \d+/err\1 XXX/
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(8)) ENGINE=rocksdb INDEX DIRECTORY = '/foo/bar/index';
---replace_result error: error
+--replace_regex /err(no:|or):? \d+/err\1 XXX/
show warnings;
#
# Verify that we'll get the same error codes when using the partitions.
#
---replace_result error: error
+--replace_regex /err(no:|or):? \d+/err\1 XXX/
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY) ENGINE=rocksdb PARTITION BY RANGE (id)
(
@@ -43,10 +43,10 @@ CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY) ENGINE=rocksdb PARTITION BY RANGE
DATA DIRECTORY = '/foo/bar/data/',
PARTITION P2 VALUES LESS THAN (MAXVALUE)
);
---replace_result error: error
+--replace_regex /err(no:|or):? \d+/err\1 XXX/
show warnings;
---replace_result error: error
+--replace_regex /err(no:|or):? \d+/err\1 XXX/
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1 (id int not null primary key) ENGINE=rocksdb PARTITION BY RANGE (id)
(
@@ -56,5 +56,5 @@ CREATE TABLE t1 (id int not null primary key) ENGINE=rocksdb PARTITION BY RANGE
INDEX DIRECTORY = '/foo/bar/data/',
PARTITION P2 VALUES LESS THAN (MAXVALUE)
);
---replace_result error: error
+--replace_regex /err(no:|or):? \d+/err\1 XXX/
show warnings;
diff --git a/storage/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_ignore_datadic_errors_basic.result b/storage/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_ignore_datadic_errors_basic.result
new file mode 100644
index 00000000000..daa70a80683
--- /dev/null
+++ b/storage/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_ignore_datadic_errors_basic.result
@@ -0,0 +1,7 @@
+SET @start_global_value = @@global.ROCKSDB_IGNORE_DATADIC_ERRORS;
+SELECT @start_global_value;
+@start_global_value
+0
+"Trying to set variable @@global.ROCKSDB_IGNORE_DATADIC_ERRORS to 444. It should fail because it is readonly."
+SET @@global.ROCKSDB_IGNORE_DATADIC_ERRORS = 444;
+ERROR HY000: Variable 'rocksdb_ignore_datadic_errors' is a read only variable
diff --git a/storage/rocksdb/mysql-test/rocksdb_sys_vars/t/rocksdb_ignore_datadic_errors_basic.test b/storage/rocksdb/mysql-test/rocksdb_sys_vars/t/rocksdb_ignore_datadic_errors_basic.test
new file mode 100644
index 00000000000..b412a018869
--- /dev/null
+++ b/storage/rocksdb/mysql-test/rocksdb_sys_vars/t/rocksdb_ignore_datadic_errors_basic.test
@@ -0,0 +1,6 @@
+--source include/have_rocksdb.inc
+
+--let $sys_var=ROCKSDB_IGNORE_DATADIC_ERRORS
+--let $read_only=1
+--let $session=0
+--source include/rocksdb_sys_var.inc
diff --git a/storage/rocksdb/rdb_datadic.cc b/storage/rocksdb/rdb_datadic.cc
index 5f46fd8acad..2094923edf4 100644
--- a/storage/rocksdb/rdb_datadic.cc
+++ b/storage/rocksdb/rdb_datadic.cc
@@ -5265,6 +5265,12 @@ void Rdb_dict_manager::log_start_drop_index(GL_INDEX_ID gl_index_id,
"from index id (%u,%u). MyRocks data dictionary may "
"get corrupted.",
gl_index_id.cf_id, gl_index_id.index_id);
+ if (rocksdb_ignore_datadic_errors)
+ {
+ sql_print_error("RocksDB: rocksdb_ignore_datadic_errors=1, "
+ "trying to continue");
+ return;
+ }
abort();
}
}
diff --git a/storage/spider/ha_spider.cc b/storage/spider/ha_spider.cc
index d139b2ecea0..48bf8f4c664 100644
--- a/storage/spider/ha_spider.cc
+++ b/storage/spider/ha_spider.cc
@@ -1070,7 +1070,8 @@ THR_LOCK_DATA **ha_spider::store_lock(
if (
wide_handler->sql_command == SQLCOM_DROP_TABLE ||
wide_handler->sql_command == SQLCOM_ALTER_TABLE ||
- wide_handler->sql_command == SQLCOM_SHOW_CREATE
+ wide_handler->sql_command == SQLCOM_SHOW_CREATE ||
+ wide_handler->sql_command == SQLCOM_SHOW_FIELDS
) {
if (
lock_type == TL_READ_NO_INSERT &&
@@ -8521,7 +8522,8 @@ int ha_spider::info(
spider_param_table_init_error_interval())
{
pthread_mutex_unlock(&share->sts_mutex);
- if (wide_handler->sql_command == SQLCOM_SHOW_CREATE)
+ if (wide_handler->sql_command == SQLCOM_SHOW_CREATE ||
+ wide_handler->sql_command == SQLCOM_SHOW_FIELDS)
{
if (thd->is_error())
{
@@ -8594,7 +8596,8 @@ int ha_spider::info(
share->init_error = TRUE;
share->init = TRUE;
}
- if (wide_handler->sql_command == SQLCOM_SHOW_CREATE)
+ if (wide_handler->sql_command == SQLCOM_SHOW_CREATE ||
+ wide_handler->sql_command == SQLCOM_SHOW_FIELDS)
{
if (thd->is_error())
{
@@ -8658,7 +8661,8 @@ int ha_spider::info(
share->init_error = TRUE;
share->init = TRUE;
}
- if (wide_handler->sql_command == SQLCOM_SHOW_CREATE)
+ if (wide_handler->sql_command == SQLCOM_SHOW_CREATE ||
+ wide_handler->sql_command == SQLCOM_SHOW_FIELDS)
{
if (thd->is_error())
{
@@ -8687,7 +8691,8 @@ int ha_spider::info(
if ((error_num = spider_create_sts_thread(share)))
{
pthread_mutex_unlock(&share->sts_mutex);
- if (wide_handler->sql_command == SQLCOM_SHOW_CREATE)
+ if (wide_handler->sql_command == SQLCOM_SHOW_CREATE ||
+ wide_handler->sql_command == SQLCOM_SHOW_FIELDS)
{
if (thd->is_error())
{
@@ -8718,7 +8723,8 @@ int ha_spider::info(
{
if ((error_num = check_crd()))
{
- if (wide_handler->sql_command == SQLCOM_SHOW_CREATE)
+ if (wide_handler->sql_command == SQLCOM_SHOW_CREATE ||
+ wide_handler->sql_command == SQLCOM_SHOW_FIELDS)
{
if (thd->is_error())
{
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_26583.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_26583.result
new file mode 100644
index 00000000000..0ce268af7e3
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_26583.result
@@ -0,0 +1,34 @@
+#
+# MDEV-26583 SIGSEGV's in spider_get_select_limit_from_select_lex when DELAYED INSERT is used
+#
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection child2_1;
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+CREATE TABLE tbl_a (
+a INT AUTO_INCREMENT KEY,
+b INT,INDEX i (b)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+CREATE TABLE tbl_a (
+a INT AUTO_INCREMENT KEY,
+b INT,INDEX i (b)
+) ENGINE=Spider DEFAULT CHARSET=utf8 COMMENT='srv "s_2_1", table "tbl_a"';
+INSERT DELAYED INTO tbl_a VALUES (0,0),(0,0),(0,0);
+connection master_1;
+DROP DATABASE auto_test_local;
+connection child2_1;
+DROP DATABASE auto_test_remote;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_26583.cnf b/storage/spider/mysql-test/spider/bugfix/t/mdev_26583.cnf
new file mode 100644
index 00000000000..05dfd8a0bce
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_26583.cnf
@@ -0,0 +1,3 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
+!include ../my_2_1.cnf
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_26583.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_26583.test
new file mode 100644
index 00000000000..e4a2d64ba6d
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_26583.test
@@ -0,0 +1,44 @@
+--echo #
+--echo # MDEV-26583 SIGSEGV's in spider_get_select_limit_from_select_lex when DELAYED INSERT is used
+--echo #
+
+--disable_query_log
+--disable_result_log
+--source ../../t/test_init.inc
+--enable_result_log
+--enable_query_log
+
+--connection child2_1
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+eval CREATE TABLE tbl_a (
+ a INT AUTO_INCREMENT KEY,
+ b INT,INDEX i (b)
+) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
+
+--connection master_1
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+
+eval CREATE TABLE tbl_a (
+ a INT AUTO_INCREMENT KEY,
+ b INT,INDEX i (b)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET COMMENT='srv "s_2_1", table "tbl_a"';
+
+INSERT DELAYED INTO tbl_a VALUES (0,0),(0,0),(0,0);
+
+let $wait_condition=select count(*)=3 from tbl_a
+source include/wait_condition.inc;
+
+--connection master_1
+DROP DATABASE auto_test_local;
+
+--connection child2_1
+DROP DATABASE auto_test_remote;
+
+--disable_query_log
+--disable_result_log
+--source ../../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
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