Open Leonidas-from-XIV opened 6 years ago
Sounds like a bug. Patch is welcome..
https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_max_execution_time I cannot find any mention what happens to query result if timeout is reached (I would expect error returned with no results), are you sure max_execution_time is the reason of result set truncation?
This error goes away if we don't set it. If we set the execution time limit on a 3rd party client like Sequel Pro, we are getting an error message that the execution time limit was reached.
We were wondering why we sometimes get less than our
LIMIT 100
results on our queries, even though the should still have been more results. This is important because we paginate through a big dataset and would like to detect the fact when we reached the last page (which would be signalled by returning less thenLIMIT
results).As it turned out this is due to our setting of
SET MAX_EXECUTION_TIME=10;
to limit the execution time of our queries, which correctly causes timeout errors in MySQL clients (error code 3024) but not with this library. Instead ocaml-mysql returns fewer results without any obvious indication (like an exception) that the underlying query actually failed.Is there a way to make this library signal errors when this problem happens?