[Bug]: truncate table, load data result error.
Is there an existing issue for the same bug?
- [X] I have checked the existing issues.
Environment
- Version or commit-id (e.g. v0.1.0 or 8b23a93):
- Hardware parameters:
- OS type:
- Others:
Actual Behavior
Reproducible Steps:
- mysql client 1 execute load data
- When the client 1 executes load data, mysql client 2 execute truncate table;
- client 2 execute load data
Actual Behavior: There is only one load data
Expected Behavior
No response
Steps to Reproduce
No response
Additional information
No response
find the reason, will fix it later.
as discussed, the expected behaviors as following in Pessimistic mode, there will be one set data. session 2 will wait for session 1's committing in Optimistic mode, there will be one set data. session 1 will failed because table id changed, and session 2 committed sucessfully.
Session 1: mysql> begin; Query OK, 0 rows affected (0.00 sec)
mysql> insert into t1 values(123); Query OK, 1 row affected (0.09 sec)
Session 2: mysql> drop table t1; Query OK, 0 rows affected (0.09 sec)
Session 1: mysql> commit; Query OK, 0 rows affected (0.08 sec)
mysql> select * from t1; ERROR 1064 (HY000): SQL parser error: table "t1" does not exist
When session 1 committed transaction, the original table didn't exist yet. However the commit action still successfully.
I guess this is the root cause. Two load data successful with only 1 set data.
work on it
as discussed, this issue will be fixed after #6602 implemented
确认是否跟table id 有关
未投入
I think the behavior is OK.
Hello @tianyahui-python. The bug issue in the BVT test code has not been removed,issues automatically open.
Please fix bvt tag.
Hello @tianyahui-python. The bug issue in the BVT test code has not been removed,issues automatically open.
今日提remove tag pr
Hello @tianyahui-python. The bug issue in the BVT test code has not been removed,issues automatically open.
Hello @tianyahui-python. The bug issue in the BVT test code has not been removed,issues automatically open.