MDEV-39050: Improve error message for missing table share in GetTableShare() - #5466
Open
chhsch wants to merge 1 commit into
Open
MDEV-39050: Improve error message for missing table share in GetTableShare()#5466chhsch wants to merge 1 commit into
chhsch wants to merge 1 commit into
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: