Skip to content

Commit 9fc0d7e

Browse files
committed
amend tests
1 parent 38d8d4f commit 9fc0d7e

File tree

1 file changed

+14
-31
lines changed

1 file changed

+14
-31
lines changed

enginetest/queries/script_queries.go

Lines changed: 14 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
package queries
1616

1717
import (
18-
"github.com/dolthub/vitess/go/mysql"
1918
"math"
2019
"time"
2120

@@ -123,105 +122,89 @@ type ScriptTestAssertion struct {
123122
var ScriptTests = []ScriptTest{
124123
{
125124
// https://github.com/dolthub/dolt/issues/9836
125+
Skip: true,
126126
Name: "Ordering by pk does not change the order of results",
127127
SetUpScript: []string{
128128
"CREATE TABLE test_cast(pk VARCHAR(50) PRIMARY KEY)",
129-
"INSERT INTO test_cast VALUES (' 3 12 4'), ('3. 12 4'), ('3.2 12 4'), ('-3.1234'), ('-3.1a'), ('-5+8'), ('+3.1234'), ('11-5'), ('1a1'), ('2,345'), ('4,12'), ('5.932887e+07'), ('5.932887e+07abc'), ('5.932887e7'), ('5.932887e7abc'), ('a1a1')",
129+
"INSERT INTO test_cast VALUES (' 3 12 4'), ('3. 12 4'), ('3.2 12 4'), ('-3.1234'), ('-3.1a'), ('-5+8'), ('+3.1234')",
130130
},
131131
Assertions: []ScriptTestAssertion{
132132
{
133-
Skip: true,
134-
Query: "SELECT cast(pk as signed) FROM test_cast ORDER BY pk",
135-
Expected: []sql.Row{{3}, {-3}, {-3}, {-5}, {3}, {11}, {1}, {2}, {3}, {3}, {4}, {5}, {5}, {5}, {5}, {0}},
136-
ExpectedWarningsCount: 16,
137-
ExpectedWarning: mysql.ERTruncatedWrongValue,
138-
},
139-
{
140-
Skip: true,
141-
Query: "SELECT cast(pk as unsigned) FROM test_cast ORDER BY pk",
142-
Expected: []sql.Row{{uint64(3)}, {uint64(18446744073709551613)}, {uint64(18446744073709551613)}, {uint64(18446744073709551611)}, {uint64(3)}, {uint64(11)}, {uint64(1)}, {uint64(2)}, {uint64(3)}, {uint64(3)}, {uint64(4)}, {uint64(5)}, {uint64(5)}, {uint64(5)}, {uint64(5)}, {uint64(0)}},
143-
ExpectedWarningsCount: 19,
144-
ExpectedWarning: mysql.ERTruncatedWrongValue,
145-
},
146-
{
147-
Skip: true,
148-
Query: "SELECT cast(pk as double) FROM test_cast ORDER BY pk",
149-
Expected: []sql.Row{{3.0}, {-3.1234}, {-3.1}, {-5.0}, {3.1234}, {11.0}, {1.0}, {2.0}, {3.0}, {3.2}, {4.0}, {59328870.0}, {59328870.0}, {59328870.0}, {59328870.0}, {0.0}},
150-
ExpectedWarningsCount: 9,
151-
ExpectedWarning: mysql.ERTruncatedWrongValue,
133+
Query: "SELECT pk FROM test ORDER BY pk",
134+
Expected: []sql.Row{{" 3 12 4"}, {"-3.1234"}, {"-3.1a"}, {"-5+8"}, {"+3.1234"}, {"3. 12 4"}, {"3.2 12 4"}},
152135
},
153136
},
154137
},
155138
{
156139
// https://github.com/dolthub/dolt/issues/9812
157-
Name: "String-to-number comparison operators should behave consistently",
140+
Name: "String-to-number comparison operators should behave consistently",
158141
Assertions: []ScriptTestAssertion{
159142
{
160-
Dialect: "mysql",
143+
Dialect: "mysql",
161144
Query: "SELECT ('A') = (0)",
162145
Expected: []sql.Row{{true}},
163146
//ExpectedWarningsCount: 1,
164147
//ExpectedWarning: mysql.ERTruncatedWrongValue,
165148
//ExpectedWarningMessageSubstring: "Truncated incorrect double value: A",
166149
},
167150
{
168-
Dialect: "mysql",
151+
Dialect: "mysql",
169152
Query: "SELECT ('A') IN (0)",
170153
Expected: []sql.Row{{true}},
171154
//ExpectedWarningsCount: 1,
172155
//ExpectedWarning: mysql.ERTruncatedWrongValue,
173156
//ExpectedWarningMessageSubstring: "Truncated incorrect double value: A",
174157
},
175158
{
176-
Dialect: "mysql",
159+
Dialect: "mysql",
177160
Query: "SELECT ('A') != (0)",
178161
Expected: []sql.Row{{false}},
179162
//ExpectedWarningsCount: 1,
180163
//ExpectedWarning: mysql.ERTruncatedWrongValue,
181164
//ExpectedWarningMessageSubstring: "Truncated incorrect double value: A",
182165
},
183166
{
184-
Dialect: "mysql",
167+
Dialect: "mysql",
185168
Query: "SELECT ('A') <> (0)",
186169
Expected: []sql.Row{{false}},
187170
//ExpectedWarningsCount: 1,
188171
//ExpectedWarning: mysql.ERTruncatedWrongValue,
189172
//ExpectedWarningMessageSubstring: "Truncated incorrect double value: A",
190173
},
191174
{
192-
Dialect: "mysql",
175+
Dialect: "mysql",
193176
Query: "SELECT ('A') < (0)",
194177
Expected: []sql.Row{{false}},
195178
//ExpectedWarningsCount: 1,
196179
//ExpectedWarning: mysql.ERTruncatedWrongValue,
197180
//ExpectedWarningMessageSubstring: "Truncated incorrect double value: A",
198181
},
199182
{
200-
Dialect: "mysql",
183+
Dialect: "mysql",
201184
Query: "SELECT ('A') <= (0)",
202185
Expected: []sql.Row{{true}},
203186
//ExpectedWarningsCount: 1,
204187
//ExpectedWarning: mysql.ERTruncatedWrongValue,
205188
//ExpectedWarningMessageSubstring: "Truncated incorrect double value: A",
206189
},
207190
{
208-
Dialect: "mysql",
191+
Dialect: "mysql",
209192
Query: "SELECT ('A') > (0)",
210193
Expected: []sql.Row{{false}},
211194
//ExpectedWarningsCount: 1,
212195
//ExpectedWarning: mysql.ERTruncatedWrongValue,
213196
//ExpectedWarningMessageSubstring: "Truncated incorrect double value: A",
214197
},
215198
{
216-
Dialect: "mysql",
199+
Dialect: "mysql",
217200
Query: "SELECT ('A') >= (0)",
218201
Expected: []sql.Row{{true}},
219202
//ExpectedWarningsCount: 1,
220203
//ExpectedWarning: mysql.ERTruncatedWrongValue,
221204
//ExpectedWarningMessageSubstring: "Truncated incorrect double value: A",
222205
},
223206
{
224-
Dialect: "mysql",
207+
Dialect: "mysql",
225208
Query: "SELECT ('A') NOT IN (0)",
226209
Expected: []sql.Row{{false}},
227210
//ExpectedWarningsCount: 1,

0 commit comments

Comments
 (0)