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]: Support INSERT ON DUPLICATE KEY UPDATE for cluster table #11746

Closed
1 task done
DanielZhangQD opened this issue Sep 12, 2023 · 5 comments
Closed
1 task done

[Bug]: Support INSERT ON DUPLICATE KEY UPDATE for cluster table #11746

DanielZhangQD opened this issue Sep 12, 2023 · 5 comments
Assignees
Labels
kind/bug Something isn't working severity/s0 Extreme impact: Cause the application to break down and seriously affect the use
Milestone

Comments

@DanielZhangQD
Copy link
Contributor

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Environment

- Version or commit-id (e.g. v0.1.0 or 8b23a93): d9cef7845
- Hardware parameters:
- OS type:
- Others:

Actual Behavior

  • Create a cluster table
CREATE CLUSTER TABLE `statement_cx` (
`statement_id` VARCHAR(36) NOT NULL,
`account` VARCHAR(300) NOT NULL,
`response_at` DATETIME DEFAULT NULL,
`cx` DECIMAL(23,3) NOT NULL,
`account_id` INT UNSIGNED NOT NULL COMMENT 'the account_id added by the mo',
PRIMARY KEY (`statement_id`,`account_id`)
)
  • Insert record with the following SQL and error is reported:
Error 20105 (HY000): not supported: INSERT ... ON DUPLICATE KEY UPDATE ... for cluster table\nPrevious DML conflicts with existing constraints or data format. This transaction has to be aborted","elapsed":"1.003875ms","rows":0,"sql":"INSERT INTO `mo_catalog`.`statement_cx` (`statement_id`,`account`,`response_at`,`cx`,`account_id`) VALUES ('0fe8d454-514d-11ee-9262-1e00ea3e7482','3cd4dac5_6592_47c0_88a1_0628544bf024','2023-09-12 17:16:35','0.0001234069009675',1),('1adec454-514d-11ee-9262-1e00ea3e7482','3cd4dac5_6592_47c0_88a1_0628544bf024','2023-09-12 17:16:55','0.027634048460035',1) ON DUPLICATE KEY UPDATE `statement_id`=`statement_id`

Expected Behavior

SQL is executed successfully

Steps to Reproduce

See detail in `Actual Behavior`

Additional information

Related to #11224 (comment)

@DanielZhangQD DanielZhangQD 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 Sep 12, 2023
@DanielZhangQD DanielZhangQD added this to the 1.0.0 milestone Sep 12, 2023
@ouyuanning
Copy link
Contributor

明天看

@ouyuanning
Copy link
Contributor

PR待合并

@DanielZhangQD
Copy link
Contributor Author

To be verified

@DanielZhangQD
Copy link
Contributor Author

Verified and passed with commit 16d885502

@DanielZhangQD
Copy link
Contributor Author

@aressu1985 Please help verify this issue.

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 severity/s0 Extreme impact: Cause the application to break down and seriously affect the use
Projects
None yet
Development

No branches or pull requests

5 participants