Skip to content

Commit

Permalink
fix p0
Browse files Browse the repository at this point in the history
  • Loading branch information
LiBinfeng-01 committed Oct 24, 2024
1 parent d28d6c5 commit 6941e36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ public Map<String, Optional<String>> getParameters() {
* @param context statement context
*/
public void setVarOnceInSql(StatementContext context) {
if (context == null) {
return;
}
SessionVariable sessionVariable = context.getConnectContext().getSessionVariable();
// set temporary session value, and then revert value in the 'finally block' of StmtExecutor#execute
sessionVariable.setIsSingleSetVar(true);
Expand Down
2 changes: 1 addition & 1 deletion regression-test/suites/nereids_syntax_p0/system_var.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ suite("nereids_sys_var") {
// set an invalid parameter, and throw an exception
test {
sql "select /*+SET_VAR(runtime_filter_type=10000)*/ * from supplier limit 10"
exception "Unexpected exception: Can not set session variable"
exception "errCode"
}

sql "select @@session.time_zone"
Expand Down

0 comments on commit 6941e36

Please sign in to comment.