From: chris at shagged dot org
Operating system: FreeBSD 5.2.1
PHP version: 4.3.9RC2
PHP Bug Type: MySQL related
Bug description: mysql_pconnect stops 'SHOW SLAVE STATUS' working
Description:
------------
Using mysql_pconnect appears to stop SHOW SLAVE STATUS queries working
properly. If I change the first line in the supplied snippet to
mysql_connect, it works fine.
Additionally, this bug doesn't appear to show up when using the script
called from commandline.
But it does, reproducibly, when executing it inside a FastCGI daemon.
Even if I explicitly provide the connection object as a reference to
mysql_query, the same behaviour is still observed.
Reproduce code:
---------------
mysql_pconnect('some_host', 'some_user', 'some_pass');
$R = mysql_query("SHOW SLAVE STATUS");
print_r(mysql_fetch_assoc($R));
print mysql_result($R, 0, 'Seconds_Behind_Master');
Expected result:
----------------
The appropriate result set I asked for would be just peachy :)
Actual result:
--------------
If I use mysql_result:
PHP Warning: mysql_result(): Unable to jump to row 0 on MySQL result
index 4 in foo.php on line 4
Or mysql_fetch_assoc:
PHP Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL
result resource in foo.php on line 3
--
Edit bug report at http://bugs.php.net/?id=30067&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30067&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30067&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30067&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=30067&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=30067&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=30067&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=30067&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=30067&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30067&r=support
Expected behavior: http://bugs.php.net/fix.php?id=30067&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30067&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30067&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=30067&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30067&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=30067&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=30067&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30067&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=30067&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=30067&r=mysqlcfg