matrixone icon indicating copy to clipboard operation
matrixone copied to clipboard

[Bug]: truncate table, load data result error.

Open tianyahui-python opened this issue 2 years ago • 12 comments

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:

  1. mysql client 1 execute load data
  2. When the client 1 executes load data, mysql client 2 execute truncate table;
  3. client 2 execute load data 截屏2023-04-06 14 55 44

Actual Behavior: There is only one load data

Expected Behavior

No response

Steps to Reproduce

No response

Additional information

No response

tianyahui-python avatar Apr 04 '23 06:04 tianyahui-python

find the reason, will fix it later.

jianwan0214 avatar Apr 04 '23 11:04 jianwan0214

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.

domingozhang avatar Apr 06 '23 07:04 domingozhang

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.

domingozhang avatar Apr 06 '23 07:04 domingozhang

work on it

jianwan0214 avatar Apr 07 '23 13:04 jianwan0214

as discussed, this issue will be fixed after #6602 implemented

domingozhang avatar Apr 10 '23 03:04 domingozhang

确认是否跟table id 有关

daviszhen avatar Jul 24 '23 03:07 daviszhen

未投入

daviszhen avatar Jan 05 '24 11:01 daviszhen

I think the behavior is OK.

fengttt avatar Apr 24 '25 21:04 fengttt

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

matrix-meow avatar Apr 24 '25 21:04 matrix-meow

Please fix bvt tag.

fengttt avatar Apr 27 '25 09:04 fengttt

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

matrix-meow avatar Jun 05 '25 06:06 matrix-meow

今日提remove tag pr

heni02 avatar Jun 13 '25 02:06 heni02

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

matrix-meow avatar Aug 01 '25 02:08 matrix-meow

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

matrix-meow avatar Aug 06 '25 02:08 matrix-meow