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/08/03 06:35:02 UTC

[GitHub] [shardingsphere] GeekerG2Y opened a new issue #11613: 加入ShardingSphere后查询数据库时会有字段无法查询到数值(去除ShardingSphere后正常)

GeekerG2Y opened a new issue #11613:
URL: https://github.com/apache/shardingsphere/issues/11613


   当前使用Spring Boot 2.0.6、MyBatis-Plus 3.4.3、ShardingSphere-JDBC 4.1.1。
   首先,在未整合ShardingSphere时是完全正常无问题的!
   在执行下图的SQL语句后(该表没有使用分片键),红框中的main_category_name字段查询不出来。
   ![1627971390(1)](https://user-images.githubusercontent.com/35280133/127967095-066fd1c3-b198-4c52-8055-b05447abdae7.png)
   下图是控制台打印的SQL日志,可以看到SQL语句中是有该字段的,但查询出的结果集中service_score字段后面就没有main_category_name字段了。
   ![1627971949(1)](https://user-images.githubusercontent.com/35280133/127968107-26d1ba9c-a114-44dc-98ba-5a3c4578bd37.png)
   ![1627971855(1)](https://user-images.githubusercontent.com/35280133/127968108-e74c8d49-dc5f-4fa4-bcea-051908e690a3.png)
   
   但是!
   如果在查询字段后面再加上一个字段,main_category_name字段又能查询出来了,我不太清除这个问题是我哪里设置不正确还是说ShardingSphere自身的问题。
   ![1627972181(1)](https://user-images.githubusercontent.com/35280133/127968432-c7e4f91d-443e-4295-aaf2-b9afd963c82d.png)
   ![1627972287(1)](https://user-images.githubusercontent.com/35280133/127968607-85a487d0-d5ce-4058-9af3-fd1cab684cac.png)
   此时可以看到main_category_name字段查询出来了,但是storeInfoId缺失了?
   ![1627972320(1)](https://user-images.githubusercontent.com/35280133/127968739-34aa4e49-b9ea-46cb-9d14-4d2351822a28.png)
   该情况在Select中使用子查询有时也会出现,而且并非最后一个的字段会出现,有时中间的某个字段也会出现该问题。


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



[GitHub] [shardingsphere] strongduanmu commented on issue #11613: 加入ShardingSphere后查询数据库时会有字段无法查询到数值(去除ShardingSphere后正常)

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #11613:
URL: https://github.com/apache/shardingsphere/issues/11613#issuecomment-891908517


   @GeekerG2Y For english only, other language will not accept.


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



[GitHub] [shardingsphere] strongduanmu closed issue #11613: 加入ShardingSphere后查询数据库时会有字段无法查询到数值(去除ShardingSphere后正常)

Posted by GitBox <gi...@apache.org>.
strongduanmu closed issue #11613:
URL: https://github.com/apache/shardingsphere/issues/11613


   


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