Bingjian-Zhu opened a new issue #2349: [Err] 1064 - 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 '/*100,3), '%') AS `???` FROM INFORMATION_SCHEMA.PROFILING WHERE QUERY_ID= GROUP ' at line 1 URL: https://github.com/apache/incubator-shardingsphere/issues/2349 ### Which version of ShardingSphere did you use? sharding-proxy-3.0.0 ### Which project did you use? Sharding-JDBC or Sharding-Proxy? Sharding-Proxy ### Expected behavior I config the Read-write splitting, and it can run. But I run `UPDATE tbl_users set Password = '222222' where user_id = 11;` on master_slave_db. I expect the data will update. ### Actual behavior but the result is: ``` [SQL]UPDATE tbl_users set Password = '222222' where user_id = 11; 受影响的行: 1 时间: 0.005s [Err] 1064 - 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 '/*100,3), '%') AS `???` FROM INFORMATION_SCHEMA.PROFILING WHERE QUERY_ID= GROUP ' at line 1 ``` And the data is not update. The detail info is: ``` [INFO ] 17:22:29.777 [nioEventLoopGroup-5-2] Sharding-Sphere-SQL - Rule Type: master-slave [INFO ] 17:22:29.777 [nioEventLoopGroup-5-2] Sharding-Sphere-SQL - SQL: SET PROFILING=1; ::: DataSources: master_ds [INFO ] 17:22:29.786 [nioEventLoopGroup-5-3] Sharding-Sphere-SQL - Rule Type: master-slave [INFO ] 17:22:29.786 [nioEventLoopGroup-5-3] Sharding-Sphere-SQL - SQL: SHOW STATUS ::: DataSources: master_ds [INFO ] 17:22:29.828 [nioEventLoopGroup-5-4] Sharding-Sphere-SQL - Rule Type: master-slave [INFO ] 17:22:29.828 [nioEventLoopGroup-5-4] Sharding-Sphere-SQL - SQL: SHOW STATUS ::: DataSources: master_ds [INFO ] 17:22:29.880 [nioEventLoopGroup-5-1] Sharding-Sphere-SQL - Rule Type: master-slave [INFO ] 17:22:29.880 [nioEventLoopGroup-5-1] Sharding-Sphere-SQL - SQL: UPDATE tbl_users set `Password` = '222222' where user_id = 11; ::: DataSources: master_ds [INFO ] 17:22:29.902 [nioEventLoopGroup-5-2] Sharding-Sphere-SQL - Rule Type: master-slave [INFO ] 17:22:29.902 [nioEventLoopGroup-5-2] Sharding-Sphere-SQL - SQL: SHOW STATUS ::: DataSources: master_ds [INFO ] 17:22:29.958 [nioEventLoopGroup-5-3] Sharding-Sphere-SQL - Rule Type: master-slave [INFO ] 17:22:29.959 [nioEventLoopGroup-5-3] Sharding-Sphere-SQL - SQL: SELECT QUERY_ID, SUM(DURATION) AS SUM_DURATION FROM INFORMATION_SCHEMA.PROFILING GROUP BY QUERY_ID ::: DataSources: slave_ds_0 [INFO ] 17:22:29.972 [nioEventLoopGroup-5-4] Sharding-Sphere-SQL - Rule Type: master-slave [INFO ] 17:22:29.973 [nioEventLoopGroup-5-4] Sharding-Sphere-SQL - SQL: SELECT STATE AS `鐘舵€乣, ROUND(SUM(DURATION),7) AS `鏈熼棿`, CONCAT(ROUND(SUM(DURATION)/*100,3), '%') AS `鐧惧垎姣擿 FROM INFORMATION_SCHEMA.PROFILING WHERE QUERY_ID= GROUP BY STATE ORDER BY SEQ ::: DataSources: slave_ds_0 ``` not noly the `UPDATE tbl_users set Password = '222222' where user_id = 11;`, but also `delete from tbl_users where user_id = 11;` are made this mistake. my config-master_slave.yaml is: ``` schemaName: master_slave_db dataSources: master_ds: url: jdbc:mysql://localhost:33062/test_db?serverTimezone=UTC&useSSL=false username: root password: maximumPoolSize: 20 slave_ds_0: url: jdbc:mysql://localhost:33061/test_db?serverTimezone=UTC&useSSL=false username: root password: maximumPoolSize: 20 masterSlaveRule: name: ms_test_db masterDataSourceName: master_ds slaveDataSourceNames: - slave_ds_0 ```
---------------------------------------------------------------- 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] With regards, Apache Git Services
