Skip to content
/ server Public

Comments

MDEV-38842 Server fails to drop .ibd file when vector table creation fails#4659

Open
Thirunarayanan wants to merge 1 commit into11.8from
MDEV-38842
Open

MDEV-38842 Server fails to drop .ibd file when vector table creation fails#4659
Thirunarayanan wants to merge 1 commit into11.8from
MDEV-38842

Conversation

@Thirunarayanan
Copy link
Member

Problem:

When creating tables with vector indexes, if the secondary table creation fails after the main table is successfully created, the server was not properly cleaning up the main table's .ibd file. Stale file exists because create_table_impl() always called ddl_log_complete() on any error, which disables DDL log entries instead of executing them for cleanup. The main table would be left behind even though the overall CREATE TABLE operation failed.

Solution:

ha_create_table(): Return error code 2 specifically when secondary table creation for high-level indexes fails

create_table_impl(): Call ddl_log_revert() when error code is 2 to properly clean up the main table files.

…fails

Problem:
========
When creating tables with vector indexes, if the secondary table
creation fails after the main table is successfully created,
the server was not properly cleaning up the main table's .ibd file.
Stale file exists because create_table_impl() always called
ddl_log_complete() on any error, which disables DDL log entries
instead of executing them for cleanup. The main table would be
left behind even though the overall CREATE TABLE operation failed.

Solution:
=========
ha_create_table(): Return error code 2 specifically when
secondary table creation for high-level indexes fails

create_table_impl(): Call ddl_log_revert() when error code is 2
to properly clean up the main table files.
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Thirunarayanan Thirunarayanan requested a review from dr-m February 16, 2026 07:24
@dr-m dr-m removed their request for review February 16, 2026 08:59
@dr-m
Copy link
Contributor

dr-m commented Feb 16, 2026

I don’t think I can review this, because the changes are outside InnoDB and I wasn’t involved in the design, implementation, or review of MDEV-32887 Vector Search.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants