From:             kstamenov at rocketmail dot com
Operating system: RHEL Linux
PHP version:      5.0.3
PHP Bug Type:     MySQL related
Bug description:  mysql_fetch_array incomplete output

Description:
------------
This is related to bug #31600 which was marked bogus but I was able to
recreate the issue and isolate the event.

I am not familiar with the mysql interface inner workings so that might be
a MySQL bug.

The problem:
$query_str = "SELECT * FROM table";
will display incorrect result while "SELECT field1,field2 FROM table"
works as expected.
The issue is the same as the bug described in #31600

The problem occurs when MySQL 4.1 database is accessed from php4 script
then php is upgraded to php5(compiled with 4.1 libraries) and the script
tries to access the same database even with a different username with
correct password. 

It is solved when the database server is restarted. 

The problem though persists if the database is accessed from two different
servers running php4 and php5(compiled with 4.1 mysql lib) if the php4 is
first to access the database after restart the php5 one will display the
incorrect output and vice versa.



Reproduce code:
---------------
$query_str = "SELECT * FROM table";
$result = mysql_query("$query_str");
var_dump(mysql_fetch_assoc);


Expected result:
----------------
field1 ="value";
field2 = "value"
field3 = "value"
field4 = "value"

Actual result:
--------------
"B"="value;
"" = value;
missing
missing

-- 
Edit bug report at http://bugs.php.net/?id=31771&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=31771&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=31771&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=31771&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=31771&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=31771&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=31771&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=31771&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=31771&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=31771&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=31771&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=31771&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=31771&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=31771&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=31771&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=31771&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=31771&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=31771&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=31771&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=31771&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=31771&r=mysqlcfg

Reply via email to