When I make a query using limit and offset, the database returns one line less than it should. What is the problem? Cache? Lock Index? Data?
For example:
select distinct(id_table1) from table_1
join table_2 on table_2.id_table2 = table1.id_table2
where table2.campo = numero_qualquer
limit 100
offset 523800;
The above query returns 99 results instead of 100.
If I make the same query with limit 1 and offset 523842 it returns 0 results. Note that if I raise the limit to 2 it returns 1. I do not know why this line is not displayed it is apparently counted by the offset to jump but not displayed in the limit result.
The tables are in MyISAM, I have already fixed index and data and nothing works.