dbTalk Databases Forums  

Does mysql++ 2.1.1 work on you comp.?

comp.databases.pick comp.databases.pick


Discuss Does mysql++ 2.1.1 work on you comp.? in the comp.databases.pick forum.



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

Default Does mysql++ 2.1.1 work on you comp.? - 07-27-2006 , 03:41 AM






Hello!

I use Visual C++ 2005 Express Edition and mysql++2.1.1.

Everythink works fine when I'm useing object mysqlpp::Connection(...)
only.
mysqlpp::Connection baza("information_schema",
"localhost","root","pass",0);

It even realy connects to MySQL.

But when I create mysqlpp::Query objeckt like that:
mysqlpp::Query and=baza.query();

The progrogram compiles, links, but when I run the program it crushes
when object is deleteing from memory - destructor works. i.e:
// -1
{
mysqlpp::Query and=baza.query();

Reply With Quote
  #2  
Old   
Symeon
 
Posts: n/a

Default Re: Does mysql++ 2.1.1 work on you comp.? - 07-27-2006 , 04:55 AM






Even tho i think you have posted in the wrong group here - funnily
enough I know a bit about this and there is a bug in the MySQL
destruction. Look on the mysql forum for details on this. - it is
apparent especially when using myodbc



andref (AT) autograf (DOT) pl wrote:
Quote:
Hello!

I use Visual C++ 2005 Express Edition and mysql++2.1.1.

Everythink works fine when I'm useing object mysqlpp::Connection(...)
only.
mysqlpp::Connection baza("information_schema",
"localhost","root","pass",0);

It even realy connects to MySQL.

But when I create mysqlpp::Query objeckt like that:
mysqlpp::Query and=baza.query();

The progrogram compiles, links, but when I run the program it crushes
when object is deleteing from memory - destructor works. i.e:
// -1
{
mysqlpp::Query and=baza.query();
.
.
/*here: destructor is colled automatically. - and somewhere here my
program crushes.*/
}

The only way to omit destruction is:
// -2
{
//dinamic allocation:
mysqlpp::Query *and = new mysqlpp::Query(baza.query());
.
.
/*here is NO destructor colled. so it works ok and goes ahead.
When I uncoment the following line, program will crush again:
delete and;*/
}

The problem seems to be with destruction of the object.
I know that not useing delete will cause a memory leak.

Here is the compilation report:
http://student.agh.edu.pl/~andref/Co...ompilation.txt
(as you see everything goes proper - however there were warnings)

Please, help. I cannot handle this problem.
Does anyone of U have the same problem, or only I do something wrong?


Reply With Quote
  #3  
Old   
AT
 
Posts: n/a

Default Re: Does mysql++ 2.1.1 work on you comp.? - 07-27-2006 , 05:51 AM




Symeon wrote:
Quote:
Even tho i think you have posted in the wrong group here - funnily
enough. I know a bit about this and there is a bug in the MySQL
destruction.
Oh, sorry, but I was trying too make my program work from a few days,
with no result. .

Symeon wrote:
Quote:
Look on the mysql forum for details on this. - it is
apparent especially when using myodbc
I've checked but there was nothing abaut it... Maybe I missed
something, or.
if you had a link, or say haw did you found it I would be grateful.

Thanks.



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.