1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge 10.3 into 10.4

This commit is contained in:
Marko Mäkelä
2020-05-30 11:04:27 +03:00
67 changed files with 1680 additions and 476 deletions

View File

@ -1029,10 +1029,16 @@ int SELECT_LEX::vers_setup_conds(THD *thd, TABLE_LIST *tables)
if (vers_conditions.is_set())
{
if (vers_conditions.was_set() &&
table->lock_type > TL_READ_NO_INSERT &&
!vers_conditions.delete_history)
{
my_error(ER_TABLE_NOT_LOCKED_FOR_WRITE, MYF(0), table->alias.str);
DBUG_RETURN(-1);
}
if (vers_conditions.type == SYSTEM_TIME_ALL)
continue;
lock_type= TL_READ; // ignore TL_WRITE, history is immutable anyway
}
bool timestamps_only= table->table->versioned(VERS_TIMESTAMP);