[to #51227337] fix ObExecEnv restoration after PL execution

This commit is contained in:
0xacc
2023-08-02 01:18:13 +00:00
committed by ob-robot
parent b62405cffc
commit 21ea0e8b82

View File

@ -955,6 +955,13 @@ int ObPLContext::set_exec_env(ObPLFunction &routine)
OZ (routine.get_exec_env().store(*session_info_));
OX (need_reset_exec_env_ = true);
}
// always restore sql_mode in mysql mode,
// because sql_mode may be change inside PL.
if (OB_SUCC(ret) && lib::is_mysql_mode()) {
OX(need_reset_exec_env_ = true);
}
return ret;
}