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 2022/02/17 11:00:23 UTC
[GitHub] [shardingsphere] CINDERALL opened a new issue #15474: ds0 and ds1 have tables with the same name. I wanted to select ds0.order, but the result is ds1.order
CINDERALL opened a new issue #15474:
URL: https://github.com/apache/shardingsphere/issues/15474
```
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
<version>5.0.0</version>
</dependency>
```
```
spring:
shardingsphere:
datasource:
names: master,slave,master-shop,slave-shop
master:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbcUrl: jdbc:mysql://ip:port/db0?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&useSSL=false&zeroDateTimeBehavior=convertToNull
username: root
password: root
slave:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbcUrl: jdbc:mysql://ip:port/db0?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&useSSL=false&zeroDateTimeBehavior=convertToNull
username: root
password: root
master-shop:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbcUrl: jdbc:mysql://ip:port/db1?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&useSSL=false&zeroDateTimeBehavior=convertToNull
username: root
password: root
slave-shop:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbcUrl: jdbc:mysql://ip:port/db1?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&useSSL=false&zeroDateTimeBehavior=convertToNull
username: root
password: root
rules:
readwrite-splitting:
data-sources:
ms0:
write-data-source-name: master
read-data-source-names: slave
load-balancer-name: round-robin
ms1:
write-data-source-name: master-shop
read-data-source-names: slave-shop
load-balancer-name: round-robin
load-balancers:
round-robin:
type: ROUND_ROBIN
props:
haha: 1
props:
sql-show: true
```
```
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ms0.order")
public class Order implements Serializable{
}
```
ds0 and ds1 have tables with the same name. I wanted to select ds0.order, but the result is ds1.order

--
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] qing701 closed issue #15474: ds0 and ds1 have tables with the same name. I wanted to select ds0.order, but the result is ds1.order
Posted by GitBox <gi...@apache.org>.
qing701 closed issue #15474:
URL: https://github.com/apache/shardingsphere/issues/15474
--
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] lanchengx commented on issue #15474: ds0 and ds1 have tables with the same name. I wanted to select ds0.order, but the result is ds1.order
Posted by GitBox <gi...@apache.org>.
lanchengx commented on issue #15474:
URL: https://github.com/apache/shardingsphere/issues/15474#issuecomment-1044002385
@qing701 Tables without any sharding rules configured will be recognized as `singleTable`, when there is a `singleTable` with the same name, overwriting will occur
--
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] zjcnb commented on issue #15474: ds0 and ds1 have tables with the same name. I wanted to select ds0.order, but the result is ds1.order
Posted by GitBox <gi...@apache.org>.
zjcnb commented on issue #15474:
URL: https://github.com/apache/shardingsphere/issues/15474#issuecomment-1042863458
@qing701 Hi, Thank you for your feedback, i will check.
--
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] qing701 commented on issue #15474: ds0 and ds1 have tables with the same name. I wanted to select ds0.order, but the result is ds1.order
Posted by GitBox <gi...@apache.org>.
qing701 commented on issue #15474:
URL: https://github.com/apache/shardingsphere/issues/15474#issuecomment-1044059015
@lanchengx thank you
--
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