ji2019 opened a new issue #8458:
URL: https://github.com/apache/shardingsphere/issues/8458


   ## Question
   ```
   schemaName: replica_query_db
   #
   dataSourceCommon:
     username: root
     password: 123456
     connectionTimeoutMilliseconds: 30000
     idleTimeoutMilliseconds: 60000
     maxLifetimeMilliseconds: 1800000
     maxPoolSize: 50
     minPoolSize: 1
     maintenanceIntervalMilliseconds: 30000
   #
   dataSources:
     primary_ds:
       url: 
jdbc:mysql://127.0.0.1:3306/demo_primary_ds?serverTimezone=Asia/Shanghai&useSSL=false
     replica_ds_0:
       url: 
jdbc:mysql://127.0.0.1:3306/demo_replica_ds_0?serverTimezone=Asia/Shanghai&useSSL=false
     replica_ds_1:
       url: 
jdbc:mysql://127.0.0.1:3306/demo_replica_ds_1?serverTimezone=Asia/Shanghai&useSSL=false
   #
   rules:
   - !REPLICA_QUERY
     dataSources:
       pr_ds:
         name: pr_ds
         primaryDataSourceName: primary_ds
         replicaDataSourceNames:
           - replica_ds_0
           - replica_ds_1
   ```
   
   Operating system Windows 10
   MySQL client Navicat connection shardingsphere-5.0.0-alpha-proxy  3307 port 
bug
   ```
   '
   [INFO ] 20:31:23.526 [ShardingSphere-Command-1] ShardingSphere-SQL - 
SQLStatement: MySQLShowOtherStatement()
   [INFO ] 20:31:23.526 [ShardingSphere-Command-1] ShardingSphere-SQL - Actual 
SQL: primary_ds ::: SHOW VARIABLES LIKE 'lower_case_%'; SHOW VARIABLES LIKE 
'sql_mode'; SELECT COUNT(*) AS support_ndb FROM information_schema.ENGINES 
WHERE Engine = 'ndbcluster'
   [ERROR] 20:31:23.544 [ShardingSphere-Command-1] 
o.a.s.p.f.c.CommandExecutorTask - Exception occur:
   com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error 
in your SQL syntax; check the manual that corresponds to your MySQL server 
version for the right syntax to use near 'SHOW VARIABLES LIKE 'sql_mode'; 
SELECT COUNT(*) AS support_ndb FROM information_' at line 1
           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
Method)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown 
Source)
           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown 
Source)
           at java.lang.reflect.Constructor.newInstance(Unknown Source)
           at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
           at com.mysql.jdbc.Util.getInstance(Util.java:408)
           at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944)
           at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3978)
           at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3914)
           at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530)
           at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683)
           at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2491)
           at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2449)
           at 
com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:845)
           at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:939)
           at 
com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:103)
           at 
com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java)
           at 
org.apache.shardingsphere.proxy.backend.communication.jdbc.statement.accessor.impl.StatementAccessor.execute(StatementAccessor.java:43)
           at 
org.apache.shardingsphere.proxy.backend.communication.jdbc.execute.engine.jdbc.ProxySQLExecutorCallback.executeSQL(ProxySQLExecutorCallback.java:84)
           at 
org.apache.shardingsphere.proxy.backend.communication.jdbc.execute.engine.jdbc.ProxySQLExecutorCallback.executeSQL(ProxySQLExecutorCallback.java:77)
           at 
org.apache.shardingsphere.proxy.backend.communication.jdbc.execute.engine.jdbc.ProxySQLExecutorCallback.executeSQL(ProxySQLExecutorCallback.java:48)
           at 
org.apache.shardingsphere.infra.executor.sql.resourced.jdbc.executor.impl.DefaultSQLExecutorCallback.execute0(DefaultSQLExecutorCallback.java:75)
           at 
org.apache.shardingsphere.infra.executor.sql.resourced.jdbc.executor.impl.DefaultSQLExecutorCallback.execute(DefaultSQLExecutorCallback.java:57)
           at 
org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel.syncExecute(ExecutorKernel.java:99)
           at 
org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel.parallelExecute(ExecutorKernel.java:95)
           at 
org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel.execute(ExecutorKernel.java:78)
           at 
org.apache.shardingsphere.infra.executor.sql.resourced.jdbc.executor.SQLExecutor.execute(SQLExecutor.java:65)
           at 
org.apache.shardingsphere.proxy.backend.communication.jdbc.execute.engine.jdbc.JDBCExecuteEngine.executeWithManagedResource(JDBCExecuteEngine.java:130)
           at 
org.apache.shardingsphere.proxy.backend.communication.jdbc.execute.engine.jdbc.JDBCExecuteEngine.execute(JDBCExecuteEngine.java:123)
           at 
org.apache.shardingsphere.proxy.backend.communication.jdbc.execute.engine.jdbc.JDBCExecuteEngine.execute(JDBCExecuteEngine.java:103)
           at 
org.apache.shardingsphere.proxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.doExecute(JDBCDatabaseCommunicationEngine.java:93)
   ```


----------------------------------------------------------------
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:
[email protected]


Reply via email to