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.
This commit is contained in:
Marko Mäkelä 2017-09-24 10:11:16 +03:00
parent 7128fefa4c
commit 78b63425a3
2 changed files with 8 additions and 16 deletions

View File

@ -1819,16 +1819,12 @@ PageConverter::update_records(
m_rec_iter.open(block);
if (!page_is_leaf(block->frame)) {
return DB_SUCCESS;
}
while (!m_rec_iter.end()) {
rec_t* rec = m_rec_iter.current();
/* FIXME: Move out of the loop */
if (rec_get_status(rec) == REC_STATUS_NODE_PTR) {
break;
}
ibool deleted = rec_get_deleted_flag(rec, comp);
/* For the clustered index we have to adjust the BLOB

View File

@ -1819,16 +1819,12 @@ PageConverter::update_records(
m_rec_iter.open(block);
if (!page_is_leaf(block->frame)) {
return DB_SUCCESS;
}
while (!m_rec_iter.end()) {
rec_t* rec = m_rec_iter.current();
/* FIXME: Move out of the loop */
if (rec_get_status(rec) == REC_STATUS_NODE_PTR) {
break;
}
ibool deleted = rec_get_deleted_flag(rec, comp);
/* For the clustered index we have to adjust the BLOB