Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird View When a Record is Deleted by Two Concurrent Transactions #30239

Closed
TrocTool opened this issue Nov 29, 2021 · 2 comments
Closed

Weird View When a Record is Deleted by Two Concurrent Transactions #30239

TrocTool opened this issue Nov 29, 2021 · 2 comments
Labels
duplicate Issues or pull requests already exists. sig/transaction SIG:Transaction type/question The issue belongs to a question. type/stale This issue has not been updated for a long time.

Comments

@TrocTool
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

/* init */ drop table if exists t;
/* init */ create table t(a int primary key, b int);
/* init */ insert into t values (1, 1), (2, 2);

/* s1 */ begin;
/* s1 */ select * from t; -- [(1, 1), (2, 2)]
/* s2 */ begin;
/* s2 */ delete from t where a = 1;
/* s2 */ commit;
/* s1 */ select * from t; -- [(1, 1), (2, 2)]
/* s1 */ delete from t where a = 1 or a = 2;
/* s1 */ select * from t;  -- [(1, 1)]
/* s1 */ commit;

2. What did you expect to see? (Required)

The last SELECT of s1 statement should get an empty set.

3. What did you see instead (Required)

The last SELECT of s1 statement gets (1, 1), although it has been deleted it.

4. What is your TiDB version? (Required)

+--------------------+
| version()          |
+--------------------+
| 5.7.25-TiDB-v5.3.0 |
+--------------------+
1 row in set (0.00 sec)
@TrocTool TrocTool added the type/bug The issue is confirmed as a bug. label Nov 29, 2021
@aytrack aytrack added the sig/transaction SIG:Transaction label Nov 29, 2021
@vivid392845427 vivid392845427 added the duplicate Issues or pull requests already exists. label Nov 30, 2021
@vivid392845427
Copy link

duplicate,https://github.com/pingcap/tidb/issues/23966, and this action as same as mysql

@vivid392845427 vivid392845427 added type/question The issue belongs to a question. and removed type/bug The issue is confirmed as a bug. labels Nov 30, 2021
@jebter
Copy link

jebter commented Jun 5, 2024

Duplicate, let's close it.

@jebter jebter closed this as completed Jun 5, 2024
@jebter jebter added the type/stale This issue has not been updated for a long time. label Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues or pull requests already exists. sig/transaction SIG:Transaction type/question The issue belongs to a question. type/stale This issue has not been updated for a long time.
Projects
None yet
Development

No branches or pull requests

4 participants