Repository navigation
The schema query reads MySQL's binary information_schema - #323
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: WaylandYang <wayland0916@gmail.com>
This was referenced Sep 4, 2026
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.
Fixes the schema-sync half of #316, found by running the engine's own live test against a real MySQL 8.4 and MariaDB 11.4 (containers over an SSH tunnel).
fetch_schemacould not readinformation_schema.columnson a real server at all:Since MySQL 8.0
information_schemais a set of views over the data dictionary, and its string columns come back asVARBINARYthrough the binary protocol. sqlx's strict decoding refuses to read that into aString. The raw SQL looks fine from the CLI — the CLI does no typed decode — so this only surfaces against a live server through the driver, which is exactly the gap #316 named.The fix wraps each selected column in
CAST(... AS CHAR). Harmless on MariaDB, one statement for both.Verified on both servers with the gated live test
a_live_server_answers_with_typed_values(UTOPIA_TEST_MYSQL_URL=…):BIGINT UNSIGNEDat the u64 ceiling,DECIMALas a number,TINYINT(1)as a bool, an all-NULL row as JSON nulls.SET SESSION max_execution_timeerrors with 1193 and the engine falls through tomax_statement_time. On MySQL the reverse holds (max_statement_time→ 1193), so the two spellings are confirmed against the two servers they target.🤖 Generated with Claude Code