diff options
author | Daniel Black <daniel@mariadb.org> | 2021-03-24 15:41:10 +1100 |
---|---|---|
committer | Daniel Black <daniel@mariadb.org> | 2021-04-08 16:51:36 +1000 |
commit | 058484687aa49326b8a7909499e7a8d1aba02953 (patch) | |
tree | 27d1dbef16c0043cfdf4051d6f4fa2ea1b925eed /sql/sql_select.cc | |
parent | cf552f5886968fc022122960d3a9274ce9f27819 (diff) | |
download | mariadb-git-058484687aa49326b8a7909499e7a8d1aba02953.tar.gz |
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.
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 2 |
1 files changed, 1 insertions, 1 deletions
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); |