mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
Merge branch '10.6' into 10.11
This commit is contained in:
commit
0707dac202
22 changed files with 204 additions and 46 deletions
|
|
@ -3448,6 +3448,10 @@ static buf_block_t *recv_recover_page(buf_block_t *block, mtr_t &mtr,
|
|||
block->page.id().page_no()));
|
||||
|
||||
log_phys_t::apply_status a= l->apply(*block, recs.last_offset);
|
||||
DBUG_EXECUTE_IF("recv_corrupt",
|
||||
if (init && init->created &&
|
||||
(!space || space->id != 0))
|
||||
a= log_phys_t::APPLIED_CORRUPTED;);
|
||||
|
||||
switch (a) {
|
||||
case log_phys_t::APPLIED_NO:
|
||||
|
|
@ -3519,17 +3523,9 @@ set_start_lsn:
|
|||
mtr.discard_modifications();
|
||||
mtr.commit();
|
||||
|
||||
fil_space_t* s = space
|
||||
? space
|
||||
: fil_space_t::get(block->page.id().space());
|
||||
|
||||
buf_pool.corrupted_evict(&block->page,
|
||||
block->page.state() &
|
||||
buf_page_t::LRU_MASK);
|
||||
if (!space) {
|
||||
s->release();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
@ -3926,7 +3922,6 @@ inline buf_block_t *recv_sys_t::recover_low(const map::iterator &p, mtr_t &mtr,
|
|||
DBUG_LOG("ib_log", "skip log for page " << p->first
|
||||
<< " LSN " << end_lsn << " < " << init.lsn);
|
||||
fil_space_t *space= fil_space_t::get(p->first.space());
|
||||
|
||||
mtr.start();
|
||||
mtr.set_log_mode(MTR_LOG_NO_REDO);
|
||||
|
||||
|
|
@ -3946,7 +3941,6 @@ inline buf_block_t *recv_sys_t::recover_low(const map::iterator &p, mtr_t &mtr,
|
|||
zip_size= fil_space_t::zip_size(flags);
|
||||
block= buf_page_create_deferred(p->first.space(), zip_size, &mtr, b);
|
||||
ut_ad(block == b);
|
||||
block->page.lock.x_lock_recursive();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -3965,6 +3959,8 @@ inline buf_block_t *recv_sys_t::recover_low(const map::iterator &p, mtr_t &mtr,
|
|||
}
|
||||
}
|
||||
|
||||
/* Released in buf_pool_t::corrupted_evict(), recover_deferred() or below */
|
||||
block->page.lock.x_lock_recursive();
|
||||
ut_d(mysql_mutex_lock(&mutex));
|
||||
ut_ad(&recs == &pages.find(p->first)->second);
|
||||
ut_d(mysql_mutex_unlock(&mutex));
|
||||
|
|
@ -3973,8 +3969,11 @@ inline buf_block_t *recv_sys_t::recover_low(const map::iterator &p, mtr_t &mtr,
|
|||
ut_ad(mtr.has_committed());
|
||||
|
||||
if (space)
|
||||
{
|
||||
space->release();
|
||||
|
||||
if (block)
|
||||
block->page.lock.x_unlock();
|
||||
}
|
||||
return block ? block : reinterpret_cast<buf_block_t*>(-1);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -199,6 +199,7 @@ err:
|
|||
/* don't touch anything more, in case we hit a bug */
|
||||
fprintf(stderr, "%s: FAILED\n", my_progname_short);
|
||||
free_tmpdir(&maria_chk_tmpdir);
|
||||
my_hash_free(&tables_to_redo);
|
||||
free_defaults(default_argv);
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -953,14 +953,13 @@ void copy_not_changed_fields(MARIA_HA *info, MY_BITMAP *changed_fields,
|
|||
uchar *to, uchar *from)
|
||||
{
|
||||
MARIA_COLUMNDEF *column, *end_column;
|
||||
uchar *bitmap= (uchar*) changed_fields->bitmap;
|
||||
MARIA_SHARE *share= info->s;
|
||||
uint bit= 1;
|
||||
uint bit= 0;
|
||||
|
||||
for (column= share->columndef, end_column= column+ share->base.fields;
|
||||
column < end_column; column++)
|
||||
column < end_column; column++, bit++)
|
||||
{
|
||||
if (!(*bitmap & bit))
|
||||
if (!bitmap_is_set(changed_fields, bit))
|
||||
{
|
||||
uint field_length= column->length;
|
||||
if (column->type == FIELD_VARCHAR)
|
||||
|
|
@ -972,11 +971,6 @@ void copy_not_changed_fields(MARIA_HA *info, MY_BITMAP *changed_fields,
|
|||
}
|
||||
memcpy(to + column->offset, from + column->offset, field_length);
|
||||
}
|
||||
if ((bit= (bit << 1)) == 256)
|
||||
{
|
||||
bitmap++;
|
||||
bit= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -739,8 +739,6 @@ get_one_option(const struct my_option *opt,
|
|||
break;
|
||||
case 'V':
|
||||
print_version();
|
||||
free_defaults(default_argv);
|
||||
my_end(MY_CHECK_ERROR);
|
||||
my_exit(0);
|
||||
case OPT_CORRECT_CHECKSUM:
|
||||
if (argument == disabled_my_option)
|
||||
|
|
|
|||
|
|
@ -6915,7 +6915,7 @@ int ha_spider::create(
|
|||
SPIDER_ALTER_PARTITION_COALESCE | SPIDER_ALTER_PARTITION_REORGANIZE |
|
||||
SPIDER_ALTER_PARTITION_TABLE_REORG | SPIDER_ALTER_PARTITION_REBUILD
|
||||
)
|
||||
) &&
|
||||
) && /* Does not support PART_CHANGED */
|
||||
memcmp(name + strlen(name) - 5, "#TMP#", 5)
|
||||
) {
|
||||
need_lock = TRUE;
|
||||
|
|
|
|||
|
|
@ -6750,7 +6750,8 @@ void spider_get_partition_info(
|
|||
DBUG_VOID_RETURN;
|
||||
}
|
||||
DBUG_PRINT("info",("spider tmp_name=%s", tmp_name));
|
||||
if (!memcmp(table_name, tmp_name, table_name_length + 1))
|
||||
if (table_name_length == strlen(tmp_name) &&
|
||||
!strncmp(table_name, tmp_name, table_name_length))
|
||||
DBUG_VOID_RETURN;
|
||||
if (
|
||||
tmp_flg &&
|
||||
|
|
@ -6771,7 +6772,8 @@ void spider_get_partition_info(
|
|||
DBUG_VOID_RETURN;
|
||||
}
|
||||
DBUG_PRINT("info",("spider tmp_name=%s", tmp_name));
|
||||
if (!memcmp(table_name, tmp_name, table_name_length + 1))
|
||||
if (table_name_length == strlen(tmp_name) &&
|
||||
!strncmp(table_name, tmp_name, table_name_length))
|
||||
DBUG_VOID_RETURN;
|
||||
if (
|
||||
tmp_flg &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue