Skip to content

Commit f4519fb

Browse files
MDEV-28797 Assertion `page_rec_is_user_rec(rec)' failed in PageBulk::getSplitRec
- During alter operation of compressed table, page split operation chooses the first record of the page as split record and it leads to empty left page. This issue caused by the commit 77b3959 (MDEV-28457). page_rec_is_second(), page_rec_is_second_last(): Removed the functions since it is a deadcode.
1 parent db85d8b commit f4519fb

File tree

3 files changed

+1
-57
lines changed

3 files changed

+1
-57
lines changed

storage/innobase/btr/btr0bulk.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ PageBulk::getSplitRec()
634634
< total_used_size / 2);
635635

636636
/* Keep at least one record on left page */
637-
if (page_rec_is_second(rec, m_page)) {
637+
if (page_rec_is_first(rec, m_page)) {
638638
rec = page_rec_get_next(rec);
639639
ut_ad(page_rec_is_user_rec(rec));
640640
}

storage/innobase/include/page0page.h

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -794,17 +794,6 @@ page_rec_is_first(
794794
const page_t* page) /*!< in: page */
795795
MY_ATTRIBUTE((warn_unused_result));
796796

797-
/************************************************************//**
798-
true if the record is the second user record on a page.
799-
@return true if the second user record */
800-
UNIV_INLINE
801-
bool
802-
page_rec_is_second(
803-
/*===============*/
804-
const rec_t* rec, /*!< in: record */
805-
const page_t* page) /*!< in: page */
806-
MY_ATTRIBUTE((warn_unused_result));
807-
808797
/************************************************************//**
809798
true if the record is the last user record on a page.
810799
@return true if the last user record */
@@ -816,17 +805,6 @@ page_rec_is_last(
816805
const page_t* page) /*!< in: page */
817806
MY_ATTRIBUTE((warn_unused_result));
818807

819-
/************************************************************//**
820-
true if the record is the second last user record on a page.
821-
@return true if the second last user record */
822-
UNIV_INLINE
823-
bool
824-
page_rec_is_second_last(
825-
/*====================*/
826-
const rec_t* rec, /*!< in: record */
827-
const page_t* page) /*!< in: page */
828-
MY_ATTRIBUTE((warn_unused_result));
829-
830808
/************************************************************//**
831809
Returns the maximum combined size of records which can be inserted on top
832810
of record heap.

storage/innobase/include/page0page.inl

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -192,22 +192,6 @@ page_rec_is_first(
192192
return(page_rec_get_next_const(page_get_infimum_rec(page)) == rec);
193193
}
194194

195-
/************************************************************//**
196-
true if the record is the second user record on a page.
197-
@return true if the second user record */
198-
UNIV_INLINE
199-
bool
200-
page_rec_is_second(
201-
/*===============*/
202-
const rec_t* rec, /*!< in: record */
203-
const page_t* page) /*!< in: page */
204-
{
205-
ut_ad(page_get_n_recs(page) > 1);
206-
if (const rec_t *first= page_rec_get_next_const(page_get_infimum_rec(page)))
207-
return page_rec_get_next_const(first) == rec;
208-
return false;
209-
}
210-
211195
/************************************************************//**
212196
true if the record is the last user record on a page.
213197
@return true if the last user record */
@@ -223,24 +207,6 @@ page_rec_is_last(
223207
return(page_rec_get_next_const(rec) == page_get_supremum_rec(page));
224208
}
225209

226-
/************************************************************//**
227-
true if the record is the second last user record on a page.
228-
@return true if the second last user record */
229-
UNIV_INLINE
230-
bool
231-
page_rec_is_second_last(
232-
/*====================*/
233-
const rec_t* rec, /*!< in: record */
234-
const page_t* page) /*!< in: page */
235-
{
236-
ut_ad(page_get_n_recs(page) > 1);
237-
ut_ad(!page_rec_is_last(rec, page));
238-
239-
if (const rec_t *next= page_rec_get_next_const(rec))
240-
return page_rec_is_supremum(page_rec_get_next_const(next));
241-
return false;
242-
}
243-
244210
/************************************************************//**
245211
Returns the middle record of the records on the page. If there is an
246212
even number of records in the list, returns the first record of the

0 commit comments

Comments
 (0)