Fix:兼容 ShardingSphere Proxy 的 BINARY/VARBINARY Hex 查看 - #6444
Merged
Conversation
Owner
|
Thanks for the contribution! Merged in 5087460, will be released in the next version. |
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 #5873
问题原因
PR #5872 已修复原生 MySQL 返回的
BINARY/VARBINARY,但 ShardingSphere Proxy 5.3.0 会改写查询结果元数据:BINARY被返回为CHAR,VARBINARY被返回为VARCHARBINARY_FLAG,并带有代理添加的UNSIGNED_FLAGSHOW FULL COLUMNS返回的表结构类型仍然正确DBX 此前只根据结果元数据的字符集 63 判断二进制列,因此代理查询结果被当成文本解码,Hex 查看器无法获得原始字节。
修复内容
binary/varbinary结果类型00、不可打印字节和空二进制值CHAR/VARCHAR以及使用二进制排序规则的文本仍按文本处理验证
binary(8)/varbinary(32)列头正确;0x3135303031300000、0xdeadbeef、0x均可查看cargo test -p dbx-core mysql_shardingsphere --lib:2/2 通过cargo test -p dbx-core mysql_binary --lib:5/5 通过packages/app-tests/binaryCellDownload.test.ts:16/16 通过pnpm typecheck、cargo fmt --all -- --check、相关 Clippy:通过