#32486 [Fbk]: odbc_fetch_into returns wrong data

From: Date: Tue, 17 May 2005 07:10:44 +0000
Subject: #32486 [Fbk]: odbc_fetch_into returns wrong data
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-79073@lists.php.net to get a copy of this message
ID: 32486 Updated by: sniper@php.net Reported By: tho at e-dict dot net Status: Feedback Bug Type: Adabas-D related Operating System: Linux PHP Version: 4.3.9 New Comment: (or did you make a typo with the snapshot name?) Previous Comments: ------------------------------------------------------------------------ [2005-05-17 09:10:18] sniper@php.net Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip ------------------------------------------------------------------------ [2005-05-11 16:30:24] tho at e-dict dot net Tried php4-STABLE-200501211130 and still get wrong results. The \0 issue described before could not be reproduced since the field in the second line was longer then in the first line. But I found out, that in all cases the \0 issue occoured, there was a date field right before the string field and this date field contained the data from the previous line. e.g. 1992-09-09, tho@somedomain.net 1960-01-09, tho@e-dict.net results in 1992-09-09, tho@somedomain.net 1992-09-09, tho@e-dict.net\0net ------------------------------------------------------------------------ [2005-03-29 16:58:34] tho at e-dict dot net Description: ------------ Sometimes after odbc_fetch_into($query, $row) $row contains parts of data from the previous fetched row. For now I'm not able to reproduce this behavior reliably, it just happens once in a while. What happens is that if the data of the previous row is longer than in the current, the result contains '$currentdata\0$somepreviousdata', e.g. previous row: "tho@somedomain.net" current row: "tho@e-dict.net" results in "tho@e-dict.net\0net" IOW the field is as long as the data in the previous row, contains a \0 terminator after the field content and then the rest of the previous field. This also happens if a unset($row) is done before calling odbc_fetch_into() Reproduce code: --------------- N/A ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32486&edit=1

« previous php.bugs (#79073) next »