{"action":"closed","issue":{"url":"https://api.github.com/repos/alibaba/druid/issues/1326","repository_url":"https://api.github.com/repos/alibaba/druid","labels_url":"https://api.github.com/repos/alibaba/druid/issues/1326/labels{/name}","comments_url":"https://api.github.com/repos/alibaba/druid/issues/1326/comments","events_url":"https://api.github.com/repos/alibaba/druid/issues/1326/events","html_url":"https://github.com/alibaba/druid/issues/1326","id":164991155,"number":1326,"title":"不支持kill <processlist_id>解析","user":{"login":"terryzhu","id":1276894,"avatar_url":"https://avatars.githubusercontent.com/u/1276894?v=3","gravatar_id":"","url":"https://api.github.com/users/terryzhu","html_url":"https://github.com/terryzhu","followers_url":"https://api.github.com/users/terryzhu/followers","following_url":"https://api.github.com/users/terryzhu/following{/other_user}","gists_url":"https://api.github.com/users/terryzhu/gists{/gist_id}","starred_url":"https://api.github.com/users/terryzhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terryzhu/subscriptions","organizations_url":"https://api.github.com/users/terryzhu/orgs","repos_url":"https://api.github.com/users/terryzhu/repos","events_url":"https://api.github.com/users/terryzhu/events{/privacy}","received_events_url":"https://api.github.com/users/terryzhu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/alibaba/druid/milestones/10","html_url":"https://github.com/alibaba/druid/milestones/1.0.23","labels_url":"https://api.github.com/repos/alibaba/druid/milestones/10/labels","id":1874109,"number":10,"title":"1.0.23","description":"","creator":{"login":"wenshao","id":1166785,"avatar_url":"https://avatars.githubusercontent.com/u/1166785?v=3","gravatar_id":"","url":"https://api.github.com/users/wenshao","html_url":"https://github.com/wenshao","followers_url":"https://api.github.com/users/wenshao/followers","following_url":"https://api.github.com/users/wenshao/following{/other_user}","gists_url":"https://api.github.com/users/wenshao/gists{/gist_id}","starred_url":"https://api.github.com/users/wenshao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wenshao/subscriptions","organizations_url":"https://api.github.com/users/wenshao/orgs","repos_url":"https://api.github.com/users/wenshao/repos","events_url":"https://api.github.com/users/wenshao/events{/privacy}","received_events_url":"https://api.github.com/users/wenshao/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":1,"state":"open","created_at":"2016-07-10T08:52:02Z","updated_at":"2016-07-13T01:24:43Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-07-12T04:19:52Z","updated_at":"2016-07-13T01:24:43Z","closed_at":"2016-07-13T01:24:43Z","body":"mysql数据库支持KILL [CONNECTION | QUERY] processlist_id\r\ndruid库解析必须要让sql带有CONNECTION 或QUERY,与mysql行为不符合\r\n\r\n麻烦修改,谢谢\r\n附带个人修改方案MySqlStatementParser.java :\r\n```java\r\n@Override\r\npublic SQLStatement parseKill() {\r\n    accept(Token.KILL);\r\n\r\n    MySqlKillStatement stmt = new MySqlKillStatement();\r\n\r\n    if (identifierEquals(\"CONNECTION\")) {\r\n        System.out.println(lexer.stringVal());\r\n        stmt.setType(MySqlKillStatement.Type.CONNECTION);\r\n        lexer.nextToken();\r\n    } else if (identifierEquals(\"QUERY\")) {\r\n        stmt.setType(MySqlKillStatement.Type.QUERY);\r\n        lexer.nextToken();\r\n    } else if (lexer.token() == Token.LITERAL_INT) {\r\n        try {\r\n            Long.parseLong(lexer.numberString());\r\n            // if no [QUERY|CONNECTION], the behavior is same as CONNECTION\r\n            // by MYSQL 5.6.24\r\n            stmt.setType(MySqlKillStatement.Type.CONNECTION);\r\n        } catch (Exception e) {\r\n            throw new ParserException(\"not support kill \" + lexer.numberString());\r\n        }\r\n    } else {\r\n        throw new ParserException(\"not support kill type \" + lexer.token());\r\n    }\r\n    SQLExpr threadId = this.exprParser.expr();\r\n    stmt.setThreadId(threadId);\r\n    return stmt;\r\n}\r\n```"}}
{"actor":{"display_login":"wenshao"}}