Date: Fri, 14 Aug 1998 18:50:02 +0200 From: Jochen WiedmannSubject: mysql: Connecting/Disconnecting 1100 times freezes server Received: (from root@localhost) by laptop.ispsoft.de (8.8.8/8.8.8) id SAA08052 for mysql@tcx.se; Fri, 14 Aug 1998 18:42:55 +0200 Date: Fri, 14 Aug 1998 18:42:55 +0200 Full-Name: root Message-Id: <199808141642.SAA08052@laptop.ispsoft.de> From: joe To: mysql@tcx.se Subject: connecting/disconnecting 1100 times freezes server >Description: A simple test script that connects/disconnects in an endless loop makes the MySQL server freeze after approximately 1100 iterations. Is this a bug or a security related feature? If the latter, can I turn it off somehow, as it prevents me from investigating a memory leak in the DBD::mysql's connect method. >How-To-Repeat: #include #include #include #include int main(int argc, char* argv[]) { MYSQL sock; int i = 0; while (1) { if (++i % 100 == 0) { printf("%d\n", i); } mysql_init(&sock); if (!mysql_real_connect(&sock, NULL, NULL, NULL, NULL, 0, NULL, 0)) { fprintf(stderr, "Cannot connect: %s\n", mysql_error(&sock)); exit(10); } mysql_close(&sock); } } >Fix: Not known ---------- Forwarded message ---------- From: Adam Ipnarski To: BUGTRAQ@netspace.org Date: Sat, 15 Aug 1998 12:02:36 +0000 Subject: Re: MySQL DoS? > >Description: > > A simple test script that connects/disconnects in an endless > loop makes the MySQL server freeze after approximately 1100 > iterations. I have tried this on MySQL v9.15, dist.3.21.30 for Solaris. After changing a few calls (different arguments for mysql_real_connect, and no mysql_init), it stayed up perfectly for over 30,000 connects. This would seem to suggest that the problem is only in the new connect call for dist >= 3.22.00. -- Adam Wielowieyski-Ipnarski adam@fastfare.co.uk | www.travelselect.com