Clean up the logging of virtual column values in table-rebuilding online ALTER
In online table-rebuilding ALTER TABLE (LOCK=NONE), virtual column values are being written to the online_log. WL#8149 in MySQL 5.7 changed some low-level functions that are also being used outside row0log.cc, causing performance penalty to other code. We revert those changes, and introduce separate functions for writing the virtual column values. The only functional change should be the one that is mentioned in MDEV-13795: row_log_table_low_redundant() will no longer write virtual column values along with old_pk, just like row_log_table_low(). As noted in MDEV-13795, some forms of table-rebuilding ALTER with virtual columns is broken. At least DROP PRIMARY KEY, ADD PRIMARY KEY is broken. rec_get_converted_size_temp(), rec_convert_dtuple_to_temp(): Remove the parameter for passing virtual column values. rec_get_converted_size_temp_v(), rec_convert_dtuple_to_temp_v(): New functions for appending virtual column values to the online_log. rec_get_converted_size_comp_prefix_low(), rec_convert_dtuple_to_rec_comp(): Remove the v_entry parameter, and do not allow n_fields=0.
Showing
Please register or sign in to comment