MDEV-40324 use-of-uninitialized-value after creation of FULLTEXT table failure - #5693
Open
Thirunarayanan wants to merge 1 commit into
Open
Thirunarayanan wants to merge 1 commit into
Thirunarayanan wants to merge 1 commit into
Conversation
|
|
iMineLink
requested changes
Sep 18, 2026
iMineLink
left a comment
Contributor
There was a problem hiding this comment.
Please fix a trivial test failure under RelWithDebInfoBuild, thanks.
| # FULLTEXT table failure | ||
| # | ||
| call mtr.add_suppression("InnoDB: Failed to create FTS index table"); | ||
| SET STATEMENT DEBUG_DBUG="+d,fts_index_table_fail" FOR |
Contributor
There was a problem hiding this comment.
This fails in RelWithDebInfo build, please move to a _debug.test variant which includes have_debug.inc.
innodb_fts.create 'orig' w1 [ fail ]
Test ended at 2026-09-18 15:10:13
CURRENT_TEST: innodb_fts.create
mysqltest: At line 162: query 'SET STATEMENT DEBUG_DBUG="+d,fts_index_table_fail" FOR
CREATE TABLE t1(f1 TEXT, FULLTEXT(f1))ENGINE=InnoDB' failed with wrong errno ER_UNKNOWN_SYSTEM_VARIABLE (1193): 'Unknown system variable 'DEBUG_DBUG'', instead of ER_CANT_CREATE_TABLE (1005)...
Thirunarayanan
force-pushed
the
MDEV-40324
branch
from
September 18, 2026 14:32
aec2a24 to
de6176e
Compare
Contributor
|
I think the .rdiff files need to be re-generated for the debug test. |
…e failure Problem: ======= For fulltext index, row_create_index_for_mysql() calls fts_create_index_tables(). If creating FTS auxiliary table fails, error handling performs trx->rollback() of the dictionary transaction. Rollback removes the parent table from dictionary cache and frees it. After that, convert_error_code_to_mysql() reads table->flags after table->heap. This leads to read of freed memory. Solution: ======== create_index(): Read table->flags into a local variable before calling row_create_index_for_mysql()
Thirunarayanan
force-pushed
the
MDEV-40324
branch
from
September 19, 2026 06:37
de6176e to
58a5751
Compare
iMineLink
approved these changes
Sep 21, 2026
iMineLink
left a comment
Contributor
There was a problem hiding this comment.
Looks good now, thanks.
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.
Problem:
For fulltext index, row_create_index_for_mysql() calls fts_create_index_tables(). If creating FTS auxiliary table fails, error handling performs trx->rollback() of the dictionary transaction. Rollback removes the parent table from dictionary cache and frees it. After that,
convert_error_code_to_mysql() reads table->flags after table->heap. This leads to read of freed memory.
Solution:
create_index(): Read table->flags into a local variable before calling row_create_index_for_mysql()