I’ve read that mysql_store_result() in the MySQL C API will allocate memory for each and every call to it;
mysql_store_result() reads the entire result of a query to the client, allocates a MYSQL_RES structure, and places the result into this structure.
It is really so?
I’m asking because I’m about to call it many times in a server application.
Allocating/Freeing is horrible for my purpose.
Is there a way to provide a custom buffer to it? Maybe some “undocumented” API?
See this link about using mysql_use_result:
http://dev.mysql.com/doc/refman/5.0/en/mysql-use-result.html
i use “use_result” instead of “store_result” on all select queries.