List:MySQL++« Previous MessageNext Message »
From:Quentin Armitage Date:June 3 2014 10:01am
Subject:Re: Connections getting "lost"/overwritten & checking connected()
View as plain text  
On Sun, 2014-06-01 at 04:12 -0600, Warren Young wrote:

> On Jun 1, 2014, at 2:18 AM, Quentin Armitage <quentin@stripped> wrote:
> > Revised patch:
> Thanks, it's applied.

Many thanks.

> > Would you be interested in a patch that
> > adds checks for connected?
> Not really.
> I think the explicit checks are the problem, rather than the inverse.  Attempting to
> execute a query on a disconnected object will cause an error, so it’s not like the
> problem will go unnoticed.
> But, I can’t just remove them — or ask you to remove them — in case
> someone is depending on the current behavior.  For all I know, someone is doing a string
> check on the exact error message, and their code will break if we remove the explicit
> checks.
> I think I will remove them in 4.0, though.

My initial reaction was to agree with this, but on reflection I think it
is helpful to have the checks. When developing code, occasionally I have
a bug where I attempt to execute a query on a closed connection, and the
application then coredumps (if coredumps are enabled). I feel it would
be more helpful for debugging purposes for an exception to be thrown
which can then be cleanly reported/handled.

Connections getting "lost"/overwrittenQuentin Armitage31 May
  • Re: Connections getting "lost"/overwrittenWarren Young31 May
    • Re: Connections getting "lost"/overwrittenQuentin Armitage1 Jun
      • Re: Connections getting "lost"/overwrittenWarren Young1 Jun
        • Re: Connections getting "lost"/overwritten & checking connected()Quentin Armitage3 Jun
          • Re: Connections getting "lost"/overwritten & checking connected()Warren Young3 Jun