Skip to content

Commit 10d4574

Browse files
author
James Cor
committed
hex comparisons
1 parent 6a230d8 commit 10d4574

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

enginetest/queries/script_queries.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,24 @@ var ScriptTests = []ScriptTest{
304304
Query: "SELECT '123.456e-2' = 1.23456;",
305305
Expected: []sql.Row{{true}},
306306
},
307+
{
308+
Skip: true,
309+
Query: "SELECT '1.9a' = 1.9;",
310+
Expected: []sql.Row{{true}},
311+
},
312+
{
313+
Skip: true,
314+
Query: "SELECT 1 where '1.9a' = 1.9;",
315+
Expected: []sql.Row{{1}},
316+
},
317+
{
318+
// Valid float strings used as arguments to functions are truncated not rounded
319+
Skip: true,
320+
Query: "SELECT LENGTH(SPACE('1.9'));",
321+
Expected: []sql.Row{{1}},
322+
ExpectedWarningsCount: 2, // MySQL throws two warnings for some reason
323+
ExpectedWarning: mysql.ERTruncatedWrongValue,
324+
},
307325
{
308326
// TODO: 123.456 is converted to a DECIMAL by Builder.ConvertVal, when it should be a DOUBLE
309327
Skip: true,
@@ -731,6 +749,11 @@ var ScriptTests = []ScriptTest{
731749
Query: "SELECT X'40' | X'01', b'11110001' & b'01001111';",
732750
Expected: []sql.Row{{uint64(65), uint64(65)}},
733751
},
752+
{
753+
Skip: true,
754+
Query: "SELECT 0x1 = 1;",
755+
Expected: []sql.Row{{true}},
756+
},
734757
},
735758
},
736759
{

0 commit comments

Comments
 (0)