You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Convenience test for debugging a single query. Unskip and set to the desired query.
204
204
funcTestSingleScript(t*testing.T) {
205
-
//t.Skip()
205
+
t.Skip()
206
206
varscripts= []queries.ScriptTest{
207
207
{
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{},
218
210
Assertions: []queries.ScriptTestAssertion{
219
211
{
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);",
229
213
Expected: []sql.Row{
230
-
{"X", "Alpha,Gamma"},
231
-
{"Y", "Beta,Epsilon"},
232
-
{"Z", "Delta"},
214
+
{types.NewOkResult(0)},
233
215
},
234
216
},
235
217
{
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;",
0 commit comments