Commit b8088487 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-19216 Assertion ...SYS_FOREIGN failed in btr_node_ptr_max_size

btr_node_ptr_max_size(): Handle BINARY(0) and VARBINARY(0)
as special cases, similar to CHAR(0) and VARCHAR(0).
parent 0105220e
......@@ -174,3 +174,10 @@ DROP TABLE t1;
CREATE TABLE t1 (c VARCHAR(0), KEY(c)) ENGINE=InnoDB;
INSERT INTO t1 VALUES ('');
DROP TABLE t1;
#
# MDEV-19216 Assertion ...SYS_FOREIGN failed in btr_node_ptr_max_size
#
CREATE TABLE t1 (b BINARY(0), v VARBINARY(0), KEY(b), KEY(v)) ENGINE=InnoDB;
INSERT INTO t1 SET b='',v='';
DROP TABLE t1;
# End of 10.4 tests
......@@ -136,3 +136,13 @@ DROP TABLE t1;
CREATE TABLE t1 (c VARCHAR(0), KEY(c)) ENGINE=InnoDB;
INSERT INTO t1 VALUES ('');
DROP TABLE t1;
--echo #
--echo # MDEV-19216 Assertion ...SYS_FOREIGN failed in btr_node_ptr_max_size
--echo #
CREATE TABLE t1 (b BINARY(0), v VARBINARY(0), KEY(b), KEY(v)) ENGINE=InnoDB;
INSERT INTO t1 SET b='',v='';
DROP TABLE t1;
--echo # End of 10.4 tests
......@@ -1148,10 +1148,13 @@ static ulint btr_node_ptr_max_size(const dict_index_t* index)
break;
}
/* fall through */
case DATA_FIXBINARY:
case DATA_BINARY:
case DATA_VARMYSQL:
case DATA_CHAR:
case DATA_MYSQL:
/* CHAR(0) and VARCHAR(0) are possible
/* BINARY(0), VARBINARY(0),
CHAR(0) and VARCHAR(0) are possible
data type definitions in MariaDB.
The InnoDB internal SQL parser maps
CHAR to DATA_VARCHAR, so DATA_CHAR (or
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment