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] AUTO_INCREMENT doesn't seem to work, gives error. #36638

Open
2 of 3 tasks
hyler opened this issue Jun 20, 2024 · 2 comments · May be fixed by #36836
Open
2 of 3 tasks

[Bug] AUTO_INCREMENT doesn't seem to work, gives error. #36638

hyler opened this issue Jun 20, 2024 · 2 comments · May be fixed by #36836

Comments

@hyler
Copy link

hyler commented Jun 20, 2024

Search before asking

  • I had searched in the issues and found no similar issues.

Version

2.1.3

What's Wrong?

Create simple table:

mysql> CREATE TABLE sink (mykey BIGINT NOT NULL AUTO_INCREMENT, name VARCHAR(64)) UNIQUE KEY(mykey) DISTRIBUT
ED BY HASH(mykey) BUCKETS AUTO PROPERTIES("replication_num" = "1");
Query OK, 0 rows affected (0.05 sec)

Insert values:

mysql> INSERT INTO sink (name) VALUES ('mark');
Query OK, 1 row affected (0.15 sec)
{'label':'label_50ebd44d291c443d_bf696f2afe14d2cb', 'status':'VISIBLE', 'txnId':'3056'}

Fails when the data comes from a SELECT:

mysql> INSERT INTO sink (name) SELECT 'john' AS name FROM sink;
ERROR 1105 (HY000): errCode = 2, detailMessage = Insert has filtered data in strict mode. url: http://192.168.1.224:8040/api/_load_error_log?file=__shard_56/error_log_insert_stmt_f5761498513f4ab5-823316e0596a9de0_f5761498513f4ab5_823316e0596a9de0

This is the log:

Reason: column_name[mykey], null value for not null column, type=BIGINT. src line []; 

What You Expected?

I expect the data to go into the table and the column to be auto-incremented.

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@hyler
Copy link
Author

hyler commented Jun 24, 2024

I wanted to provide a cleaner workflow that demonstrates the issue. I've attached a screenshot. I cannot understand what I'm doing wrong to get this error.

All the steps work, except the last one, where I'm trying to insert into the destination table based on a SELECT statement, from the source table.

image

@ixzc
Copy link
Contributor

ixzc commented Jun 25, 2024

it really does not meet expectations. we will fix this and update you if there is some thing new.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants