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

[Bug]: the result of select count(*) from table{snapshot = ''} is not correct after creating snapshot. #15907

Closed
1 task done
Ariznawlll opened this issue May 8, 2024 · 5 comments
Assignees
Labels
kind/bug Something isn't working needs-triage phase/testing severity/s0 Extreme impact: Cause the application to break down and seriously affect the use
Milestone

Comments

@Ariznawlll
Copy link
Contributor

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

main

Commit ID

2558e02

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

image

Expected Behavior

select count(*) from tran01{snapshot = 'sp09'}
3

Steps to Reproduce

drop database if exists test06;
create database test06;
use test06;
drop table if exists tran01;
create table tran01(col1 enum('red','blue','green'));
insert into tran01 values('red'),('blue'),('green');
create snapshot sp09 for account sys;
show snapshots;
select count(*) from tran01{snapshot = 'sp09'};     -->出错位置

Additional information

No response

@Ariznawlll Ariznawlll added kind/bug Something isn't working needs-triage severity/s0 Extreme impact: Cause the application to break down and seriously affect the use labels May 8, 2024
@Ariznawlll Ariznawlll added this to the 1.2.0 milestone May 8, 2024
@YANGGMM
Copy link
Contributor

YANGGMM commented May 8, 2024

mysql> drop database if exists test06;
Query OK, 1 row affected (0.03 sec)

mysql> create database test06;
Query OK, 1 row affected (0.01 sec)

mysql> use test06;
Database changed
mysql> drop table if exists tran01;
Query OK, 0 rows affected (0.01 sec)

mysql> create table tran01(col1 enum('red','blue','green'));
Query OK, 0 rows affected (0.02 sec)

mysql> insert into tran01 values('red'),('blue'),('green');
Query OK, 3 rows affected (0.01 sec)

mysql> create snapshot sp09 for account sys;
Query OK, 0 rows affected (0.01 sec)

mysql> show snapshots;
+---------------+----------------------------+----------------+--------------+---------------+------------+
| SNAPSHOT_NAME | TIMESTAMP                  | SNAPSHOT_LEVEL | ACCOUNT_NAME | DATABASE_NAME | TABLE_NAME |
+---------------+----------------------------+----------------+--------------+---------------+------------+
| sp09          | 2024-05-08 09:01:25.125511 | account        | sys          |               |            |
+---------------+----------------------------+----------------+--------------+---------------+------------+
2 rows in set (0.00 sec)

mysql> select count(*) from tran01{snapshot = 'sp09'};
+----------+
| count(*) |
+----------+
|        0 |
+----------+
1 row in set (0.02 sec)

mysql> select count(*) from tran01{snapshot = 'sp09'};
+----------+
| count(*) |
+----------+
|        0 |
+----------+
1 row in set (0.00 sec)

mysql> select count(*) from tran01;
+----------+
| count(*) |
+----------+
|        3 |
+----------+
1 row in set (0.01 sec)

mysql> select count(*) from tran01{snapshot = 'sp09'};
+----------+
| count(*) |
+----------+
|        3 |
+----------+
1 row in set (0.00 sec)

@triump2020 triump2020 assigned triump2020 and unassigned YANGGMM May 8, 2024
@triump2020
Copy link
Contributor

triump2020 commented May 8, 2024

the cause had been found, pls wait for PR.

@Ariznawlll
Copy link
Contributor Author

commit: 4d44f72

image

verified.

@matrix-meow
Copy link
Contributor

Hello @Ariznawlll. The bug issue in the BVT test code has not been removed,issues automatically open.

@Ariznawlll
Copy link
Contributor Author

removing tag, in progress

@Ariznawlll Ariznawlll mentioned this issue May 15, 2024
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working needs-triage phase/testing severity/s0 Extreme impact: Cause the application to break down and seriously affect the use
Projects
None yet
Development

No branches or pull requests

4 participants