Skip to content

Commit abe337e

Browse files
committed
add test for overflow
1 parent ba2cb47 commit abe337e

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

enginetest/queries/script_queries.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,16 +124,15 @@ var ScriptTests = []ScriptTest{
124124
// Regression test for https://github.com/dolthub/dolt/issues/9641
125125
Name: "bit union regression test dolt#9641",
126126
SetUpScript: []string{
127-
"CREATE TABLE bit_union_test_9641 (id INT PRIMARY KEY, flag BIT(1))",
128-
"INSERT INTO bit_union_test_9641 VALUES (1, 0), (2, 1)",
127+
"CREATE TABLE report_card (id INT PRIMARY KEY, archived BIT(1))",
128+
"INSERT INTO report_card VALUES (1, 0)",
129129
},
130130
Assertions: []ScriptTestAssertion{
131131
{
132-
Query: "SELECT flag FROM bit_union_test_9641 WHERE id = 1 UNION SELECT NULL as flag",
133-
Expected: []sql.Row{{int64(0)}, {nil}},
134-
},
135-
{
136-
Query: "SELECT flag FROM bit_union_test_9641 WHERE id = 1 UNION SELECT 48 as flag",
132+
// Test UNION with BIT column and integer constant (related to customer's "48 is beyond maximum value" error)
133+
Query: `SELECT archived FROM report_card WHERE id = 1
134+
UNION ALL
135+
SELECT 48 FROM report_card WHERE id = 1`,
137136
Expected: []sql.Row{{int64(0)}, {int64(48)}},
138137
},
139138
},

0 commit comments

Comments
 (0)