Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用Atlas时shardingkey使用=时,select没有数据,但用in时有 #195

Open
jmbkeyes opened this issue Apr 19, 2019 · 0 comments
Open

Comments

@jmbkeyes
Copy link

我有一张表center_trainee_month_checkin,
CREATE TABLE center_trainee_month_checkin (
id BIGINT(20) NOT NULL AUTO_INCREMENT,
centerId BIGINT(20) NULL DEFAULT NULL,
checkInCount SMALLINT(6) NULL DEFAULT NULL,
checkInDayCount TINYINT(4) NULL DEFAULT NULL,
createTime DATETIME NULL DEFAULT NULL,
month MEDIUMINT(9) NULL DEFAULT NULL,
traineeId BIGINT(20) NULL DEFAULT NULL,
PRIMARY KEY (id),
INDEX UK_kyv8gri8lp2mpjcflnq295cob (centerId, month, traineeId)
)

根据分表键centerId分表之后有4个子表center_trainee_month_checkin_0,center_trainee_month_checkin_1,center_trainee_month_checkin_2, center_trainee_month_checkin_3。

连接到atlas执行sql语句
select * from center_trainee_month_checkin where centerId=264;没有数据返回
但是执行select * from center_trainee_month_checkin where centerId in(264);有数据返回

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant