This helped !!! Thanks so much
>You only have to reset the query object when trying to reuse it. A
>newly-created query object is alredy reset.
>> //executes the query
>> Result myResult = myQuery.store();
>> return myResult;
Warren Young <mysqlpp@stripped>
To: MySQL++ Mailing List <plusplus@stripped>
Subject: Re: glibc detected double free or corruption
> Result CDatabase::ReturnQuery(string query)
It would be more efficient to pass the string as a const reference. As
it is, you are copying the string object when calling this function,
which isn't necessary.
> //executes a query and returns a resultset back
> Query myQuery = myConn.query();
You only have to reset the query object when trying to reuse it. A
newly-created query object is alredy reset.
> //executes the query
> Result myResult = myQuery.store();
> return myResult;
Again, an unnecessary copy here. Just say "return myQuery.store();"
> catch (BadQuery er)
Another unnecessary copy. You can almost always catch exceptions by
As for the rest of your code, please reduce it to a simpler example.
I'm not going to work my way through your threading code just to get to
the MySQL++ issue underneath, if any.
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsub=1