You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/09/24 01:38:01 UTC
[GitHub] [incubator-shardingsphere] cherrylzhao commented on a change in
pull request #3093: Fix SCTL statement execute error with comments
cherrylzhao commented on a change in pull request #3093: Fix SCTL statement execute error with comments
URL: https://github.com/apache/incubator-shardingsphere/pull/3093#discussion_r327394690
##########
File path: sharding-proxy/sharding-proxy-backend/src/main/java/org/apache/shardingsphere/shardingproxy/backend/text/TextProtocolBackendHandlerFactory.java
##########
@@ -60,8 +66,9 @@
* @return instance of text protocol backend handler
*/
public static TextProtocolBackendHandler newInstance(final DatabaseType databaseType, final String sql, final BackendConnection backendConnection) {
- if (sql.toUpperCase().startsWith(ShardingCTLBackendHandlerFactory.SCTL)) {
- return ShardingCTLBackendHandlerFactory.newInstance(sql, backendConnection);
+ final String trimCommentSQL = trimSqlComment(sql);
Review comment:
it's better to move trimComentSQL logic to `ShardingCTLBackendHandlerFactory`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services