Commit d77a1864 authored by Marko Mäkelä's avatar Marko Mäkelä

Fix test failures

btr_page_reorganize_low(), btr_page_empty(): Create the page in the
flexible format if needed.

page_copy_rec_list_end_no_locks(): Adjust for dual-format tables.
FIXME: It may still be necessary to support conversion. Perhaps
the caller should invoke btr_page_reorganize_low() to do that.
parent 903f6ee7
......@@ -22,4 +22,3 @@ innodb_bug12902967 : broken upstream
file_contents : MDEV-6526 these files are not installed anymore
max_statement_time : cannot possibly work, depends on timing
connect-abstract : waiting for libmariadb update
function_defaults_innodb : MDEV-17520 work in progress (crashing test)
......@@ -11,4 +11,3 @@
##############################################################################
create-index-debug : MDEV-13680 InnoDB may crash when btr_page_alloc() fails
instant_alter_null : MDEV-17520 work in progress (crashing test)
......@@ -37,10 +37,10 @@ TABLE_ID b 2 6 1027 4
TABLE_ID c 3 6 1027 4
select * from t;
id a b c
4 NULL NULL NULL
3 NULL NULL 3
2 NULL 2 2
1 1 1 1
2 NULL 2 2
3 NULL NULL 3
4 NULL NULL NULL
check table t;
Table Op Msg_type Msg_text
test.t check status OK
......
......@@ -1606,7 +1606,9 @@ btr_page_reorganize_low(
/* Recreate the page: note that global data on page (possible
segment headers, next page-field, etc.) is preserved intact */
page_create(block, mtr, dict_table_is_comp(index->table), is_spatial);
page_create(block, mtr, index->table->not_redundant()
&& (!page_is_leaf(page) || !index->dual_format()),
is_spatial);
/* Copy the records from the temporary space to the recreated page;
do not copy the lock bits yet */
......@@ -1920,9 +1922,11 @@ btr_page_empty(
: 0;
if (page_zip) {
ut_ad(!index->table->dual_format());
page_create_zip(block, index, level, autoinc, mtr);
} else {
page_create(block, mtr, page_is_comp(block->frame),
page_create(block, mtr, index->table->not_redundant()
&& (level || !index->dual_format()),
dict_index_is_spatial(index));
btr_page_set_level(page, NULL, level, mtr);
if (autoinc) {
......
......@@ -556,9 +556,7 @@ page_copy_rec_list_end_no_locks(
dict_index_t* index, /*!< in: record descriptor */
mtr_t* mtr) /*!< in: mtr */
{
page_t* new_page = buf_block_get_frame(new_block);
page_cur_t cur1;
rec_t* cur2;
mem_heap_t* heap = NULL;
ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_;
......@@ -573,13 +571,17 @@ page_copy_rec_list_end_no_locks(
btr_assert_not_corrupted(new_block, index);
// FIXME: If needed, copy and convert to REC_FMT_LEAF_FLEXIBLE
ut_a(page_is_comp(new_page) == page_rec_is_comp(rec));
ut_a(mach_read_from_2(new_page + srv_page_size - 10) == (ulint)
(page_is_comp(new_page) ? PAGE_NEW_INFIMUM : PAGE_OLD_INFIMUM));
ut_ad(page_is_comp(new_block->frame) == page_rec_is_comp(rec)
|| index->dual_format());
ut_ad(mach_read_from_2(new_block->frame + srv_page_size - 10) ==
(page_is_comp(new_block->frame)
? PAGE_NEW_INFIMUM : PAGE_OLD_INFIMUM));
const rec_fmt_t format = page_is_leaf(block->frame)
? REC_FMT_LEAF : REC_FMT_NODE_PTR;
? (page_is_comp(block->frame)
? REC_FMT_LEAF : REC_FMT_LEAF_FLEXIBLE)
: REC_FMT_NODE_PTR;
cur2 = page_get_infimum_rec(buf_block_get_frame(new_block));
rec_t* cur2 = page_get_infimum_rec(new_block->frame);
/* Copy records from the original page to the new page */
......
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