Closed keitho00 closed 5 years ago
3.1.0
Sharding-JDBC
List<ProfitJournal> profitJournalPage1 = profitJournalMapper.selectPage(ProfitJournal.Query.builder() .userId(20162268) .build(), 1550627000L, 1550628875L , 5, 5);
<select id="selectPage" resultMap="BaseResultMap"> select <include refid="Base_Column_List"/> from profit_journal <where> <if test="query.userId != null"> and user_id = #{query.userId} </if> <if test="query.guildId != null"> and guild_id = #{query.guildId} </if> <if test="query.profitType != null"> and profit_type = #{query.profitType} </if> <if test="query.memberType != null"> and member_type = #{query.memberType} </if> <if test="query.month != null"> and `month` = #{query.month} </if> <if test="beginTime != null and endTime != null"> and dateline between #{beginTime} and #{endTime} </if> order by id LIMIT #{offset},#{limit} </where> </select>
SELECT * FROM profit_journal_20190220 WHERE user_id = ?and dateline between ? and ? LIMIT ?, ? ::: [[20162268, 1550627000, 1550628875, 5, 5]]
SELECT * FROM profit_journal_20190220 WHERE user_id = ?and dateline between ? and ? LIMIT ?, ? ::: [[20162268, 1550627000, 1550628875, 0, 10]]
two sql limit param is different
I want 5 result but get 10 result ,I think there is something wrong .
Known issue, please refer to https://github.com/apache/incubator-shardingsphere/issues/1722.
Which version of ShardingSphere did you use?
3.1.0
Which project did you use? Sharding-JDBC or Sharding-Proxy?
Sharding-JDBC
java code
mybaits xml
Expect Sql
Actual Sql
two sql limit param is different
Result
I want 5 result but get 10 result ,I think there is something wrong .