Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions enginetest/queries/script_queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -8436,6 +8436,22 @@ where
},
},
},
{
Name: "hash tuples",
Dialect: "mysql",
SetUpScript: []string{
"CREATE TABLE test (id longtext);",
"INSERT INTO test (id) VALUES ('test_id');",
},
Assertions: []ScriptTestAssertion{
{
Query: "SELECT * FROM test WHERE id IN ('test_id');",
Expected: []sql.Row{
{"test_id"},
},
},
},
},
}

var SpatialScriptTests = []ScriptTest{
Expand Down
5 changes: 4 additions & 1 deletion sql/expression/in.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,10 @@ func hashOfSimple(ctx *sql.Context, i interface{}, t sql.Type) (uint64, error) {
if err != nil {
return 0, err
}
str = converted.(string)
str, _, err = sql.Unwrap[string](ctx, converted)
if err != nil {
return 0, err
}
}
} else {
x, err := convertOrTruncate(ctx, i, t.Promote())
Expand Down
Loading