Skip to content

Bug caused by delete operations within a transaction #56111

@Cynthia-Lee97

Description

@Cynthia-Lee97

Describe the problem
I start two transactions.
One of the transaction SELECT operations can get the data, but the DELETE row returns DELETE 0

To Reproduce
What did you do? Describe in your own words.

  1. Set up CockroachDB node

image
3.The reading and writing data of T2 are inconsistent

Expected behavior
An error should be reported while performing the DELETE operation.

Additional data / screenshots
create table t(a int primary key); insert into t values(1),(2),(3);
T1:BEGIN;select * from t where a=1;delete from t where a=1;
T2:BEGIN;select * from t where a=1;delete from t where a=1;select * from t where a=1;

Environment:

  • CockroachDB version 20.2
  • Server OS: Linux
  • Client app cockroach sql

Metadata

Metadata

Assignees

Labels

C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.O-communityOriginated from the community

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions