mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Bug#22018745 CORRUPTION IN ONLINE TABLE REBUILD (ROW_FORMAT=REDUNDANT, INDEXED VIRTUAL COLUMN)
Apparently, WL#8149 QA did not cover the code changes made to online table rebuild (which was introduced in MySQL 5.6.8 by WL#6255) for ROW_FORMAT=REDUNDANT tables. row_log_table_low_redundant(): Log the new values of indexed virtual columns (ventry) only once. row_log_table_low(): Assert that if o_ventry is specified, the logged operation must not be ROW_T_INSERT, and ventry must be specified as well. row_log_table_low(): When computing the size of old_pk, pass v_entry=NULL to rec_get_converted_size_temp(), to be consistent with the subsequent call to rec_convert_dtuple_to_temp() for logging old_pk. Assert that old_pk never contains information on virtual columns, thus proving that this change is a no-op. RB: 13822 Reviewed-by: Jimmy Yang <jimmy.yang@oracle.com>
This commit is contained in:
committed by
Marko Mäkelä
parent
223eb5fb9a
commit
6f5f720848
@@ -223,5 +223,35 @@ vbcol
|
||||
11
|
||||
ac
|
||||
drop table ibstd_14;
|
||||
#
|
||||
# Bug#22018745 CORRUPTION IN ONLINE TABLE REBUILD
|
||||
# (ROW_FORMAT=REDUNDANT, INDEXED VIRTUAL COLUMN)
|
||||
#
|
||||
CREATE TABLE t (
|
||||
b char(5) PRIMARY KEY,
|
||||
v char(3) GENERATED ALWAYS AS (substr(b,1,3)) VIRTUAL, KEY(v)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT;
|
||||
connection con1;
|
||||
SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL prepared WAIT_FOR apply';
|
||||
OPTIMIZE TABLE t;
|
||||
connection default;
|
||||
SET DEBUG_SYNC='now WAIT_FOR prepared';
|
||||
INSERT INTO t SET b='fubar';
|
||||
BEGIN;
|
||||
DELETE FROM t;
|
||||
ROLLBACK;
|
||||
SET DEBUG_SYNC='now SIGNAL apply';
|
||||
connection con1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t optimize status OK
|
||||
connection default;
|
||||
CHECK TABLE t;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t check status OK
|
||||
SELECT * FROM t;
|
||||
b v
|
||||
fubar fub
|
||||
DROP TABLE t;
|
||||
disconnect con1;
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
|
||||
Reference in New Issue
Block a user