PXC node eviction due to CHECK CONSTRAINT

Description

PXC node disconnected/evicted from the cluster due to CHECK CONSTRAINT with the following scenarios :

1) ERROR 3819 : New CHECK CONSTRAINT is created and it has a rule violation upon creation.
2) ERROR 3822 : New CHECK CONSTRAINT with Duplicate check constraint name.
3) No ERROR : After a successful DROP of CHECK CONSTRAINT

 

How to reproduce :

1) Create the cluster :

2) Login to any node :

Create the table :

Scenario 1)

ERROR 3819 : New CHECK CONSTRAINT is created and it has a rule violation upon creation.

Insert a record that will violate the rule and then create the check constraint.

Error log :

Suggested fix :

It should only return error but not make the node inconsistent and get disconnected/evicted from the cluster.

Workaround :

Ensure that there is no new check constraint rule violation before creating the check constraint.

Scenario 2)

ERROR 3822 : New CHECK CONSTRAINT with Duplicate check constraint name.

Execute same ADD CHECK CONSTRAINT twice :

Node logfile :

Suggested fix :

It should only return error but not make the node inconsistent and get disconnected/evicted from the cluster.

Workaround :

Ensure that there is no same CHECK CONSTRAINT name existing before creating a new one.

Scenario 3)

3) No ERROR : After a successful DROP of CHECK CONSTRAINT

CREATE then DROP the CHECK CONSTRAINT :

Node Logfile :

Suggested fix :

A successful DROP of CHECK CONSTRAINT should not make the node inconsistent and get disconnected/evicted from the cluster.

Workaround :

None

Environment

None

AFFECTED CS IDs

CS0042033

Activity

aristotle.po 
November 23, 2023 at 9:45 AM
(edited)

Consolidated all the 3 bug report in one here https://jira.percona.com/browse/PXC-4336 for easier tracking of Dev team.

aristotle.po 
November 23, 2023 at 8:16 AM

PXC Node eviction due to CHECK CONSTRAINT bugs :
https://jira.percona.com/browse/PXC-4337 "PXC node eviction due to new CHECK CONSTRAINT with Duplicate check constraint name ERROR 3822"
https://jira.percona.com/browse/PXC-4336 "PXC node eviction due to new CHECK CONSTRAINT with violation ERROR 3819"
https://jira.percona.com/browse/PXC-4338 "PXC Node eviction after a successful DROP of CHECK CONSTRAINT"

Done

Details

Assignee

Reporter

Needs Review

Needs QA

Affects versions

Priority

Created November 23, 2023 at 5:48 AM
Updated June 6, 2024 at 7:57 AM
Resolved January 16, 2024 at 10:05 AM