Hello 
I come back again with another question related to the Problem.
Is it possible to call  mysql_free_result() with Unidac?
By MySQL it is said that the fault could come in this situation.
See MySQL 5.7 Reference Manual.
Manuel's citation :
This can happen, for example, if you are using mysql_use_result() and try to execute a new query before you have called mysql_free_result(). It can also happen if you try to execute two queries that return data without calling mysql_use_result() or mysql_store_result() in between.