This is an automated email from the ASF dual-hosted git repository.

duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 9b0ff181b10 Support KILL <processID> command. (#20311)
9b0ff181b10 is described below

commit 9b0ff181b10db8e62b1d571741c496d03f74d9b6
Author: ICannerxy <[email protected]>
AuthorDate: Wed Aug 24 14:56:40 2022 +0800

    Support KILL <processID> command. (#20311)
    
    * Support KILL <processID> command.
    
    * Fix style.
    
    * Fix CI.
    
    * class add `final`
---
 .../infra/binder/SQLStatementContextFactory.java   | 17 +++++---
 .../statement/dal/KillStatementContext.java}       | 31 ++++----------
 .../kernel/model/ExecutionGroupContext.java        |  2 +-
 .../mode/metadata/persist/node/ComputeNode.java    | 22 ++++++++++
 .../process/GovernanceExecuteProcessReporter.java  | 27 ++++++++++++
 .../mode/process/ShowProcessListManager.java       | 37 ++++++++++++++++
 .../process/event/KillProcessIdRequestEvent.java   | 23 ++--------
 .../ClusterContextManagerCoordinator.java          | 37 ++++++++++++++++
 .../status/compute/event/KillProcessIdEvent.java   | 24 +++--------
 .../event/KillProcessIdUnitCompleteEvent.java      | 24 +++--------
 .../watcher/ComputeNodeStateChangedWatcher.java    | 22 ++++++++++
 .../subscriber/ProcessRegistrySubscriber.java      | 39 ++++++++++++++---
 .../admin/mysql/MySQLAdminExecutorCreator.java     |  5 +++
 .../admin/mysql/executor/KillProcessExecutor.java  | 50 ++++++++++++++++++++++
 .../src/main/antlr4/imports/mysql/DALStatement.g4  |  2 +-
 .../impl/MySQLDALStatementSQLVisitor.java          |  2 +-
 .../src/main/resources/case/dal/kill.xml           |  2 +-
 .../src/main/resources/sql/supported/dal/kill.xml  |  2 +-
 18 files changed, 273 insertions(+), 95 deletions(-)

diff --git 
a/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/SQLStatementContextFactory.java
 
b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/SQLStatementContextFactory.java
index 6eb39a5e26b..1e06e57ed5d 100644
--- 
a/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/SQLStatementContextFactory.java
+++ 
b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/SQLStatementContextFactory.java
@@ -21,15 +21,16 @@ import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
 import 
org.apache.shardingsphere.infra.binder.statement.CommonSQLStatementContext;
 import org.apache.shardingsphere.infra.binder.statement.SQLStatementContext;
-import 
org.apache.shardingsphere.infra.binder.statement.dal.AnalyzeTableStatementContext;
 import 
org.apache.shardingsphere.infra.binder.statement.dal.ExplainStatementContext;
-import 
org.apache.shardingsphere.infra.binder.statement.dal.FlushStatementContext;
-import 
org.apache.shardingsphere.infra.binder.statement.dal.OptimizeTableStatementContext;
 import 
org.apache.shardingsphere.infra.binder.statement.dal.ShowColumnsStatementContext;
 import 
org.apache.shardingsphere.infra.binder.statement.dal.ShowCreateTableStatementContext;
+import 
org.apache.shardingsphere.infra.binder.statement.dal.ShowTablesStatementContext;
 import 
org.apache.shardingsphere.infra.binder.statement.dal.ShowIndexStatementContext;
 import 
org.apache.shardingsphere.infra.binder.statement.dal.ShowTableStatusStatementContext;
-import 
org.apache.shardingsphere.infra.binder.statement.dal.ShowTablesStatementContext;
+import 
org.apache.shardingsphere.infra.binder.statement.dal.AnalyzeTableStatementContext;
+import 
org.apache.shardingsphere.infra.binder.statement.dal.FlushStatementContext;
+import 
org.apache.shardingsphere.infra.binder.statement.dal.OptimizeTableStatementContext;
+import 
org.apache.shardingsphere.infra.binder.statement.dal.KillStatementContext;
 import 
org.apache.shardingsphere.infra.binder.statement.dcl.DenyUserStatementContext;
 import 
org.apache.shardingsphere.infra.binder.statement.dcl.GrantStatementContext;
 import 
org.apache.shardingsphere.infra.binder.statement.dcl.RevokeStatementContext;
@@ -97,12 +98,13 @@ import 
org.apache.shardingsphere.sql.parser.sql.common.statement.dml.DoStatement
 import 
org.apache.shardingsphere.sql.parser.sql.common.statement.dml.InsertStatement;
 import 
org.apache.shardingsphere.sql.parser.sql.common.statement.dml.SelectStatement;
 import 
org.apache.shardingsphere.sql.parser.sql.common.statement.dml.UpdateStatement;
-import 
org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dal.MySQLOptimizeTableStatement;
 import 
org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dal.MySQLShowColumnsStatement;
 import 
org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dal.MySQLShowCreateTableStatement;
-import 
org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dal.MySQLShowIndexStatement;
 import 
org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dal.MySQLShowTableStatusStatement;
 import 
org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dal.MySQLShowTablesStatement;
+import 
org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dal.MySQLShowIndexStatement;
+import 
org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dal.MySQLOptimizeTableStatement;
+import 
org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dal.MySQLKillStatement;
 import 
org.apache.shardingsphere.sql.parser.sql.dialect.statement.opengauss.ddl.OpenGaussCursorStatement;
 import 
org.apache.shardingsphere.sql.parser.sql.dialect.statement.sqlserver.dcl.SQLServerDenyUserStatement;
 
@@ -286,6 +288,9 @@ public final class SQLStatementContextFactory {
         if (sqlStatement instanceof MySQLOptimizeTableStatement) {
             return new 
OptimizeTableStatementContext((MySQLOptimizeTableStatement) sqlStatement);
         }
+        if (sqlStatement instanceof MySQLKillStatement) {
+            return new KillStatementContext((MySQLKillStatement) sqlStatement);
+        }
         return new CommonSQLStatementContext<>(sqlStatement);
     }
 }
diff --git 
a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutionGroupContext.java
 
b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/statement/dal/KillStatementContext.java
similarity index 51%
copy from 
shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutionGroupContext.java
copy to 
shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/statement/dal/KillStatementContext.java
index 30ec315c68c..8f97e503bb6 100644
--- 
a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutionGroupContext.java
+++ 
b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/statement/dal/KillStatementContext.java
@@ -15,32 +15,17 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.infra.executor.kernel.model;
+package org.apache.shardingsphere.infra.binder.statement.dal;
 
-import lombok.Getter;
-import lombok.RequiredArgsConstructor;
-import lombok.Setter;
-import org.apache.shardingsphere.infra.metadata.user.Grantee;
-
-import java.util.Collection;
-import java.util.UUID;
-import java.util.concurrent.ThreadLocalRandom;
+import 
org.apache.shardingsphere.infra.binder.statement.CommonSQLStatementContext;
+import 
org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dal.MySQLKillStatement;
 
 /**
- * Execution group context.
- *
- * @param <T> type of execution input value
+ * Kill process statement.
  */
-@RequiredArgsConstructor
-@Getter
-@Setter
-public final class ExecutionGroupContext<T> {
-    
-    private final Collection<ExecutionGroup<T>> inputGroups;
-    
-    private final String executionID = new 
UUID(ThreadLocalRandom.current().nextLong(), 
ThreadLocalRandom.current().nextLong()).toString();
-    
-    private volatile String databaseName;
+public final class KillStatementContext extends 
CommonSQLStatementContext<MySQLKillStatement> {
     
-    private volatile Grantee grantee;
+    public KillStatementContext(final MySQLKillStatement sqlStatement) {
+        super(sqlStatement);
+    }
 }
diff --git 
a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutionGroupContext.java
 
b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutionGroupContext.java
index 30ec315c68c..d30d00d7eb4 100644
--- 
a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutionGroupContext.java
+++ 
b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutionGroupContext.java
@@ -38,7 +38,7 @@ public final class ExecutionGroupContext<T> {
     
     private final Collection<ExecutionGroup<T>> inputGroups;
     
-    private final String executionID = new 
UUID(ThreadLocalRandom.current().nextLong(), 
ThreadLocalRandom.current().nextLong()).toString();
+    private final String executionID = new 
UUID(ThreadLocalRandom.current().nextLong(), 
ThreadLocalRandom.current().nextLong()).toString().replaceAll("-", "");
     
     private volatile String databaseName;
     
diff --git 
a/shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/metadata/persist/node/ComputeNode.java
 
b/shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/metadata/persist/node/ComputeNode.java
index 835eb42400f..8f854249dd1 100644
--- 
a/shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/metadata/persist/node/ComputeNode.java
+++ 
b/shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/metadata/persist/node/ComputeNode.java
@@ -37,6 +37,8 @@ public final class ComputeNode {
     
     private static final String PROCESS_TRIGGER = "process_trigger";
     
+    private static final String PROCESS_KILL = "process_kill";
+    
     private static final String STATUS_NODE = "status";
     
     private static final String WORKER_ID = "worker_id";
@@ -80,6 +82,15 @@ public final class ComputeNode {
         return String.join("/", "", ROOT_NODE, COMPUTE_NODE, PROCESS_TRIGGER);
     }
     
+    /**
+     * Get process kill node path.
+     *
+     * @return path of process kill node path
+     */
+    public static String getProcessKillNodePatch() {
+        return String.join("/", "", ROOT_NODE, COMPUTE_NODE, PROCESS_KILL);
+    }
+    
     /**
      * Get process trigger instance show process list id node path.
      *
@@ -91,6 +102,17 @@ public final class ComputeNode {
         return String.join("/", "", ROOT_NODE, COMPUTE_NODE, PROCESS_TRIGGER, 
String.join(":", instanceId, showProcessListId));
     }
     
+    /**
+     * Get process kill instance id node path.
+     *
+     * @param instanceId instance id
+     * @param processId process id
+     * @return path of process kill instance id node path
+     */
+    public static String getProcessKillInstanceIdNodePath(final String 
instanceId, final String processId) {
+        return String.join("/", "", ROOT_NODE, COMPUTE_NODE, PROCESS_KILL, 
String.join(":", instanceId, processId));
+    }
+    
     /**
      * Get compute node instance labels path.
      *
diff --git 
a/shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/process/GovernanceExecuteProcessReporter.java
 
b/shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/process/GovernanceExecuteProcessReporter.java
index 1cecba4cc0c..2c33300ffe8 100644
--- 
a/shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/process/GovernanceExecuteProcessReporter.java
+++ 
b/shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/process/GovernanceExecuteProcessReporter.java
@@ -18,8 +18,10 @@
 package org.apache.shardingsphere.mode.process;
 
 import org.apache.shardingsphere.infra.binder.QueryContext;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup;
 import 
org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroupContext;
 import 
org.apache.shardingsphere.infra.executor.sql.execute.engine.SQLExecutionUnit;
+import 
org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutionUnit;
 import 
org.apache.shardingsphere.infra.executor.sql.process.model.ExecuteProcessConstants;
 import 
org.apache.shardingsphere.infra.executor.sql.process.model.ExecuteProcessContext;
 import 
org.apache.shardingsphere.infra.executor.sql.process.model.ExecuteProcessUnit;
@@ -28,6 +30,10 @@ import 
org.apache.shardingsphere.infra.executor.sql.process.model.yaml.YamlExecu
 import 
org.apache.shardingsphere.infra.executor.sql.process.spi.ExecuteProcessReporter;
 import org.apache.shardingsphere.infra.util.eventbus.EventBusContext;
 
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * Governance execute process reporter.
  */
@@ -38,6 +44,7 @@ public final class GovernanceExecuteProcessReporter 
implements ExecuteProcessRep
                        final ExecuteProcessConstants constants, final 
EventBusContext eventBusContext) {
         ExecuteProcessContext executeProcessContext = new 
ExecuteProcessContext(queryContext.getSql(), executionGroupContext, constants);
         
ShowProcessListManager.getInstance().putProcessContext(executeProcessContext.getExecutionID(),
 new YamlExecuteProcessContext(executeProcessContext));
+        
ShowProcessListManager.getInstance().putProcessStatement(executeProcessContext.getExecutionID(),
 collectProcessStatement(executionGroupContext));
     }
     
     @Override
@@ -60,10 +67,30 @@ public final class GovernanceExecuteProcessReporter 
implements ExecuteProcessRep
             }
         }
         ShowProcessListManager.getInstance().removeProcessContext(executionID);
+        
ShowProcessListManager.getInstance().removeProcessStatement(executionID);
     }
     
     @Override
     public void reportClean(final String executionID) {
         ShowProcessListManager.getInstance().removeProcessContext(executionID);
     }
+
+    private List<Statement> collectProcessStatement(final 
ExecutionGroupContext<? extends SQLExecutionUnit> executionGroupContext) {
+        List<Statement> result = new ArrayList<>();
+        if (null == executionGroupContext.getInputGroups()) {
+            return result;
+        }
+        for (ExecutionGroup<? extends SQLExecutionUnit> inputGroup : 
executionGroupContext.getInputGroups()) {
+            if (null == inputGroup.getInputs()) {
+                continue;
+            }
+            for (SQLExecutionUnit executionUnit : inputGroup.getInputs()) {
+                if (executionUnit instanceof JDBCExecutionUnit) {
+                    JDBCExecutionUnit jdbcExecutionUnit = (JDBCExecutionUnit) 
executionUnit;
+                    result.add(jdbcExecutionUnit.getStorageResource());
+                }
+            }
+        }
+        return result;
+    }
 }
diff --git 
a/shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/process/ShowProcessListManager.java
 
b/shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/process/ShowProcessListManager.java
index c57492fdb06..c1f3e868f1f 100644
--- 
a/shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/process/ShowProcessListManager.java
+++ 
b/shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/process/ShowProcessListManager.java
@@ -23,7 +23,9 @@ import lombok.NoArgsConstructor;
 import 
org.apache.shardingsphere.infra.executor.sql.process.model.yaml.YamlExecuteProcessContext;
 import org.apache.shardingsphere.mode.process.lock.ShowProcessListSimpleLock;
 
+import java.sql.Statement;
 import java.util.Collection;
+import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
@@ -38,6 +40,9 @@ public final class ShowProcessListManager {
     @Getter
     private final Map<String, YamlExecuteProcessContext> processContextMap = 
new ConcurrentHashMap<>();
     
+    @Getter
+    private final Map<String, List<Statement>> processStatementMap = new 
ConcurrentHashMap<>();
+    
     @Getter
     private final Map<String, ShowProcessListSimpleLock> locks = new 
ConcurrentHashMap<>();
     
@@ -60,6 +65,19 @@ public final class ShowProcessListManager {
         processContextMap.put(executionId, processContext);
     }
     
+    /**
+     * Put process statements.
+     *
+     * @param executionId execution id
+     * @param statements statements
+     */
+    public void putProcessStatement(final String executionId, final 
List<Statement> statements) {
+        if (statements.isEmpty()) {
+            return;
+        }
+        processStatementMap.put(executionId, statements);
+    }
+    
     /**
      * Get execute process context.
      * 
@@ -70,6 +88,16 @@ public final class ShowProcessListManager {
         return processContextMap.get(executionId);
     }
     
+    /**
+     * Get execute process statement.
+     *
+     * @param executionId execution id
+     * @return execute statements
+     */
+    public List<Statement> getProcessStatement(final String executionId) {
+        return processStatementMap.get(executionId);
+    }
+    
     /**
      * Remove execute process context.
      * 
@@ -79,6 +107,15 @@ public final class ShowProcessListManager {
         processContextMap.remove(executionId);
     }
     
+    /**
+     * Remove execute process statement.
+     *
+     * @param executionId execution id
+     */
+    public void removeProcessStatement(final String executionId) {
+        processStatementMap.remove(executionId);
+    }
+    
     /**
      * Get all execute process context.
      * 
diff --git 
a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutionGroupContext.java
 
b/shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/process/event/KillProcessIdRequestEvent.java
similarity index 57%
copy from 
shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutionGroupContext.java
copy to 
shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/process/event/KillProcessIdRequestEvent.java
index 30ec315c68c..5bc5cd35a4c 100644
--- 
a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutionGroupContext.java
+++ 
b/shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/process/event/KillProcessIdRequestEvent.java
@@ -15,32 +15,17 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.infra.executor.kernel.model;
+package org.apache.shardingsphere.mode.process.event;
 
 import lombok.Getter;
 import lombok.RequiredArgsConstructor;
-import lombok.Setter;
-import org.apache.shardingsphere.infra.metadata.user.Grantee;
-
-import java.util.Collection;
-import java.util.UUID;
-import java.util.concurrent.ThreadLocalRandom;
 
 /**
- * Execution group context.
- *
- * @param <T> type of execution input value
+ * Kill process id request event.
  */
 @RequiredArgsConstructor
 @Getter
-@Setter
-public final class ExecutionGroupContext<T> {
-    
-    private final Collection<ExecutionGroup<T>> inputGroups;
-    
-    private final String executionID = new 
UUID(ThreadLocalRandom.current().nextLong(), 
ThreadLocalRandom.current().nextLong()).toString();
-    
-    private volatile String databaseName;
+public final class KillProcessIdRequestEvent {
     
-    private volatile Grantee grantee;
+    private final String processId;
 }
diff --git 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/ClusterContextManagerCoordinator.java
 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/ClusterContextManagerCoordinator.java
index 63ddf225f0f..10a7b375337 100644
--- 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/ClusterContextManagerCoordinator.java
+++ 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/ClusterContextManagerCoordinator.java
@@ -41,6 +41,8 @@ import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.metad
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.metadata.event.SchemaDeletedEvent;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.InstanceOfflineEvent;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.InstanceOnlineEvent;
+import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.KillProcessIdEvent;
+import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.KillProcessIdUnitCompleteEvent;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.LabelsEvent;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.ShowProcessListTriggerEvent;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.ShowProcessListUnitCompleteEvent;
@@ -58,8 +60,10 @@ import 
org.apache.shardingsphere.mode.process.lock.ShowProcessListSimpleLock;
 import org.apache.shardingsphere.mode.process.node.ProcessNode;
 
 import java.sql.SQLException;
+import java.sql.Statement;
 import java.util.Collection;
 import java.util.LinkedList;
+import java.util.List;
 import java.util.Map;
 import java.util.Optional;
 import java.util.stream.Collectors;
@@ -296,6 +300,26 @@ public final class ClusterContextManagerCoordinator {
         
registryCenter.getRepository().delete(ComputeNode.getProcessTriggerInstanceIdNodePath(event.getInstanceId(),
 event.getShowProcessListId()));
     }
     
+    /**
+     * Trigger show process list.
+     *
+     * @param event show process list trigger event
+     * @throws SQLException SQL exception
+     */
+    @Subscribe
+    public synchronized void killProcessId(final KillProcessIdEvent event) 
throws SQLException {
+        if 
(!event.getInstanceId().equals(contextManager.getInstanceContext().getInstance().getMetaData().getId()))
 {
+            return;
+        }
+        List<Statement> statements = 
ShowProcessListManager.getInstance().getProcessStatement(event.getProcessId());
+        if (!statements.isEmpty()) {
+            for (Statement statement : statements) {
+                statement.cancel();
+            }
+        }
+        
registryCenter.getRepository().delete(ComputeNode.getProcessKillInstanceIdNodePath(event.getInstanceId(),
 event.getProcessId()));
+    }
+    
     /**
      * Complete unit show process list.
      *
@@ -309,6 +333,19 @@ public final class ClusterContextManagerCoordinator {
         }
     }
     
+    /**
+     * Complete unit kill process id.
+     *
+     * @param event kill process id unit complete event
+     */
+    @Subscribe
+    public synchronized void completeUnitKillProcessId(final 
KillProcessIdUnitCompleteEvent event) {
+        ShowProcessListSimpleLock simpleLock = 
ShowProcessListManager.getInstance().getLocks().get(event.getShowProcessListId());
+        if (null != simpleLock) {
+            simpleLock.doNotify();
+        }
+    }
+    
     private void disableDataSources() {
         
contextManager.getMetaDataContexts().getMetaData().getDatabases().forEach((key, 
value) -> value.getRuleMetaData().getRules().forEach(each -> {
             if (each instanceof StaticDataSourceContainedRule) {
diff --git 
a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutionGroupContext.java
 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/KillProcessIdEvent.java
similarity index 57%
copy from 
shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutionGroupContext.java
copy to 
shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/KillProcessIdEvent.java
index 30ec315c68c..3813ed639a5 100644
--- 
a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutionGroupContext.java
+++ 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/KillProcessIdEvent.java
@@ -15,32 +15,20 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.infra.executor.kernel.model;
+package 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event;
 
 import lombok.Getter;
 import lombok.RequiredArgsConstructor;
-import lombok.Setter;
-import org.apache.shardingsphere.infra.metadata.user.Grantee;
-
-import java.util.Collection;
-import java.util.UUID;
-import java.util.concurrent.ThreadLocalRandom;
+import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.GovernanceEvent;
 
 /**
- * Execution group context.
- *
- * @param <T> type of execution input value
+ * Kill processID event.
  */
 @RequiredArgsConstructor
 @Getter
-@Setter
-public final class ExecutionGroupContext<T> {
-    
-    private final Collection<ExecutionGroup<T>> inputGroups;
-    
-    private final String executionID = new 
UUID(ThreadLocalRandom.current().nextLong(), 
ThreadLocalRandom.current().nextLong()).toString();
+public final class KillProcessIdEvent implements GovernanceEvent {
     
-    private volatile String databaseName;
+    private final String instanceId;
     
-    private volatile Grantee grantee;
+    private final String processId;
 }
diff --git 
a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutionGroupContext.java
 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/KillProcessIdUnitCompleteEvent.java
similarity index 57%
copy from 
shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutionGroupContext.java
copy to 
shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/KillProcessIdUnitCompleteEvent.java
index 30ec315c68c..52adf617cfa 100644
--- 
a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutionGroupContext.java
+++ 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/KillProcessIdUnitCompleteEvent.java
@@ -15,32 +15,18 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.infra.executor.kernel.model;
+package 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event;
 
 import lombok.Getter;
 import lombok.RequiredArgsConstructor;
-import lombok.Setter;
-import org.apache.shardingsphere.infra.metadata.user.Grantee;
-
-import java.util.Collection;
-import java.util.UUID;
-import java.util.concurrent.ThreadLocalRandom;
+import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.GovernanceEvent;
 
 /**
- * Execution group context.
- *
- * @param <T> type of execution input value
+ * Kill processID unit complete event.
  */
 @RequiredArgsConstructor
 @Getter
-@Setter
-public final class ExecutionGroupContext<T> {
-    
-    private final Collection<ExecutionGroup<T>> inputGroups;
-    
-    private final String executionID = new 
UUID(ThreadLocalRandom.current().nextLong(), 
ThreadLocalRandom.current().nextLong()).toString();
-    
-    private volatile String databaseName;
+public final class KillProcessIdUnitCompleteEvent implements GovernanceEvent {
     
-    private volatile Grantee grantee;
+    private final String showProcessListId;
 }
diff --git 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/watcher/ComputeNodeStateChangedWatcher.java
 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/watcher/ComputeNodeStateChan
 [...]
index f1cb4901998..43f06d23276 100644
--- 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/watcher/ComputeNodeStateChangedWatcher.java
+++ 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/watcher/ComputeNodeStateChangedWatcher.java
@@ -26,6 +26,8 @@ import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.Gover
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.GovernanceWatcher;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.InstanceOfflineEvent;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.InstanceOnlineEvent;
+import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.KillProcessIdEvent;
+import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.KillProcessIdUnitCompleteEvent;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.LabelsEvent;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.ShowProcessListTriggerEvent;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.ShowProcessListUnitCompleteEvent;
@@ -73,6 +75,21 @@ public final class ComputeNodeStateChangedWatcher implements 
GovernanceWatcher<G
             return createInstanceEvent(event);
         } else if 
(event.getKey().startsWith(ComputeNode.getProcessTriggerNodePatch())) {
             return createShowProcessListTriggerEvent(event);
+        } else if 
(event.getKey().startsWith(ComputeNode.getProcessKillNodePatch())) {
+            return createKillProcessIdEvent(event);
+        }
+        return Optional.empty();
+    }
+    
+    private Optional<GovernanceEvent> createKillProcessIdEvent(final 
DataChangedEvent event) {
+        Matcher matcher = getKillProcessIdMatcher(event);
+        if (!matcher.find()) {
+            return Optional.empty();
+        }
+        if (Type.ADDED == event.getType()) {
+            return Optional.of(new KillProcessIdEvent(matcher.group(1), 
matcher.group(2)));
+        } else if (Type.DELETED == event.getType()) {
+            return Optional.of(new 
KillProcessIdUnitCompleteEvent(matcher.group(2)));
         }
         return Optional.empty();
     }
@@ -95,6 +112,11 @@ public final class ComputeNodeStateChangedWatcher 
implements GovernanceWatcher<G
         return Pattern.compile(ComputeNode.getProcessTriggerNodePatch() + 
"/([\\S]+):([\\S]+)$", Pattern.CASE_INSENSITIVE).matcher(event.getKey());
     }
     
+    private static Matcher getKillProcessIdMatcher(final DataChangedEvent 
event) {
+        Pattern pattern = 
Pattern.compile(ComputeNode.getProcessKillNodePatch() + "/([\\S]+):([\\S]+)$", 
Pattern.CASE_INSENSITIVE);
+        return pattern.matcher(event.getKey());
+    }
+    
     private Optional<GovernanceEvent> createInstanceEvent(final 
DataChangedEvent event) {
         Matcher matcher = matchInstanceOnlinePath(event.getKey());
         if (matcher.find()) {
diff --git 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/process/subscriber/ProcessRegistrySubscriber.java
 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/process/subscriber/ProcessRegistrySubscriber.java
index 53577189b3c..b6e4d8aa40b 100644
--- 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/process/subscriber/ProcessRegistrySubscriber.java
+++ 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/process/subscriber/ProcessRegistrySubscriber.java
@@ -23,6 +23,7 @@ import 
org.apache.shardingsphere.infra.util.eventbus.EventBusContext;
 import org.apache.shardingsphere.mode.metadata.persist.node.ComputeNode;
 import org.apache.shardingsphere.mode.persist.PersistRepository;
 import org.apache.shardingsphere.mode.process.ShowProcessListManager;
+import org.apache.shardingsphere.mode.process.event.KillProcessIdRequestEvent;
 import 
org.apache.shardingsphere.mode.process.event.ShowProcessListRequestEvent;
 import 
org.apache.shardingsphere.mode.process.event.ShowProcessListResponseEvent;
 import org.apache.shardingsphere.mode.process.lock.ShowProcessListSimpleLock;
@@ -64,7 +65,7 @@ public final class ProcessRegistrySubscriber {
         Collection<String> triggerPaths = getTriggerPaths(showProcessListId);
         try {
             triggerPaths.forEach(each -> repository.persist(each, ""));
-            triggerIsComplete = waitUntilShowProcessIsReady(showProcessListId, 
triggerPaths);
+            triggerIsComplete = waitAllNodeDataReady(showProcessListId, 
triggerPaths);
             sendShowProcessList(showProcessListId);
         } finally {
             
repository.delete(ProcessNode.getShowProcessListIdPath(showProcessListId));
@@ -74,6 +75,34 @@ public final class ProcessRegistrySubscriber {
         }
     }
     
+    /**
+     * Send kill process command and wait for result.
+     *
+     * @param event get children request event.
+     */
+    @Subscribe
+    public void killProcessId(final KillProcessIdRequestEvent event) {
+        String processId = event.getProcessId();
+        // current saturn processId not exist, maybe in other saturn process.
+        boolean killProcessIdIsComplete = false;
+        Collection<String> processKillPaths = getProcessKillPaths(processId);
+        try {
+            processKillPaths.forEach(each -> repository.persist(each, ""));
+            killProcessIdIsComplete = waitAllNodeDataReady(processId, 
processKillPaths);
+        } finally {
+            if (!killProcessIdIsComplete) {
+                processKillPaths.forEach(repository::delete);
+            }
+        }
+    }
+    
+    private Collection<String> getProcessKillPaths(final String processId) {
+        return Stream.of(InstanceType.values())
+                .flatMap(each -> 
repository.getChildrenKeys(ComputeNode.getOnlineNodePath(each)).stream()
+                        .map(onlinePath -> 
ComputeNode.getProcessKillInstanceIdNodePath(onlinePath, processId)))
+                .collect(Collectors.toList());
+    }
+    
     private Collection<String> getTriggerPaths(final String showProcessListId) 
{
         return Stream.of(InstanceType.values())
                 .flatMap(each -> 
repository.getChildrenKeys(ComputeNode.getOnlineNodePath(each)).stream()
@@ -81,12 +110,12 @@ public final class ProcessRegistrySubscriber {
                 .collect(Collectors.toList());
     }
     
-    private boolean waitUntilShowProcessIsReady(final String 
showProcessListId, final Collection<String> triggerPaths) {
+    private boolean waitAllNodeDataReady(final String showProcessListId, final 
Collection<String> paths) {
         ShowProcessListSimpleLock simpleLock = new ShowProcessListSimpleLock();
         ShowProcessListManager.getInstance().getLocks().put(showProcessListId, 
simpleLock);
         simpleLock.lock();
         try {
-            while (!isReady(triggerPaths)) {
+            while (!isReady(paths)) {
                 if (!simpleLock.awaitDefaultTime()) {
                     return false;
                 }
@@ -98,8 +127,8 @@ public final class ProcessRegistrySubscriber {
         }
     }
     
-    private boolean isReady(final Collection<String> triggerPaths) {
-        return triggerPaths.stream().noneMatch(each -> null != 
repository.get(each));
+    private boolean isReady(final Collection<String> paths) {
+        return paths.stream().noneMatch(each -> null != repository.get(each));
     }
     
     private void sendShowProcessList(final String showProcessListId) {
diff --git 
a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/MySQLAdminExecutorCreator.java
 
b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/MySQLAdminExecutorCreator.java
index 7df8180d909..51f6cbc54a9 100644
--- 
a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/MySQLAdminExecutorCreator.java
+++ 
b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/MySQLAdminExecutorCreator.java
@@ -22,6 +22,7 @@ import 
org.apache.shardingsphere.infra.config.props.ConfigurationPropertyKey;
 import org.apache.shardingsphere.proxy.backend.context.ProxyContext;
 import 
org.apache.shardingsphere.proxy.backend.handler.admin.executor.DatabaseAdminExecutor;
 import 
org.apache.shardingsphere.proxy.backend.handler.admin.executor.DatabaseAdminExecutorCreator;
+import 
org.apache.shardingsphere.proxy.backend.handler.admin.mysql.executor.KillProcessExecutor;
 import 
org.apache.shardingsphere.proxy.backend.handler.admin.mysql.executor.NoResourceShowExecutor;
 import 
org.apache.shardingsphere.proxy.backend.handler.admin.mysql.executor.ShowConnectionIdExecutor;
 import 
org.apache.shardingsphere.proxy.backend.handler.admin.mysql.executor.ShowCreateDatabaseExecutor;
@@ -44,6 +45,7 @@ import 
org.apache.shardingsphere.sql.parser.sql.common.statement.SQLStatement;
 import 
org.apache.shardingsphere.sql.parser.sql.common.statement.dal.SetStatement;
 import 
org.apache.shardingsphere.sql.parser.sql.common.statement.dal.UseStatement;
 import 
org.apache.shardingsphere.sql.parser.sql.common.statement.dml.SelectStatement;
+import 
org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dal.MySQLKillStatement;
 import 
org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dal.MySQLShowCreateDatabaseStatement;
 import 
org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dal.MySQLShowDatabasesStatement;
 import 
org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dal.MySQLShowFunctionStatusStatement;
@@ -91,6 +93,9 @@ public final class MySQLAdminExecutorCreator implements 
DatabaseAdminExecutorCre
         if (sqlStatement instanceof MySQLShowProcessListStatement) {
             return Optional.of(new ShowProcessListExecutor());
         }
+        if (sqlStatement instanceof MySQLKillStatement) {
+            return Optional.of(new KillProcessExecutor((MySQLKillStatement) 
sqlStatement));
+        }
         if (sqlStatement instanceof MySQLShowCreateDatabaseStatement) {
             return Optional.of(new 
ShowCreateDatabaseExecutor((MySQLShowCreateDatabaseStatement) sqlStatement));
         }
diff --git 
a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/KillProcessExecutor.java
 
b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/KillProcessExecutor.java
new file mode 100644
index 00000000000..aa46ce147a7
--- /dev/null
+++ 
b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/KillProcessExecutor.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.proxy.backend.handler.admin.mysql.executor;
+
+import org.apache.shardingsphere.mode.process.event.KillProcessIdRequestEvent;
+import org.apache.shardingsphere.proxy.backend.context.ProxyContext;
+import 
org.apache.shardingsphere.proxy.backend.handler.admin.executor.DatabaseAdminExecutor;
+import org.apache.shardingsphere.proxy.backend.session.ConnectionSession;
+import 
org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dal.MySQLKillStatement;
+
+import java.sql.SQLException;
+
+/**
+ * Kill process executor.
+ */
+public final class KillProcessExecutor implements DatabaseAdminExecutor {
+    
+    private final MySQLKillStatement mySQLKillStatement;
+    
+    public KillProcessExecutor(final MySQLKillStatement sqlStatement) {
+        this.mySQLKillStatement = sqlStatement;
+    }
+    
+    /**
+     * Execute.
+     *
+     * @param connectionSession connection session
+     * @throws SQLException SQLException
+     */
+    @Override
+    public void execute(final ConnectionSession connectionSession) throws 
SQLException {
+        String processlistId = mySQLKillStatement.getProcesslistId();
+        
ProxyContext.getInstance().getContextManager().getInstanceContext().getEventBusContext().post(new
 KillProcessIdRequestEvent(processlistId));
+    }
+}
diff --git 
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/antlr4/imports/mysql/DALStatement.g4
 
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/antlr4/imports/mysql/DALStatement.g4
index 3148e959052..6cd359de33f 100644
--- 
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/antlr4/imports/mysql/DALStatement.g4
+++ 
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/antlr4/imports/mysql/DALStatement.g4
@@ -377,7 +377,7 @@ tablesOption
     ;
 
 kill
-    : KILL (CONNECTION | QUERY)? NUMBER_
+    : KILL (CONNECTION | QUERY)? IDENTIFIER_
     ;
 
 loadIndexInfo
diff --git 
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLDALStatementSQLVisitor.java
 
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLDALStatementSQLVisitor.java
index ac0ce1fc92e..b29faaa6c90 100644
--- 
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLDALStatementSQLVisitor.java
+++ 
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLDALStatementSQLVisitor.java
@@ -481,7 +481,7 @@ public final class MySQLDALStatementSQLVisitor extends 
MySQLStatementSQLVisitor
     @Override
     public ASTNode visitKill(final KillContext ctx) {
         MySQLKillStatement result = new MySQLKillStatement();
-        result.setProcesslistId(ctx.NUMBER_().getText());
+        result.setProcesslistId(ctx.IDENTIFIER_().getText());
         return result;
     }
     
diff --git 
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/dal/kill.xml
 
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/dal/kill.xml
index 88a31810ec2..2f606a152e7 100644
--- 
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/dal/kill.xml
+++ 
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/dal/kill.xml
@@ -17,5 +17,5 @@
   -->
 
 <sql-parser-test-cases>
-    <kill sql-case-id="kill_processlist_id" processlist-id="2" />
+    <kill sql-case-id="kill_processlist_id" processlist-id="abc" />
 </sql-parser-test-cases>
diff --git 
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/dal/kill.xml
 
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/dal/kill.xml
index 4572393e759..76f4344dd97 100644
--- 
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/dal/kill.xml
+++ 
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/dal/kill.xml
@@ -17,5 +17,5 @@
   -->
 
 <sql-cases>
-    <sql-case id="kill_processlist_id" value="KILL 2" db-types="MySQL" />
+    <sql-case id="kill_processlist_id" value="KILL abc" db-types="MySQL" />
 </sql-cases>

Reply via email to