need support the comment(-- XXX) continues to the end of line
-
dble version:
5.6.29-dble-9.9.9.9-3973be7c76d1c0fc2f285a75c4218c27e57febe2-20190725053413 -
preconditions :
no - configs:
server.xml
<user name="test">
<property name="password">111111</property>
<property name="schemas">schema1,schema2,schema3</property>
</user>
-
steps:
step1. execute the following sql:
show databases; -- This comment continues to the end of line
-
expect result:
mysql> show databases; -- This comment continues to the end of line +----------+ | DATABASE | +----------+ | schema1 | | schema2 | | schema3 | +----------+ 3 rows in set (0.01 sec) -
real result:
mysql> show databases; -- This comment continues to the end of line +--------------------+ | Database | +--------------------+ | information_schema | | db1 | | db2 | | db3 | | db4 | | mysql | | performance_schema | | sys | +--------------------+ 8 rows in set (0.00 sec) -
supplements:
1.This sql will execute on one of the DataNode, but it should be execute on dble. The dble.log as below: 2019-07-30 10:43:27.998 DEBUG [$_NIO_REACTOR_FRONT-1-RW] (com.actiontech.dble.net.handler.FrontendAuthenticator.success(FrontendAuthenticator.java:211)) - ServerConnection [id=1, schema=null, host=127.0.0.1, user=test,txIsolation=3, autocommit=true, schema=null]'test' login success 2019-07-30 10:43:28.000 DEBUG [BusinessExecutor0] (com.actiontech.dble.net.FrontendConnection.query(FrontendConnection.java:312)) - ServerConnection [id=1, schema=null, host=127.0.0.1, user=test,txIsolation=3, autocommit=true, schema=null] show databases -- This comment continues to the end of line 2019-07-30 10:43:28.000 DEBUG [BusinessExecutor0] (com.actiontech.dble.server.ServerQueryHandler.query(ServerQueryHandler.java:44)) - ServerConnection [id=1, schema=null, host=127.0.0.1, user=test,txIsolation=3, autocommit=true, schema=null]show databases -- This comment continues to the end of line 2019-07-30 10:43:28.033 DEBUG [BusinessExecutor0] (com.actiontech.dble.server.NonBlockingSession.execute(NonBlockingSession.java:412)) - ServerConnection [id=1, schema=null, host=127.0.0.1, user=test,txIsolation=3, autocommit=true, schema=null]show databases -- This comment continues to the end of line, route={ 1 -> dn3{show databases -- This comment continues to the end of line}.0 } rrs 2019-07-30 10:43:28.035 DEBUG [BusinessExecutor0] (com.actiontech.dble.backend.datasource.PhysicalDBPool.getRWBalanceNode(PhysicalDBPool.java:585)) - select read source hostM1 for dataHost:172.100.9.5 2019-07-30 10:43:28.035 DEBUG [BusinessExecutor0] (com.actiontech.dble.backend.mysql.nio.MySQLConnection.synAndDoExecute(MySQLConnection.java:527)) - con need syn ,total syn cmd 2 commands SET CHARACTER_SET_CLIENT = latin1,CHARACTER_SET_RESULTS = latin1,COLLATION_CONNECTION = latin1_swedish_ci;SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;schema change:false con:MySQLConnection [id=5, lastTime=1564454608035, user=test, schema=db2, old schema=db2, borrowed=true, fromSlaveDB=false, threadId=1086,character_set_client=utf8,character_set_results=utf8,collation_connection=utf8_general_ci, txIsolation=-1, autocommit=true, attachment=dn3{show databases -- This comment continues to the end of line}.0, respHandler=SingleNodeHandler [node=dn3{show databases -- This comment continues to the end of line}.0, packetId=0], host=172.100.9.5, port=3306, statusSync=null, writeQueue=0, modifiedSQLExecuted=false]