Skip to content

fix(mysql): numbers, dates and JSON show as values, not as hex bytes - #1817

Merged
ZhuchkaTriplesix merged 2 commits into
devfrom
fix/mysql-numbers-shown-as-hex
Oct 25, 2026
Merged

ZhuchkaTriplesix merged 2 commits into
devfrom
fix/mysql-numbers-shown-as-hex

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Found by browsing the local MySQL 8.4 test stack in a debug build.

Symptom. In the grid of any MySQL table, integer columns showed the hex of their text: id = 0x31, 0x3130 (for 1, 10), TINYINT(1) = 0x30 / 0x31, JSON = 0x7b2270…. Strings were fine. The table view, the SQL editor and everything reading ResultSetColumn.isBinaryPayload were affected.

Cause. mysqlColumnHoldsRawBytes (vendored mysql_client) took a column as raw bytes whenever its character set was 63 (binary). The server reports charset 63 for every non-string column (numbers, dates, JSON, ENUM / SET), so all of them were treated as BLOBs and formatted as hex. The same rule also made a TEXT column (a BLOB type with a text charset) bytes, since every BLOB type returned true.

Fix. BIT and GEOMETRY are bytes; CHAR / VARCHAR / BINARY / VARBINARY and the BLOB types are bytes only with charset 63 (so BINARY, VARBINARY, BLOB stay hex and TEXT is text); everything else is text. The same rule decides latin1-vs-UTF-8 decoding of the wire value, so JSON with non-ASCII text is decoded as UTF-8 now.

Checked in the running app on querya.all_mysql_types and querya.customers: integers, DECIMAL, FLOAT, dates, TIME, YEAR, ENUM, SET and JSON read as values, BOOLEAN as true / false, and BIT, BINARY, VARBINARY, BLOB as 0x…. Tests for each type group. Not run locally (analyzer clean), CI will.

@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit a45b636 into dev Oct 25, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant