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
Expected: []sql.Row{{"v", "CREATE VIEW `v` AS select 1", "utf8mb4", "utf8mb4_0900_bin"}},
1260
+
},
1261
+
},
1262
+
},
1263
+
{
1264
+
Name: "create procedure queries are implicitly committed",
1265
+
Assertions: []ScriptTestAssertion{
1266
+
{
1267
+
Query: "/* client a */ set @@autocommit = 0;",
1268
+
Expected: []sql.Row{{}},
1269
+
},
1270
+
{
1271
+
Query: "/* client a */ start transaction;",
1272
+
Expected: []sql.Row{},
1273
+
},
1274
+
{
1275
+
// This implicitly commits the transaction
1276
+
Query: "/* client a */ create procedure p() begin select 1; end;",
1277
+
Expected: []sql.Row{{types.OkResult{}}},
1278
+
},
1279
+
{
1280
+
Query: "/* client b */ show create procedure p;",
1281
+
Expected: []sql.Row{{"p", "", "/* client a */ create procedure p() begin select 1; end", "utf8mb4", "utf8mb4_0900_bin", "utf8mb4_0900_bin"}},
1282
+
},
1283
+
},
1284
+
},
1285
+
{
1286
+
Name: "create procedure queries are implicitly committed",
1287
+
Assertions: []ScriptTestAssertion{
1288
+
{
1289
+
Query: "/* client a */ set @@autocommit = 0;",
1290
+
Expected: []sql.Row{{}},
1291
+
},
1292
+
{
1293
+
Query: "/* client a */ start transaction;",
1294
+
Expected: []sql.Row{},
1295
+
},
1296
+
{
1297
+
// This implicitly commits the transaction
1298
+
Query: "/* client a */ create event e on schedule every 1 second starts '2025-01-01' do begin select 1; end;",
1299
+
Expected: []sql.Row{{types.OkResult{}}},
1300
+
},
1301
+
{
1302
+
Query: "/* client b */ show create event e;",
1303
+
Expected: []sql.Row{{"e", "NO_ENGINE_SUBSTITUTION,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES", "SYSTEM", "CREATE DEFINER = `root`@`localhost` EVENT `e` ON SCHEDULE EVERY 1 SECOND STARTS '2025-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO begin select 1; end", "utf8mb4", "utf8mb4_0900_bin", "utf8mb4_0900_bin"}},
1304
+
},
1305
+
},
1306
+
},
1307
+
{
1308
+
Name: "create database queries are implicitly committed",
0 commit comments