txn: incompatbile lock behaviour for cop and point get for update read #54705
Labels
affects-6.5
affects-7.1
affects-7.5
affects-8.1
severity/moderate
sig/planner
SIG: Planner
sig/transaction
SIG:Transaction
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
When
select for update
is executed outside explicit transactions, there would beSelectLockExec
for coprocessor read queries but nolock
for point get queries, the behaviours are in-consistent.1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
Both select would not have lock operations.
3. What did you see instead (Required)
There is
SelectLockExec
onselect * from t for update;
While the point get query dose not have
lock
flagNote though the
SelectLockExec
is generated in the SQL plan, it would be skipped when buildingSelectLockExec
executor at https://github.com/pingcap/tidb/blob/master/pkg/executor/builder.go#L770.4. What is your TiDB version? (Required)
Nightly 26378cb
The text was updated successfully, but these errors were encountered: