dbTalk Databases Forums  

libmysql.dll crashes when losing internet connection

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


Discuss libmysql.dll crashes when losing internet connection in the mailing.database.mysql-plusplus forum.



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

Default libmysql.dll crashes when losing internet connection - 11-15-2005 , 10:27 PM






------=_Part_4148_19489084.1132111269804
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

In my application, I have queries being executed on 15 second intervals,
using mysql_ping prior to sending the queries to make sure I'm still
connected (using a persistant connection). However, if I unplug my cat5 to
simulate losing my internet connection while the application is running,
instead of skipping the query gracefully, Windows reports that
libmysql.dllhas crashed.

This area of code looks something like this:

if(connection =3D=3D NULL)
return false;

if(mysql_ping(connection) !=3D 0)
return false;

if(mysql_query(connection,query) !=3D 0) { // query failed

} else { // execute the query

}

--

Adam

------=_Part_4148_19489084.1132111269804--

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

Default Re: libmysql.dll crashes when losing internet connection - 11-16-2005 , 11:46 AM






Adam Zerlin wrote:
Quote:
if(mysql_ping(connection) != 0)
return false;

if(mysql_query(connection,query) != 0) { // query failed
This list is for MySQL++, the C++ wrapper for the MySQL C API. Please
send this to the main MySQL mailing list.

--
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   
Adam Zerlin
 
Posts: n/a

Default Re: libmysql.dll crashes when losing internet connection - 11-16-2005 , 03:29 PM



This is in my mySQL C API application...

Adam

On 11/16/05, Warren Young <mysqlpp (AT) etr-usa (DOT) com> wrote:
Quote:
Adam Zerlin wrote:

if(mysql_ping(connection) !=3D 0)
return false;

if(mysql_query(connection,query) !=3D 0) { // query failed

This list is for MySQL++, the C++ wrapper for the MySQL C API. Please
send this to the main MySQL mailing list.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsub=3Dsrfdriver22@gm=
ail.com



--

Adam

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