1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-20336 Assertion bitmap_is_set(read_partitions) upon SELECT FOR UPDATE from versioned table

Exclude SELECT and INSERT SELECT from vers_set_hist_part(). We cannot
likewise exclude REPLACE SELECT because it may REPLACE into itself
(and REPLACE generates history).

INSERT also does not generate history, but we have history
modification setting which might be interfered.
This commit is contained in:
Aleksey Midenkov
2019-08-14 15:52:08 +03:00
parent 39db116562
commit a20f6f9853
4 changed files with 28 additions and 3 deletions

View File

@ -816,7 +816,10 @@ int SELECT_LEX::vers_setup_conds(THD *thd, TABLE_LIST *tables)
else
vers_conditions.init(SYSTEM_TIME_ALL);
}
else if (!vers_conditions.is_set())
else if (!vers_conditions.is_set() &&
/* We cannot optimize REPLACE .. SELECT because it may need
to call vers_set_hist_part() to update history. */
thd->lex->sql_command != SQLCOM_REPLACE_SELECT)
{
table->partition_names= newx List<String>;
String *s= newx String(vers_info->now_part->partition_name,