Skip to content

Commit de17565

Browse files
author
James Cor
committed
revert
1 parent 9607c55 commit de17565

File tree

1 file changed

+11
-29
lines changed

1 file changed

+11
-29
lines changed

enginetest/memory_engine_test.go

Lines changed: 11 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -202,41 +202,23 @@ func TestSingleQueryPrepared(t *testing.T) {
202202

203203
// Convenience test for debugging a single query. Unskip and set to the desired query.
204204
func TestSingleScript(t *testing.T) {
205-
//t.Skip()
205+
t.Skip()
206206
var scripts = []queries.ScriptTest{
207207
{
208-
Name: "Group Concat Subquery ORDER BY Additional Edge Cases",
209-
Dialect: "mysql",
210-
SetUpScript: []string{
211-
"CREATE TABLE complex_test (id INT PRIMARY KEY, name VARCHAR(50), value INT, category VARCHAR(10), created_at DATE);",
212-
"INSERT INTO complex_test VALUES (1, 'Alpha', 100, 'X', '2023-01-01');",
213-
"INSERT INTO complex_test VALUES (2, 'Beta', 50, 'Y', '2023-01-15');",
214-
"INSERT INTO complex_test VALUES (3, 'Gamma', 75, 'X', '2023-02-01');",
215-
"INSERT INTO complex_test VALUES (4, 'Delta', 25, 'Z', '2023-02-15');",
216-
"INSERT INTO complex_test VALUES (5, 'Epsilon', 90, 'Y', '2023-03-01');",
217-
},
208+
Name: "AS OF propagates to nested CALLs",
209+
SetUpScript: []string{},
218210
Assertions: []queries.ScriptTestAssertion{
219211
{
220-
// Test with subquery using aggregate functions with HAVING
221-
Skip: true,
222-
Query: "SELECT category, GROUP_CONCAT(name ORDER BY (SELECT AVG(value), name FROM complex_test c2 WHERE c2.id <= complex_test.id HAVING AVG(value) > 50) DESC) FROM complex_test GROUP BY category ORDER BY category",
223-
ExpectedErr: sql.ErrInvalidOperandColumns,
224-
},
225-
{
226-
// Test with subquery using aggregate functions with HAVING
227-
Skip: true,
228-
Query: "SELECT category, GROUP_CONCAT(name ORDER BY (SELECT AVG(value) FROM complex_test c2 WHERE c2.id <= complex_test.id HAVING AVG(value) > 50) DESC) FROM complex_test GROUP BY category ORDER BY category",
212+
Query: "create procedure create_proc() create table t (i int primary key, j int);",
229213
Expected: []sql.Row{
230-
{"X", "Alpha,Gamma"},
231-
{"Y", "Beta,Epsilon"},
232-
{"Z", "Delta"},
214+
{types.NewOkResult(0)},
233215
},
234216
},
235217
{
236-
// Test with nested subqueries
237-
//Skip: true,
238-
Query: "SELECT GROUP_CONCAT(name ORDER BY (SELECT SUM(value) FROM complex_test c2 WHERE c2.value != (SELECT MIN(value) FROM complex_test c3 where c3.id = complex_test.id))) FROM complex_test;",
239-
Expected: []sql.Row{{"Alpha,Epsilon,Gamma,Beta,Delta"}},
218+
Query: "call create_proc()",
219+
Expected: []sql.Row{
220+
{types.NewOkResult(0)},
221+
},
240222
},
241223
},
242224
},
@@ -250,8 +232,8 @@ func TestSingleScript(t *testing.T) {
250232
panic(err)
251233
}
252234

253-
engine.EngineAnalyzer().Debug = true
254-
engine.EngineAnalyzer().Verbose = true
235+
//engine.EngineAnalyzer().Debug = true
236+
//engine.EngineAnalyzer().Verbose = true
255237

256238
enginetest.TestScriptWithEngine(t, engine, harness, test)
257239
}

0 commit comments

Comments
 (0)