List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:January 14 2000 2:54pm
Subject:Memory leak
View as plain text  
>>>>> "leon" == leon  <leon@stripped> writes:

>> Description:
leon> 	Memory was eaten up!
>> How-To-Repeat:
leon> 	Just run the test program.
>> Fix:
leon> 	Don't know yet.

>> Submitter-Id:	<submitter ID>
>> Originator:	Leon
>> Organization:
 
>> MySQL support: none
>> Synopsis:	Memory leak
>> Severity:	critical
>> Priority:	high
>> Category:	mysql
>> Class:		
>> Release:	mysql-3.22.29 (Official MySQL RPM)

>> Environment:
<cut>

leon> Before the test program, I have 90MB free phisical memory. When I was running the
> test program, the free memory decreased to 3MB - 4MB in less than 2 minutes.

leon>         conn = mysql_init (NULL);
leon>         if (mysql_real_connect (conn, "192.168.0.10", 0, 0, "test", 0, NULL, 0)
> == NULL) {
leon>                 fprintf (stderr, "mysql_real_connect () failed\n");
leon>                 exit (1);
leon>         }
leon>         printf ("successful!\n");

leon> 	for (;;) {
leon> 		sprintf (szQuery, "SELECT * FROM test WHERE id=%d", nRand);
leon> 		if (mysql_query (conn, szQuery))
leon> 			abort();

leon> 		if (!(res = mysql_store_result (conn)))
leon> 			abort();

leon> 		mysql_free_result (res);
leon> 	}
leon>         mysql_close (conn);

Hi!

Could you check with 'top' if it was the client or the server that
took all memory?

Regards,
Monty
Thread
Memory leakleon14 Jan
  • Re: Memory leakMark Russell14 Jan
    • Re: Memory leakJonathan Stimmel14 Jan
    • Re: Memory leakViktor Fougstedt14 Jan
      • Re: Memory leakMark Russell14 Jan
  • Re: Memory leakLeon14 Jan
  • Memory leakMichael Widenius14 Jan