Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
11.4.11
-
None
-
None
-
None
-
MariaDB version: 11.4.11-MariaDB-ubu2404
Docker image: mariadb:11.4
Host OS: Windows 11
Runtime environment: Docker Desktop with WSL2 backend
Description
MariaDB crashes when executing ALTER TABLE ... DROP PRIMARY KEY on a table whose primary key is referenced by a self-referencing foreign key.
The server should reject the operation with an error because the primary key is still required by the foreign key constraint. Instead, the server terminates and writes a core dump.
How to repeat:
CREATE TABLE t635 (c1 INT4 PRIMARY KEY); |
ALTER TABLE t635 ADD FOREIGN KEY (c1) REFERENCES t635(c1); |
ALTER TABLE t635 DROP PRIMARY KEY; |
Expected Result:
The server should return an error indicating that the primary key cannot be dropped because it is referenced by a foreign key constraint.
Actual Result:
The MariaDB server crashes during execution of:
ALTER TABLE t635 DROP PRIMARY KEY;
Additional Information:
The crash log contains:
Writing a core file...
The issue appears to be related to handling self-referencing foreign keys during primary key removal.
Attachments
Issue Links
- relates to
-
MDEV-29015 InnoDB: Assertion failure in file /home/buildbot/buildbot/build/mariadb-10.3.35/storage/innobase/fil/fil0fil.cc line 968
-
- Closed
-
-
MDEV-29260 Server crashes when running migration queries inside Docker on Windows
-
- Closed
-
-
MDEV-34938 Under Windows Subsystem for Linux, InnoDB crashes on ALTER TABLE or OPTIMIZE TABLE
-
- Closed
-
-
MDEV-36097 InnoDB: Failing assertion: t->id != table->id in hash_cell_t::search
-
- Closed
-