Last week, the test found a paging bug---no matter how the page data was paged. All of our pagination is with EF paging, why is there a problem with only one module paging?
Later, following the SQL statement, we found that the new paging method used was sql2012 Offset/fetch next.
Here are two paragraphs of SQL statements,
DECLARE @FetchRows tinyint = 8; SELECT * from Bnc_store ORDER by created_date ASC OFFSET 0 rows FETCH NEXT @FetchRows rows only; SELECT * from Bnc_store ORDER by Created_date ASC OFFSET 8 rows FETCH NEXT @FetchRows rows only; SELECT * from Bnc_store ORDER by created_date ASC OFFSET + rows FETCH NEXT @FetchRows rows only;
SELECT * from Bnc_store ORDER by created_date ASC OFFSET 0 rows FETCH NEXT 8 rows Only;select * from Bnc_store ORDER by Cr Eated_date ASC offset 8 rows Fetch NEXT 8 rows Only;select * from Bnc_store ORDER by created_date ASC offset + rows Fetch NEXT 8 ROWS only;
If the values of create_date in the data are the same, you can see that the results are not the same.
If we change to an order by ID, the results on both sides are consistent.
All I personally think this is a Microsoft sql2012 bug
SQL Offset/fetch NEXT BUG