Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.5, 10.6, 10.4(EOL)
Description
In rec_get_converted_size_comp_prefix_low(), InnoDB calculates extra bytes
for null bytes using index->n_core_null_bytes field. But in
rec_convert_dtuple_to_rec_comp(), InnoDB traverse to null bytes
using index->n_nullable field. In the given scenario, index->n_core_null_bytes
is 1 and index->n_nullable is 9 and it doesn't fit in single byte.
Moreover, n_core_null_bytes indicates the number of null bits in non-redundant
format when table is not instant. Problem exist from 10.3+. But
the given test case repeats from 10.4+
|
--source include/have_innodb.inc
|
CREATE TABLE IF NOT EXISTS t4 ( col1 INT, col2 INT, col_int INTEGER, col_string INTEGER, col_varchar VARCHAR(500), col_text TEXT ) ENGINE = InnoDB ROW_FORMAT = REDUNDANT;
|
ALTER TABLE t4 ADD PRIMARY KEY ( col_text(9), col_int );
|
ALTER TABLE t4 ADD COLUMN col_int_copy INTEGER;
|
ALTER TABLE t4 DROP PRIMARY KEY;
|
ALTER TABLE t4 ADD COLUMN col_text_copy TEXT;
|
ALTER TABLE t4 ADD PRIMARY KEY ( col_text(9), col_int );
|
ALTER TABLE t4 ADD COLUMN col_inTcol_int INTEGER;
|
ALTER TABLE t4 DROP PRIMARY KEY;
|
ALTER TABLE t4 ADD COLUMN col_texTcol_text TEXT;
|
ALTER TABLE t4 ADD PRIMARY KEY ( col_text(9), col_int );
|
ALTER TABLE t4 DROP PRIMARY KEY;
|
ALTER TABLE t4 MODIFY COLUMN col_text TEXT;
|
|
set DEBUG_SYNC="innodb_inplace_alter_table_enter SIGNAL alter_phase WAIT_FOR alter_finish";
|
--send ALTER TABLE t4 ADD PRIMARY KEY ( col_text(9), col_int )
|
connect(con1,localhost,root,,);
|
set DEBUG_SYNC="now WAIT_FOR alter_phase";
|
begin;
|
INSERT INTO t4 (col1,col2, col_int, col_string, col_text) VALUES ( 1, 1, 0, REPEAT(SUBSTR(CAST( 1 AS CHAR),1,1), 10), REPEAT(SUBSTR(CAST( 1 AS CHAR),1,1), 10000) );
|
rollback;
|
set DEBUG_SYNC="now SIGNAL alter_finish";
|
|
connection default;
|
reap;
|
disconnect con1;
|
select * from t4;
|
drop table t4;
|
set debug_sync=reset;
|
Run the above test case with --innodb_page_size=64K --innodb_buffer_pool_size=24M
Attachments
Issue Links
- causes
-
MDEV-26198 Assertion `0' failed in row_log_table_apply_op during redundant table rebuild
- Closed
- is caused by
-
MDEV-15563 Instant failure-free data type conversions
- Closed