txn: support upgrade for share clause to for update #55022
Labels
sig/transaction
SIG:Transaction
type/feature-request
Categorizes issue or PR as related to a new feature.
Feature Request
Is your feature request related to a problem? Please describe:
TiDB does not support Shared Lock. If we enable the compatibility by tidb_enable_noop_functions, TiDB can ignore the shared lock.
To make the
for share
statements acquire pessimistic locks as needed, a new mechanism is needed.Describe the feature you'd like:
Introduce a new variable
tidb_enable_shared_lock_upgrade
to control whether thefor share
should acquire locks as thefor update
does.When it's enabled
Describe alternatives you've considered:
Implement the complete
for share
feature, it's quite complex and resource consuming.Teachability, Documentation, Adoption, Migration Strategy:
The text was updated successfully, but these errors were encountered: