>>>>> "sinisa" == sinisa <sinisa@stripped> writes:
sinisa> Medhat Mourid writes:
>> I was wondering if any one had an experience with C programs, compiled
>> on linux using the Mysql API, hanging every once in a while (running
>> forever), and basically taking over the CPU????
This may be the case if you have compiled and older MySQL version with
--with-debug and are requesting a hugh result set. In this case it's
'safe_malloc' that is checking all your memory blocks for errors for
every memory allocation and this takes a lot of time!
Recompile MySQL without --with-debug
In MySQL 3.23.2, you will not get safe_malloc by default.
We have split the debugging flags to use:
Compiled with debugging but without safe_malloc
Compiled with full debugging.
The other problem you are facing is that you are requesting, with
mysql_store_result(), a bigger set that fits in your memory. In this
case you should restrict the set with LIMIT # or use mysql_use_result.