tristaZero commented on issue #8525:
URL: https://github.com/apache/shardingsphere/issues/8525#issuecomment-742321506
Hi @zhangwei1989 ,
Thanks for your response. : )
From the log, we can see the cause is the wrong routing result due to
different MySQL client versions.
```
Actual SQL: primary_ds ::: SHOW COLUMNS FROM t_order_item_0
VS
Actual SQL: pr_ds ::: show tables
```
See here, your SQL `show tables` got a `logic masterSlave name`, i.e.,
`pr_ds` rather than the correct one `primary_ds` or `replica_ds_x`.
Could you give me a hand to locate the cause?
- Please set a breakpoint at
[PartialSQLRouteExecutor](https://github.com/apache/shardingsphere/blob/5dc690c2227571e83beada277dbb2dfb43c29427/shardingsphere-infra/shardingsphere-infra-route/src/main/java/org/apache/shardingsphere/infra/route/engine/impl/PartialSQLRouteExecutor.java#L59)
- Check the `sqlStatementContext` of `LogicSQL` is the instance of
`CommonSQLStatementContext`. Also, `CommonSQLStatementContext ` contains
`MySQLShowTablesStatement`
- Check whether your program enters into `ReplicaQuerySQLRouter` or not
- If so, please figure out why `ReplicaQuerySQLRouter` return `pr_ds`
Looking forward to your feedback, thanks.
----------------------------------------------------------------
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]