dbTalk Databases Forums  

ping() core dumping

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


Discuss ping() core dumping in the mailing.database.mysql-plusplus forum.



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

Default ping() core dumping - 06-15-2005 , 06:43 PM






Hi,

My case is very similar to http://lists.mysql.com/plusplus/2779.

Basically, my programs core dumps anytime I call ping.

Some system info:
5.3-RELEASE FreeBSD 5.3-RELEASE
db: 4.1.10a-log
db client: mysql Ver 14.6 Distrib 4.1.5-gamma, for
portbld-freebsd5.3 (i386)

Any Idea why this could be happening?

Thanks,

Nash

--
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   
Warren Young
 
Posts: n/a

Default Re: ping() core dumping - 06-15-2005 , 08:46 PM






Nash Kabbara wrote:
Quote:
My case is very similar to http://lists.mysql.com/plusplus/2779.
Then I would suggest the same answer Sinisa gave: are you certain that
MySQL++ is built against the same MySQL C library as you're linking your
program against?

Are you by chance using a binary release of MySQL++?

Do the examples work?

--
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   
Nash Kabbara
 
Posts: n/a

Default Re: ping() core dumping - 06-27-2005 , 04:32 PM



Hi Warren,

The answer is yes to all these questions, but I noticed that ping()
makes the program core dump when it is called on a Connection object
that hasn't been connected yet (real_connect not yet called, in my case).

I tested this using the mysql c api and the same thing happened
also. If I call mysql_ping on a MYSQL handle that hasn't been connected
to the db, then the program core dumps.

At least now I know this isn't caused by mysql++.

I would assume that this should return a non-zero response as
opposed to core dumping. Is my assumption correct? I can't seem to find
any reference to this online.


Thanks,

Nash

Warren Young wrote:

Quote:
Nash Kabbara wrote:


My case is very similar to http://lists.mysql.com/plusplus/2779.


Then I would suggest the same answer Sinisa gave: are you certain that
MySQL++ is built against the same MySQL C library as you're linking
your program against?

Are you by chance using a binary release of MySQL++?

Do the examples work?

--
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
  #4  
Old   
Chris Frey
 
Posts: n/a

Default Re: ping() core dumping - 06-27-2005 , 08:20 PM



On Mon, Jun 27, 2005 at 04:40:18PM -0500, Nash Kabbara wrote:
Quote:
I tested this using the mysql c api and the same thing happened
also. If I call mysql_ping on a MYSQL handle that hasn't been connected
to the db, then the program core dumps.

At least now I know this isn't caused by mysql++.

I would assume that this should return a non-zero response as
opposed to core dumping. Is my assumption correct? I can't seem to find
any reference to this online.
No. If a function requires a MYSQL handle, you must give it a valid one,
not something with random data. (which is what an uninitialized handle is)

- 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
  #5  
Old   
Warren Young
 
Posts: n/a

Default Re: ping() core dumping - 06-27-2005 , 11:34 PM



Chris Frey wrote:
Quote:
No. If a function requires a MYSQL handle, you must give it a valid one,
not something with random data. (which is what an uninitialized handle is)
True, but I don't think there's any particular reason that a user would
know that, especially if MySQL++ ever does go database-independent.

Since fixing this doesn't change the ABI, I've added it to the Wishlist
for v2.1 or later.

--
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
  #6  
Old   
Chris Frey
 
Posts: n/a

Default Re: ping() core dumping - 06-28-2005 , 02:11 AM



On Mon, Jun 27, 2005 at 10:34:38PM -0600, Warren Young wrote:
Quote:
Chris Frey wrote:
No. If a function requires a MYSQL handle, you must give it a valid one,
not something with random data. (which is what an uninitialized handle is)

True, but I don't think there's any particular reason that a user would
know that, especially if MySQL++ ever does go database-independent.
Ahhh... just read your Wishlist entry, and see it now. I was talking
about the C api, and couldn't understand why anyone would pass in a
random handle. :-)

- 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
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.