#35386 [Com]: firebird: first row is null
| From: | stefan at horochovec dot com dot br | Date: | Sat, 27 May 2006 12:54:46 +0000 |
| Subject: | #35386 [Com]: firebird: first row is null | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-97686@lists.php.net to get a copy of this message | ||
ID: 35386
Comment by: stefan at horochovec dot com dot br
Reported By: slapaf at hotmail dot com
Status: Suspended
Bug Type: PDO related
Operating System: winxp sp2
PHP Version: 5CVS-2006-12-02 (snap)
New Comment:
Hi, i´m using PHP 5.1.4, Windows XP SP2 and Firebird 1.x and have the
same problem.
Previous Comments:
------------------------------------------------------------------------
[2006-05-04 13:06:06] krovomi at msn dot com
Does someone got a solution to this problem ?
Thanks
------------------------------------------------------------------------
[2006-03-27 22:32:47] wez@php.net
Looking for someone to maintain the firebird driver.
------------------------------------------------------------------------
[2006-03-21 16:11:10] salbefe at inf dot upv dot es
I have the same problem in Windows 2003 SP1.
------------------------------------------------------------------------
[2006-03-10 09:49:11] astro101 at hotmail dot com
Yes had same problem WinXP SP2 Firebird 1.5.3 and firebird 2 and PHP
5.1.2, PHP5.1.3RC1, PHP5.1.3RC2.
------------------------------------------------------------------------
[2006-02-11 17:25:16] thomas at last-it dot de
same problem on linux, php 5.1.2
I tried to debug the problem, but imho the problem is strange.
The reason why the first row is null is as following:
file: ext/pdo/pdo_stmt.c
line: 532
<code>
case PDO_PARAM_STR:
if (value && !(value_len == 0 && stmt->dbh->oracle_nulls ==
PDO_NULL_EMPTY_STRING)) {
ZVAL_STRINGL(dest, value, value_len, !caller_frees);
if (caller_frees) {
caller_frees = 0;
}
break;
}
default:
ZVAL_NULL(dest);
</code>
With the first returned row from DB the first if clause above evaluates
to false.
so ZVAL_NULL is called. thats the reason for the null values in the
first result set.
Normally should "value" point to the argument "ptr" of the
firebird_stmt_get_col function (in firebird_statement.c).
gdp says that ptr is filled with the data out of DB properly.
So why is "value" not the same as "ptr" and why is this only in the
first result set??
greetz Thomas
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/35386
--
Edit this bug report at http://bugs.php.net/?id=35386&edit=1