dbTalk Databases Forums  

Re: libmysql.dll crashes when losing internet connection

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


Discuss Re: 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 Re: libmysql.dll crashes when losing internet connection - 11-15-2005 , 10:18 PM






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

I hit enter too soon.

I removed code within the {} in that last if else. But the code is not mySQ=
L
code.

Am I understanding mysql_ping properly in that it will reconnect before it
returns its value of 0 or -1? Or will it return its value but start a
reconnection process in its own thread?

I may be going about this all wrong, and if so, please excuse my stupidity.


Adam

On 11/15/05, Adam Zerlin <srfdriver22 (AT) gmail (DOT) com> wrote:
Quote:
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 t=
o
simulate losing my internet connection while the application is running,
instead of skipping the query gracefully, Windows reports that
libmysql.dll has 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



--

Adam

------=_Part_4188_15764455.1132111398673--


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.