php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30067 mysql_pconnect stops 'SHOW SLAVE STATUS' working
Submitted: 2004-09-12 17:50 UTC Modified: 2004-09-12 17:52 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: chris at shagged dot org Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 4.3.9RC2 OS: FreeBSD 5.2.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
39 + 35 = ?
Subscribe to this entry?

 
 [2004-09-12 17:50 UTC] chris at shagged dot org
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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-12 17:52 UTC] tony2001@php.net
Use mysql_error() to figure out why your query failed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 16:01:29 2024 UTC