diff --git a/go/cmd/dolt/commands/engine/sql_print.go b/go/cmd/dolt/commands/engine/sql_print.go index d0bcfc5693..4536792649 100644 --- a/go/cmd/dolt/commands/engine/sql_print.go +++ b/go/cmd/dolt/commands/engine/sql_print.go @@ -232,9 +232,9 @@ func (iter *binaryHexIterator) Next(ctx *sql.Context) (sql.Row, error) { switch iter.schema[i].Type.Type() { case sqltypes.Binary, sqltypes.VarBinary: switch v := val.(type) { - case []byte: + case []byte: // hex fmt is explicitly upper case rowData[i] = sqlutil.BinaryAsHexDisplayValue(fmt.Sprintf("0x%X", v)) - case string: // handles results from sql-server; mysql wire protocol returns strings + case string: // handles results from sql-server; MySQL wire protocol returns strings rowData[i] = sqlutil.BinaryAsHexDisplayValue(fmt.Sprintf("0x%X", []byte(v))) default: return nil, fmt.Errorf("unexpected type %T for binary column %s", val, iter.schema[i].Name) diff --git a/integration-tests/bats/sql-shell-binary-as-hex.expect b/integration-tests/bats/sql-shell-binary-as-hex.expect index bd8d092b39..8bafd18c6d 100644 --- a/integration-tests/bats/sql-shell-binary-as-hex.expect +++ b/integration-tests/bats/sql-shell-binary-as-hex.expect @@ -97,6 +97,5 @@ run_query "SELECT *, LENGTH(b) FROM test_bin;" { } } -expect_with_defaults {>} { send "exit\r" } -expect eof +run_query "exit;" { expect eof } exit 0 diff --git a/integration-tests/bats/sql-shell.bats b/integration-tests/bats/sql-shell.bats index b629785e56..4ae5cc103f 100644 --- a/integration-tests/bats/sql-shell.bats +++ b/integration-tests/bats/sql-shell.bats @@ -1072,7 +1072,7 @@ expect eof } @test "sql-shell: -binary-as-hex, -skip-binary-as-hex flag is respected in server and local contexts" { -# skiponwindows "Missing Dependencies" + skiponwindows "Missing Dependencies" which expect > /dev/null || skip "expect is not installed" # Default behavior for interactive runs is to output binary as hex