mirror of
https://github.com/MariaDB/server.git
synced 2025-02-01 19:41:47 +01:00
branches/innodb+: ibuf_insert_to_index_page(): When the page is empty, look
at the first deleted record when checking the number of fields. This fixes part of Issue #82.
This commit is contained in:
parent
c25e0221bb
commit
c829e1c497
1 changed files with 14 additions and 0 deletions
|
@ -3330,6 +3330,20 @@ ibuf_insert_to_index_page(
|
|||
|
||||
rec = page_rec_get_next(page_get_infimum_rec(page));
|
||||
|
||||
if (page_rec_is_supremum(rec)) {
|
||||
/* Empty pages can result from buffered delete operations.
|
||||
The first record from the free list can be used to find the
|
||||
father node. */
|
||||
rec = page_header_get_ptr(page, PAGE_FREE);
|
||||
if (UNIV_UNLIKELY(rec == NULL)) {
|
||||
fputs("InnoDB: Trying to insert a record from"
|
||||
" the insert buffer to an index page\n"
|
||||
"InnoDB: but the index page is empty!\n",
|
||||
stderr);
|
||||
goto dump;
|
||||
}
|
||||
}
|
||||
|
||||
if (UNIV_UNLIKELY(rec_get_n_fields(rec, index)
|
||||
!= dtuple_get_n_fields(entry))) {
|
||||
fputs("InnoDB: Trying to insert a record from"
|
||||
|
|
Loading…
Add table
Reference in a new issue