Skip to content
/ server Public

Conversation

@Thirunarayanan
Copy link
Member

@Thirunarayanan Thirunarayanan commented Jan 22, 2026

Remove several unused debugging preprocessor directives from the FTS module that were never effectively used for debugging purposes and represent dead code.

Removed debug directives:

  • DEBUG_FTS_SORT_PRINT: FTS sorting debug output macros

  • FTS_INTERNAL_DIAG_PRINT: Internal FTS diagnostic printing

  • FTS_OPTIMIZE_DEBUG: FTS optimization debugging functions

  • MYSQL_STORE_FTS_DOC_ID: Store fts doc id in FTS_DOC_ID field

  • FTS_DEBUG: Debug for fulltext index

  • FTS_CACHE_SIZE_DEBUG: Assign max and min fulltext cache size

  • FTS_MULT_INDEX: Updated fulltext index

  • Removed FTS_OPTIMIZE_START_TIME and FTS_OPTIMIZE_END_TIME constants

These debug directives were never properly integrated into the build system and provided no value for production debugging and also improves code clarity for the FTS module.

@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.

Copy link
Contributor

@dr-m dr-m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also remove the following, which are never defined?

#ifdef FTS_DEBUG
#ifdef FTS_CACHE_SIZE_DEBUG
#ifdef FTS_MULT_INDEX

Copy link
Contributor

@dr-m dr-m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also unreachable code inside #ifdef MYSQL_STORE_FTS_DOC_ID. What is its purpose? Is it something that was implemented in MySQL but not MariaDB?

Remove several unused debugging preprocessor directives from the FTS
module that were never effectively used for debugging purposes and
represent dead code.

Removed debug directives:
- DEBUG_FTS_SORT_PRINT: FTS sorting debug output macros
- FTS_INTERNAL_DIAG_PRINT: Internal FTS diagnostic printing
- FTS_OPTIMIZE_DEBUG: FTS optimization debugging functions
- MYSQL_STORE_FTS_DOC_ID: Store fts doc id in FTS_DOC_ID field
- FTS_DEBUG: Debug for fulltext index
- FTS_CACHE_SIZE_DEBUG: Assign max and min fulltext cache size
- FTS_MULT_INDEX: Updated fulltext index
- Removed FTS_OPTIMIZE_START_TIME and FTS_OPTIMIZE_END_TIME constants

These debug directives were never properly integrated into the build
system and provided no value for production debugging and also
improves code clarity for the FTS module.
@Thirunarayanan Thirunarayanan merged commit 8cb64d1 into main Jan 23, 2026
15 of 18 checks passed
@Thirunarayanan Thirunarayanan deleted the MDEV-38631 branch January 23, 2026 15:16
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.

4 participants