fix: MDEV-40846 DuckDB handles functionality that is based on invisible columns, e.g. WITH SYSTEM VERSIONING. - #5581
Merged
Conversation
…le columns, e.g. WITH SYSTEM VERSIONING.
drrtuy
force-pushed
the
11.4-MDEV-40846-inv-columns
branch
from
August 21, 2026 16:05
cc08036 to
566e626
Compare
drrtuy
enabled auto-merge (rebase)
August 21, 2026 16:07
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.
I'll invoke both skills you referenced.
I'll now invoke the pr-message skill.
I'll gather the last commit info and diff.
Here's the PR message for the last commit (
cc08036):Fix MDEV-40846: handle invisible columns in DuckDB pushdown
What
Cross-engine queries touching invisible columns (e.g. tables
WITH SYSTEM VERSIONING) produced incorrect results or column-count mismatches when pushed down to DuckDB. This PR makes the pushdown planner recognize invisible columns and fall back to MariaDB execution when it can't safely handle them.Key changes
ha_duckdb_pushdown.cc: addInvisible_field_enumeratorandquery_references_invisible_fields()to bail out of pushdown when a query explicitly references invisible fields (excluding implicit versioning fields).has_visible_field_prefix()so external tables only push down when invisible columns are strictly trailing.next_row()with a hard error when DuckDB's result width doesn't match MariaDB metadata.cross_engine_scan.cc: stop binding trailing invisible fields to the DuckDB scan.cross_engine_jointest cases (9–11) covering system versioning plus trailing/non-trailing invisible columns.How to test
Run
mysql-testsuiteduckdb.cross_engine_join.