[Bug] (plsql) procedure call to a non existing procedure, returning success (#31019)

Issue Number: close. #31018

state was set OK even in failure case. changed it.
This commit is contained in:
Vallish Pai
2024-02-18 09:09:25 +05:30
committed by yiguolei
parent a3c78dd21a
commit 33aaacf2fa

View File

@ -49,10 +49,11 @@ public class PlSqlOperation {
result.reset();
try {
Arguments args = new Arguments();
args.parse(new String[] {"-e", statement});
args.parse(new String[] { "-e", statement });
exec.parseAndEval(args);
// Exception is not thrown after catch.
// For example, select a not exist table will return empty results, exception will put into signals.
// For example, select a not exist table will return empty results, exception
// will put into signals.
exec.printExceptions();
String error = result.getError();
String msg = result.getMsg();
@ -62,7 +63,6 @@ public class PlSqlOperation {
ctx.getState().setOk(0, 0, msg);
}
ctx.getMysqlChannel().reset();
ctx.getState().setOk();
ctx.setRunProcedure(false);
ctx.setProcedureExec(null);
} catch (Exception e) {