Skip to content

MDEV-39050: Improve error message for missing table share in GetTableShare() - #5466

Open
chhsch wants to merge 1 commit into
MariaDB:10.11from
chhsch:MDEV-39050
Open

MDEV-39050: Improve error message for missing table share in GetTableShare()#5466
chhsch wants to merge 1 commit into
MariaDB:10.11from
chhsch:MDEV-39050

Conversation

@chhsch

@chhsch chhsch commented Jul 28, 2026

Copy link
Copy Markdown

Handle the case in tabutil.cpp where GetTableShare() must report an error after open_table_def() has already failed.
open_table_def() stores the underlying system error in s->open_errno before returning, so if opening the .frm file fails with ENOENT, that information is preserved on the share. We use these recorded values to determine the most appropriate error message:

  1. s->error == OPEN_FRM_OPEN_ERROR indicates the table definition file failed to open.
  2. s->open_errno == ENOENT indicates the failure was due to a "not found" condition.
  3. check_db_dir_existence(db) then distinguishes whether the missing path corresponds to an unknown database, versus a generic open/share error.

…Share()

Handle the case in tabutil.cpp where GetTableShare() must report an error after open_table_def() has already failed.

open_table_def() stores the underlying system error in s->open_errno before returning, so if opening the .frm file fails with ENOENT, that information is preserved on the share. We use these recorded values to determine the most appropriate error message:

1. s->error == OPEN_FRM_OPEN_ERROR indicates the table definition file failed to open.
2. s->open_errno == ENOENT indicates the failure was due to a "not found" condition.
3. check_db_dir_existence(db) then distinguishes whether the missing path corresponds to an unknown database, versus a generic open/share error.
@CLAassistant

CLAassistant commented Jul 28, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants