This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new cd9ee9bec11 branch-2.1: [fix](prepare statement)Invalidate old
PrepareBuffer before execute next statement. (#54192)
cd9ee9bec11 is described below
commit cd9ee9bec11b432c34220d677e3e883b9c6ca98e
Author: James <[email protected]>
AuthorDate: Mon Aug 4 18:49:28 2025 +0800
branch-2.1: [fix](prepare statement)Invalidate old PrepareBuffer before
execute next statement. (#54192)
Invalidate old PrepareBuffer before execute next statement.
Fix point_query_p0/test_point_query.groovy
---
.../main/java/org/apache/doris/qe/MysqlConnectProcessor.java | 5 +++++
regression-test/suites/point_query_p0/test_point_query.groovy | 10 ----------
2 files changed, 5 insertions(+), 10 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/qe/MysqlConnectProcessor.java
b/fe/fe-core/src/main/java/org/apache/doris/qe/MysqlConnectProcessor.java
index c54c05ae5bd..010a3a2b02d 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/MysqlConnectProcessor.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/MysqlConnectProcessor.java
@@ -226,6 +226,11 @@ public class MysqlConnectProcessor extends
ConnectProcessor {
Literal l = Literal.getLiteralByMysqlType(type,
isUnsigned, packetBuf);
statementContext.getIdToPlaceholderRealExpr().put(exprId,
l);
}
+ } else {
+ // Invalidate the old PrepareExecuteBuffer from last statement.
+ if (!ctx.isProxy()) {
+ ctx.setPrepareExecuteBuffer(null);
+ }
}
ExecuteCommand executeStmt = new
ExecuteCommand(String.valueOf(stmtId), prepareCommand, statementContext);
// TODO set real origin statement
diff --git a/regression-test/suites/point_query_p0/test_point_query.groovy
b/regression-test/suites/point_query_p0/test_point_query.groovy
index 037d9a29073..3962d76c51c 100644
--- a/regression-test/suites/point_query_p0/test_point_query.groovy
+++ b/regression-test/suites/point_query_p0/test_point_query.groovy
@@ -420,16 +420,6 @@ suite("test_point_query", "nonConcurrent") {
}
}
- def ensure_one_fragment = {
- sql "set enable_nereids_planner=true"
- explain {
- sql "select * from table_with_chars where col1 = 10"
- check { explainStr ->
- assertEquals(1, explainStr.count("PLAN FRAGMENT"))
- }
- }
- }()
-
// test variant type
sql "DROP TABLE IF EXISTS test_with_variant"
sql """
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]