Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MySQL++ - Programming with the C++ API to MySQL
MaxDB - Everything about MaxDB, formerly known as SAP DB
ODBC - ODBC with the MySQL Connector/ODBC driver
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
Subject: mysql openssl Question
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
Update one field with more fields from another table
Subject: Getting Identity after INSERT
ERROR 2002: Can 't connect to local MySQL server through socket
mysql test 4 1 fails with the gis test
Subject: MySQL Cluster Software
Downgrade Mysql from 4 to 3 23
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Can 't access mysql after kernel upgrade
Executing MySQL Commands From Within C Program
Comparing and writing out BLOBS
Subject: Re: Preventing Duplicate Entries
FULLTEXT query format question
Strange behavior, Table Level Permission
Does the binary log enabling affect the MySQL performances?
mysql:it 's a db not a dbms how it 's possible?!
mysql have same function mthod as Oracle decode()
 
Subject: Issues with multi-queries

Subject: Issues with multi-queries

2007-11-07       - By Paul Martin

 Back
I'm having some issues using multi-queries... I'm using a C++ dialog app with
MySQL 5.0.19-nt and MySQL++ 2.3.2 on a Windows XP platform.  I have modified
the 'multiquery example' to demonstrate these problems... I cant attach b/c of
size limits on this list, so I guess I can email it seperately (is there a
better way?). Here is a summary of the issues:

1. 'Lost Connection to the MySQL Server'
This seems to happen quite often, and I can make it happen more frequently by
limiting the time between queries.  In my program I have a multi-query with
about 50-100 mostly updates being executed every 3 secs or so.  It will run
fine for hours and then I get this message.  I have added some code to
reconnect, which seems to help in most cases but not all.  I have seen a post
about a similar problem on the mailing list.  I have noticed the same problem
with my modded multiquery app, depending on the value I give the 'Sleep'
function.  

2. Memory Leak
I am pretty sure that I have a memory leak as a result of the queries.  I have
only viewed the usage in the Windows Task Manager window and I realize that isn
't necessarily accurate, but my app seems to grow and grow from approx 3.5Mb to
over 12Mb in 3 hours.  I've turned off other things, etc. and it seems to be
the db queries causing it. I have noticed a similar growth with my modded
multiquery app.  It is hard to tell for sure as the usage seems to drop after a
while to below its starting level (once only).  I think this is some sort of
WIndows garbage collection.  However the growth starts again and continues way
past the original point it dropped.

TIA for any help.

Paul Martin