dbTalk Databases Forums  

Stability problems with mysql++

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss Stability problems with mysql++ in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Matthias Braun
 
Posts: n/a

Default Stability problems with mysql++ - 02-10-2006 , 12:19 AM






Help!

I am using Debian 3.1 / gcc 3.3.5 (Debian 1:3.3.5-13) and the old mysql
++ 1.7.40 installed via configure/install/make install. The Makefile is
as follows:

CXXFLAGS= -pipe -Wall -W -O2 -I/usr/include/mysql
-I/usr/local/include/mysql++
LIBS = $(SUBLIBS) -L/usr/local/lib -lmysqlpp
(...)

Before I had the same issue with SuSE 9.3, with SuSE 8.2 it was fine.

My C++ is stable when running at Windows, but on my Linux it is unstable
and just crashing when setting up simple commands although I am using
exception handling like the following:

query << "ALTER TABLE " << tablename << " ENABLE KEYS;";
try
{
query.store();
}
catch (BadQuery er)
{
throw sql_error(er.error);
}

When setting up the corresponding command in the query analyzer - no
problem.

Thanks in advance,

Matthias


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw


Reply With Quote
  #2  
Old   
Chris Frey
 
Posts: n/a

Default Re: Stability problems with mysql++ - 02-10-2006 , 12:37 AM






On Fri, Feb 10, 2006 at 07:19:22AM +0100, Matthias Braun wrote:
Quote:
My C++ is stable when running at Windows, but on my Linux it is unstable
and just crashing when setting up simple commands although I am using
exception handling like the following:
You'll need to post the actual crash, with a backtrace as well, for
proper help.


Quote:
query << "ALTER TABLE " << tablename << " ENABLE KEYS;";
try
{
query.store();
}
catch (BadQuery er)
{
throw sql_error(er.error);
}
Note there is a difference between query.store() and query.execute().

store() handles SQL statements that return a result set, execute() handles
the others. ALTER TABLE does not return rows of data.

- Chris


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #3  
Old   
Warren Young
 
Posts: n/a

Default Re: Stability problems with mysql++ - 02-10-2006 , 12:57 PM



Matthias Braun wrote:
Quote:
catch (BadQuery er)
In addition to what Chris said, you should catch exceptions by
reference. Otherwise, you make unnecessary copies of the exception objects.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.