List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:August 4 1999 1:27pm
Subject:C executable hanging on Linux
View as plain text  
>>>>> "sinisa" == sinisa  <sinisa@stripped> writes:

sinisa> Medhat Mourid writes:
>> Hi,
>> 
>> 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????
>> 
>> Thanks
>> 

Hi!

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!

Fix.

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:

--with-debug
or
--with-debug=yes

Compiled with debugging but without safe_malloc

--with-debug=full

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.

Regards,
Monty

Thread
C executable hanging on LinuxMedhat Mourid4 Aug
  • privilegesDamien Richard4 Aug
    • Re: privilegesMartin Ramsch4 Aug
    • privilegessinisa4 Aug
    • Re: privilegesPaul DuBois4 Aug
    • Re: privilegesRalph Graulich4 Aug
  • C executable hanging on Linuxsinisa4 Aug
    • C executable hanging on LinuxMichael Widenius4 Aug