Skip to content
Permalink
Browse files
MDEV-24713 Assertion `dict_table_is_comp(index->table)' failed in row…
…_merge_buf_add()

- During online alter conversion from compact to redundant,
virtual column field length already set during
innobase_get_computed_value(). Skip the char(n) check for
virtual column in row_merge_buf_add()
  • Loading branch information
Thirunarayanan committed Jun 15, 2021
1 parent 7229107 commit 7d591cf
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
@@ -286,3 +286,17 @@ Warning 1264 Out of range value for column 'va' at row 1
ALTER TABLE t1 FORCE;
ERROR 22003: Out of range value for column 'va' at row 1
DROP TABLE t1;
#
# MDEV-24713 Assertion `dict_table_is_comp(index->table)' failed
# in row_merge_buf_add()
#
CREATE TABLE t1 (id INT PRIMARY KEY, a CHAR(3),
b CHAR(8) AS (a) VIRTUAL, KEY(b))
ROW_FORMAT=REDUNDANT ENGINE=InnoDB
CHARACTER SET utf8;
INSERT INTO t1 (id,a) VALUES (1,'foo');
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
test.t1 optimize status OK
DROP TABLE t1;
@@ -302,3 +302,15 @@ INSERT IGNORE INTO t1 (id, a) VALUES (NULL, -1);
--error ER_WARN_DATA_OUT_OF_RANGE
ALTER TABLE t1 FORCE;
DROP TABLE t1;

--echo #
--echo # MDEV-24713 Assertion `dict_table_is_comp(index->table)' failed
--echo # in row_merge_buf_add()
--echo #
CREATE TABLE t1 (id INT PRIMARY KEY, a CHAR(3),
b CHAR(8) AS (a) VIRTUAL, KEY(b))
ROW_FORMAT=REDUNDANT ENGINE=InnoDB
CHARACTER SET utf8;
INSERT INTO t1 (id,a) VALUES (1,'foo');
OPTIMIZE TABLE t1;
DROP TABLE t1;
@@ -691,7 +691,10 @@ row_merge_buf_add(
continue;
}

if (field->len != UNIV_SQL_NULL
/* innobase_get_computed_value() sets the
length of the virtual column field. */
if (v_col == NULL
&& field->len != UNIV_SQL_NULL
&& col->mtype == DATA_MYSQL
&& col->len != field->len) {
if (conv_heap != NULL) {

0 comments on commit 7d591cf

Please sign in to comment.