|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2011-10-13 13:01 UTC] m dot vanduren at jonker dot nl
Description: ------------ Integer on firebird is treated as a 32 bit int and int64 is used as a 64 bit integer. In the pdo_firebird driver INT64 is not implemented and LONG (int32) is treated as a long integer. On an x86_64 machine this means that a SQL_LONG doesn't honor the bit-sign in a value and INT64 doesn't return anything. This patch should fix this value for x86_64 systems while leaving x86 systems unchanged. Test script: --------------- any firebirdSQL database with a integer field containing a negative value. retrieve the value with the pdo_firebird driver on a 64 bit machine and echo it to the screen. Expected result: ---------------- negative values with integer and should be returned as a negative number. Actual result: -------------- negative values are returned as their unsigned counterpart. Patchesphp5-bug60052.patch (last revision 2013-09-26 06:21 UTC by slavb18 at gmail dot com)integer_x86_64.patch (last revision 2011-10-13 13:03 UTC by m dot vanduren at jonker dot nl) Pull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 12:00:01 2025 UTC |
why this patch only partially accepted? still not working on x86-64 $q="select * FROM RDB\$DATABASE"; $q="execute block returns ( rI integer) as begin rI= -1; suspend; end"; $res=$pdo->dbExecute($q); print_r($res->fetch()); outputs Array ( [RI] => 4294967295 [0] => 4294967295 ) istead of Array ( [RI] => -1 [0] => -1 )