Bug #121463 INSERT reports error while inserting data in a table with foreign key references a partitioned table in NDB

Submitted: 9 Oct 1:23
Reporter: Jiyuan Li Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:|26.10.0-cluster OS:Ubuntu (24.04)
Assigned to: CPU Architecture:Any

[9 Oct 1:23] Jiyuan Li
Description:
Inserting data into a table which contains a foreign key references a key in partitioned table returns error

How to repeat:
SET SESSION foreign_key_checks=1;
CREATE TABLE p (id INT PRIMARY KEY) ENGINE=NDB
PARTITION BY RANGE(id) (PARTITION p0 VALUES LESS THAN (100), PARTITION p1 VALUES LESS THAN MAXVALUE);
CREATE TABLE c (id INT PRIMARY KEY, pid INT NULL, FOREIGN KEY (pid) REFERENCES p(id) ON DELETE CASCADE) ENGINE=NDB;
INSERT INTO p VALUES (1);
INSERT INTO c VALUES (10,1);
ERROR 1296 (HY000): Got error 311 'Undefined partition used in setPartitionId' from NDBCLUSTER

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.047 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.