[fix](prepare statement) Not supported such prepared statement if prepare a forward master sql (#26512)
This commit is contained in:
@ -531,6 +531,9 @@ public class StmtExecutor {
|
||||
if (logicalPlan instanceof Forward) {
|
||||
redirectStatus = ((Forward) logicalPlan).toRedirectStatus();
|
||||
if (isForwardToMaster()) {
|
||||
if (context.getCommand() == MysqlCommand.COM_STMT_PREPARE) {
|
||||
throw new UserException("Forward master command is not supported for prepare statement");
|
||||
}
|
||||
if (isProxy) {
|
||||
// This is already a stmt forwarded from other FE.
|
||||
// If we goes here, means we can't find a valid Master FE(some error happens).
|
||||
@ -704,6 +707,9 @@ public class StmtExecutor {
|
||||
queryAnalysisSpan.end();
|
||||
}
|
||||
if (isForwardToMaster()) {
|
||||
if (context.getCommand() == MysqlCommand.COM_STMT_PREPARE) {
|
||||
throw new UserException("Forward master command is not supported for prepare statement");
|
||||
}
|
||||
if (isProxy) {
|
||||
// This is already a stmt forwarded from other FE.
|
||||
// If goes here, which means we can't find a valid Master FE(some error happens).
|
||||
|
||||
Reference in New Issue
Block a user