Repository navigation
fix(store): qualify metadata SQL with system_mcp - #46
Merged
Merged
Conversation
metadata_schema_status() queried workspace_metadata without a database
qualifier (it issues no USE). On a real Doris connection the default database
is empty, so the Web UI models page failed with "No database selected" —
invisible to mocked tests.
Qualify every metadata statement with {database}.{table}; CREATE TABLE keeps
the USE-scoped form. Tests assert the status probe and the read path emit a
qualified name.
The models page runs the probe for every visitor. If it raised (e.g. no grant on information_schema), the whole page returned 500. Log it and continue with the normal store reads instead.
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.
Hotfix for an issue introduced by #45 (migration detection).
metadata_schema_status()runs on every models-page load and queriedworkspace_metadatawithout a database qualifier — it issues noUSE, so on areal Doris connection the default database is empty:
The Web UI models page therefore failed for every user (admin and non-admin)
once the metadata table existed. Mocked tests could not see it.
Every metadata statement is now qualified as
system_mcp.workspace_metadata(CREATE TABLE keeps the USE-scoped form). Tests assert the status probe and the
read path emit a qualified name.