Commit 78b63425 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-13899 IMPORT TABLESPACE may corrupt ROW_FORMAT=REDUNDANT tables

The ALTER TABLE…IMPORT TABLESPACE adjustment code that was introduced by
WL#5522 in MySQL 5.6 is incorrectly invoking rec_get_status() on a
ROW_FORMAT=REDUNDANT record to determine if a record is a leaf page record.
The function rec_get_status(rec) is only to be called on
ROW_FORMAT=COMPACT, DYNAMIC or COMPRESSED records.
parent 7128fefa
...@@ -1819,16 +1819,12 @@ PageConverter::update_records( ...@@ -1819,16 +1819,12 @@ PageConverter::update_records(
m_rec_iter.open(block); m_rec_iter.open(block);
while (!m_rec_iter.end()) { if (!page_is_leaf(block->frame)) {
return DB_SUCCESS;
rec_t* rec = m_rec_iter.current();
/* FIXME: Move out of the loop */
if (rec_get_status(rec) == REC_STATUS_NODE_PTR) {
break;
} }
while (!m_rec_iter.end()) {
rec_t* rec = m_rec_iter.current();
ibool deleted = rec_get_deleted_flag(rec, comp); ibool deleted = rec_get_deleted_flag(rec, comp);
/* For the clustered index we have to adjust the BLOB /* For the clustered index we have to adjust the BLOB
......
...@@ -1819,16 +1819,12 @@ PageConverter::update_records( ...@@ -1819,16 +1819,12 @@ PageConverter::update_records(
m_rec_iter.open(block); m_rec_iter.open(block);
while (!m_rec_iter.end()) { if (!page_is_leaf(block->frame)) {
return DB_SUCCESS;
rec_t* rec = m_rec_iter.current();
/* FIXME: Move out of the loop */
if (rec_get_status(rec) == REC_STATUS_NODE_PTR) {
break;
} }
while (!m_rec_iter.end()) {
rec_t* rec = m_rec_iter.current();
ibool deleted = rec_get_deleted_flag(rec, comp); ibool deleted = rec_get_deleted_flag(rec, comp);
/* For the clustered index we have to adjust the BLOB /* For the clustered index we have to adjust the BLOB
......
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