fix(plugins): MySQL numeric column rendering and Query cancelled alert race#1209
Merged
Conversation
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.
Summary
Two regressions from #1190 (
refactor(plugins)!: typed PluginCellValue for binary cells):1. MySQL numeric / date columns render as hex bytes
INT 1 displayed as
0x31, DECIMAL 12.50 as0x31322E3530, dates as raw byte sequences. The new binary-routing predicate wasfield.charsetnr == 63, but MariaDB reports charset 63 for every non-character type, not just BLOB/VARBINARY.Fix:
MariaDBFieldClassifier.isBinary(typeRaw:charset:)now requires both charset 63 AND a BLOB / VARBINARY / BIT field type. Numerics, decimals, dates, JSON, ENUM, SET, GEOMETRY all route to.textas they should.Audited every plugin touched by #1190; MySQL is the only one with this bug. PostgreSQL (OID 17), DuckDB (
DUCKDB_TYPE_BLOB), MSSQL (SYBBINARY|SYBVARBINARY|SYBIMAGE), Oracle (.raw|.longRAW|.blob), Cassandra (CASS_VALUE_TYPE_BLOB), BigQuery (schema type"BYTES"), MongoDB (as? Data), DynamoDB (.binaryenum) all use sound predicates. ClickHouse, Redis, CloudflareD1, Etcd, LibSQL never emit.byteson result rows.2. "Query Execution Failed: Query cancelled" alert race
When opening a table tab, the in-flight query is sometimes cancelled by supersession (refresh, preview-tab promotion, teardown). The plugin threw a custom error with message
"Query cancelled", which the catch path inMainContentCoordinator/QueryExecutionCoordinator+Parameters/+MultiStatementsurfaced as a user alert because there was noTask.isCancelled/ cancellation-error filter.Fix:
CancellationError()instead of a custom*Error("Query cancelled"). This aligns with what the streaming paths already do (Oracle, DuckDB, the streaming branches of those same drivers).MainContentCoordinator:1107-1119,+Parameters:156-168,+MultiStatement:140-156) now short-circuit whenerror is CancellationError || Task.isCancelled. Cleanup state mutations still run; only the alert is suppressed.Test plan
order_items(1M rows seeded). INT and DECIMAL render as1,12.50etc. — no0x...hex.MariaDBFieldClassifierTests— 7 new tests covering BIT, BLOB family, VAR_STRING/STRING charset 63, numerics, temporals, JSON/ENUM/SET/GEOMETRY. Verified viaxcodebuild test -only-testing:TableProTests/MariaDBFieldClassifierTests→** TEST SUCCEEDED **.