Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 450880 - Persistent PHP PDO Mysql connection failure on connection loss
Summary: Persistent PHP PDO Mysql connection failure on connection loss
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: php
Version: 5.2
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Joe Orton
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-06-11 15:28 UTC by David Sowder
Modified: 2014-03-03 17:22 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-20 22:05:19 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0226 normal SHIPPED_LIVE php bug fix update 2009-01-20 16:06:27 UTC

Description David Sowder 2008-06-11 15:28:23 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14

Description of problem:
Using persistent connections with the PHP PDO driver for MySQL, use attempts fail with the following error after an existing connection is lost:

SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

Version-Release number of selected component (if applicable):
php-5.1.6-20

How reproducible:
Didn't try


Steps to Reproduce:
1. Connect to a MySQL database using the PDO MySQL driver with persistent connections turned on
2. Restart the connected to MySQL database server, causing the existing persistent connection to be lost
3. Attempt to connect to the same MySQL database using the PDO MySQL driver with persistent connections turned on and without restarting the Apache server the connection attempt is being made from

Actual Results:
I get the following exception:

SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

Expected Results:
The PDO layer detects the stale connection, reconnects and proceeds normally

Additional info:
PHP bug report: http://bugs.php.net/bug.php?id=38996
PHP cvs diff: http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/mysql_driver.c?r1=1.73&r2=1.74&view=patch

Comment 1 Joe Orton 2008-06-11 15:37:44 UTC
Thanks for the report and the upstream bug/patch reference!

Comment 2 Joe Orton 2008-06-11 15:37:56 UTC
Thanks for the report and the upstream bug/patch reference!


Comment 3 RHEL Product and Program Management 2008-06-11 15:45:43 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 8 errata-xmlrpc 2009-01-20 22:05:19 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0226.html


Note You need to log in before you can comment on or make changes to this bug.