File tree Expand file tree Collapse file tree 1 file changed +24
-6
lines changed Expand file tree Collapse file tree 1 file changed +24
-6
lines changed Original file line number Diff line number Diff 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)
22232223begin
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 },
You can’t perform that action at this time.
0 commit comments