keitho00 opened a new issue #1903: limit offset return wrong result URL: https://github.com/apache/incubator-shardingsphere/issues/1903 ### Which version of ShardingSphere did you use? 3.1.0 ### Which project did you use? Sharding-JDBC or Sharding-Proxy? Sharding-JDBC ### java code ``` List<ProfitJournal> profitJournalPage1 = profitJournalMapper.selectPage(ProfitJournal.Query.builder() .userId(20162268) .build(), 1550627000L, 1550628875L , 5, 5); ``` ### mybaits xml ``` <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> ``` Expect Sql ``` SELECT * FROM profit_journal_20190220 WHERE user_id = ?and dateline between ? and ? LIMIT ?, ? ::: [[20162268, 1550627000, 1550628875, 5, 5]] ``` Actual Sql ``` SELECT * FROM profit_journal_20190220 WHERE user_id = ?and dateline between ? and ? LIMIT ?, ? ::: [[20162268, 1550627000, 1550628875, 0, 10]] ``` Result  I want 5 result bug get 10 result ,I think there is something wrong .
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
