Skip to content
/ server Public

MDEV-39196: SELECT from information schema fails when FederatedX loses underlying table#4876

Open
itzanway wants to merge 1 commit intoMariaDB:10.6from
itzanway:fix-mdev-39196
Open

MDEV-39196: SELECT from information schema fails when FederatedX loses underlying table#4876
itzanway wants to merge 1 commit intoMariaDB:10.6from
itzanway:fix-mdev-39196

Conversation

@itzanway
Copy link
Copy Markdown
Contributor

Description

This PR resolves MDEV-39196 by fixing a bug where SELECT queries from INFORMATION_SCHEMA fail completely when a FederatedX underlying remote table is unreachable.

As noted in the issue, the storage engine was previously passing a hard error back to the SQL layer without specifying the guilty local table name, breaking the query and making debugging very difficult.

Implementation Details

  • Error Downgrade: Modified ha_federatedx::info() in storage/federatedx/ha_federatedx.cc to catch remote connection and missing table errors, downgrading them from fatal errors to warnings using push_warning_printf.
  • Contextual Warning: Injected the local table name (share->table_name) into the warning message so users can easily identify exactly which FederatedX table is inaccessible.
  • Graceful Continuation: Reset error_code = 0; after pushing the warning, allowing the INFORMATION_SCHEMA loop to finish scanning the remaining tables in the database instead of aborting.

Testing

  • Added a specific MTR test case (federatedx_mdev39196.test and .result) to the federated suite to simulate a dropped remote table and verify that the query succeeds while pushing the correct warning.
  • Relying on Buildbot CI to verify cross-platform compilation and ensure no regressions on older build environments.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 27, 2026

CLA assistant check
All committers have signed the CLA.

…s underlying table

When a remote table is unavailable, FederatedX was passing a hard error back to the SQL layer, causing INFORMATION_SCHEMA queries to abort entirely.

This patch intercepts the remote error in ha_federatedx::info, downgrades it to a warning using push_warning_printf, and includes the local table name in the warning message so the user knows which table is inaccessible.

Signed-off-by: Anway Durge <124391429+itzanway@users.noreply.github.com>
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