Skip to content

Commit affaa51

Browse files
author
James Cor
committed
more tests
1 parent 9eb81c0 commit affaa51

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed

enginetest/queries/procedure_queries.go

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2219,21 +2219,39 @@ end;`,
22192219
Name: "multi recursive procedures",
22202220
SetUpScript: []string{
22212221
`
2222-
create procedure recursive_proc(in counter int)
2222+
create procedure procA(in counter int)
22232223
begin
22242224
set counter := counter + 1;
22252225
if counter > 3 then
2226-
select concat('ended with value: ', counter) as result;
2226+
select concat('ended in procA with value: ', counter) as result;
22272227
else
2228-
call recursive_proc(counter);
2228+
call procB(counter);
22292229
end if;
2230-
end;`,
2230+
end;
2231+
`,
2232+
`
2233+
create procedure procB(in counter int)
2234+
begin
2235+
set counter := counter + 1;
2236+
if counter > 3 then
2237+
select concat('ended in procB with value: ', counter) as result;
2238+
else
2239+
call procA(counter);
2240+
end if;
2241+
end;
2242+
`,
22312243
},
22322244
Assertions: []ScriptTestAssertion{
22332245
{
2234-
Query: "call recursive_proc(1);",
2246+
Query: "call procA(1);",
22352247
Expected: []sql.Row{
2236-
{"ended with value: 4"},
2248+
{"ended in procA with value: 4"},
2249+
},
2250+
},
2251+
{
2252+
Query: "call procB(1);",
2253+
Expected: []sql.Row{
2254+
{"ended in procB with value: 4"},
22372255
},
22382256
},
22392257
},

0 commit comments

Comments
 (0)