Fix output for `binary` keys in `-verbose` mode. (#1559) · github/gh-ost@fb3d71d · GitHub
Skip to content

Commit fb3d71d

Browse files
burnisonmeiji163
andauthored
Fix output for binary keys in -verbose mode. (#1559)
When migrating a table with a `binary` key in `-verbose` mode, different sequences of bytes may prevent execution output from being logged, or correctly logged, to the console. This happens because the `MigrationRange*Values` are printed to the screen without any type of encoding. One particularly problematic sequence is `0x27`, `Escape`, which causes the terminal to stop logging for the duration of the migration: ``` 2025-05-23 11:53:27 INFO Listening on unix socket file: /tmp/gh-ost.test.binfoo.sock 2025-05-23 11:53:27 INFO Intercepted changelog state ReadMigrationRangeValues 2025-05-23 11:53:27 INFO Handled changelog state ReadMigrationRangeValues 2025-05-23 11:53:27 INFO Migration min values: [ ``` This commit changes the to-string rendering for `binary` keys, rendering the values as a hex string rather than an unescaped series of bytes. Co-authored-by: meiji163 <meiji163@github.com>
1 parent 7c18055 commit fb3d71d

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

‎go/sql/types.go‎

Lines changed: 1 addition & 1 deletion

‎go/sql/types_test.go‎

Lines changed: 9 additions & 0 deletions

0 commit comments

Comments
 (0)