From 058484687aa49326b8a7909499e7a8d1aba02953 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Wed, 24 Mar 2021 15:41:10 +1100 Subject: Add TL_FIRST_WRITE in SQL layer for determining R/W Use < TL_FIRST_WRITE for determining a READ transaction. Use TL_FIRST_WRITE as the relative operator replacing TL_WRITE_ALLOW_WRITE as the minimium WRITE lock type. --- sql/sql_select.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_select.cc') diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 34d7958f20e..4509b0a05ef 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1049,7 +1049,7 @@ 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 && + table->lock_type >= TL_FIRST_WRITE && !vers_conditions.delete_history) { my_error(ER_TABLE_NOT_LOCKED_FOR_WRITE, MYF(0), table->alias.str); -- cgit v1.2.1