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 2021/11/17 03:08:34 UTC

[GitHub] [shardingsphere] CrackerSuperior commented on issue #13653: Why is the actual executed SQL displayed in the "shardingShpere" log different from the actual SQL executed by MySQL itself?

CrackerSuperior commented on issue #13653:
URL: https://github.com/apache/shardingsphere/issues/13653#issuecomment-971133108


   > version: master
   > 
   > shardingSphere log:
   > 
   > ```sql
   > [INFO ] 2021-11-17 10:55:12.901 [Connection-4-ThreadExecutor] ShardingSphere-SQL - Logic SQL: SELECT * FROM insert4 o INNER JOIN insert5 i ON o.id = i.id WHERE i.id > 3
   > [INFO ] 2021-11-17 10:55:12.901 [Connection-4-ThreadExecutor] ShardingSphere-SQL - SQLStatement: MySQLSelectStatement(limit=Optional.empty, lock=Optional.empty, window=Optional.empty)
   > [INFO ] 2021-11-17 10:55:12.902 [Connection-4-ThreadExecutor] ShardingSphere-SQL - Actual SQL: ds_0 ::: SELECT * FROM insert4 o INNER JOIN insert5 i ON o.id = i.id WHERE i.id > 3
   > [INFO ] 2021-11-17 10:55:12.902 [Connection-4-ThreadExecutor] ShardingSphere-SQL - Actual SQL: ds_1 ::: SELECT * FROM insert4 o INNER JOIN insert5 i ON o.id = i.id WHERE i.id > 3
   > ```
   > 
   > MySQL log:
   > 
   > ```sql
   >  event_time: 2021-11-17 10:55:12.938037
   >    user_host: pcloud[pcloud] @ localhost [127.0.0.1]
   >    thread_id: 443
   >    server_id: 1
   > command_type: Query
   >     argument: SELECT `id`, `sharding`, `sex`, `name`, `text`, `longtexts`, `time`, `money` FROM `insert5`
   > *************************** 9. row ***************************
   >   event_time: 2021-11-17 10:55:12.938037
   >    user_host: pcloud[pcloud] @ localhost [127.0.0.1]
   >    thread_id: 444
   >    server_id: 1
   > command_type: Query
   >     argument: SELECT `id`, `sharding`, `sex`, `name`, `text`, `longtexts`, `time`, `money` FROM `insert5`
   > *************************** 10. row ***************************
   >   event_time: 2021-11-17 10:55:12.948604
   >    user_host: pcloud[pcloud] @ localhost [127.0.0.1]
   >    thread_id: 440
   >    server_id: 1
   > command_type: Query
   >     argument: SELECT `id`, `sharding`, `sex`, `name`, `text`, `longtexts`, `time`, `money` FROM `insert4`
   > *************************** 11. row ***************************
   >   event_time: 2021-11-17 10:55:12.948604
   >    user_host: pcloud[pcloud] @ localhost [127.0.0.1]
   >    thread_id: 439
   >    server_id: 1
   > command_type: Query
   >     argument: SELECT `id`, `sharding`, `sex`, `name`, `text`, `longtexts`, `time`, `money` FROM `insert4`
   > ```
   > 
   > Why is the actual executed SQL displayed in the "shardingShpere" log different from the actual SQL executed by MySQL itself?
   
   And I opened the "Federation" engine, which is a cross-database related query.


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org