Skip to content

Commit

Permalink
[Fix](Branch-2.1) fix fallback to legacy planner when set group commi…
Browse files Browse the repository at this point in the history
…t in session variable
  • Loading branch information
eldenmoon committed Oct 16, 2024
1 parent e562162 commit 717885c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@ public void executeQuery(MysqlCommand mysqlCommand, String originStmt) throws Ex
long parseSqlStartTime = System.currentTimeMillis();
List<StatementBase> cachedStmts = null;
CacheKeyType cacheKeyType = null;
if (!sessionVariable.isEnableInsertGroupCommit() && sessionVariable.isEnableNereidsPlanner()) {
boolean isGroupCommitFromPreparedStatement =
sessionVariable.isEnableInsertGroupCommit() && mysqlCommand != MysqlCommand.COM_QUERY;
if (!isGroupCommitFromPreparedStatement && sessionVariable.isEnableNereidsPlanner()) {
if (wantToParseSqlFromSqlCache) {
cachedStmts = parseFromSqlCache(originStmt);
Optional<SqlCacheContext> sqlCacheContext = ConnectContext.get()
Expand Down

0 comments on commit 717885c

Please sign in to comment.