Bug #60902 [Opn->Sus]: select integer8 from data base don`t work correctly

From: Date: Tue, 08 Dec 2020 13:04:32 +0000
Subject: Bug #60902 [Opn->Sus]: select integer8 from data base don`t work correctly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-230938@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=60902&edit=1 ID: 60902 Updated by: cmb@php.net Reported by: V dot Bulov at VAZ dot ru Summary: select integer8 from data base don`t work correctly -Status: Open +Status: Suspended Type: Bug Package: Ingres II related Operating System: Linux kpl 3.2.1-3.fc16.x86_64 PHP Version: 5.3.9 Block user comment: N Private report: N New Comment: The Ingres extension is no longer maintained for years, so I'm suspending this ticket. Previous Comments: ------------------------------------------------------------------------ [2012-01-27 14:10:52] V dot Bulov at VAZ dot ru Description: ------------ Sorry my english please! After change on my computer from fc15.i686 to fc16.x86_64 i have problem with int8 on php program I found in ingres.c case 4: value_long = (long) *((II_INT4 *) columnData->dv_value); break; #if defined(IIAPI_VERSION_4) case 8: /* PHP does not support BIGINT/INTEGER8 so we have to return */ /* values greater/smaller than the max/min size of a LONG value as a string */ /* Anyone wanting to manipulate this value can use PECL big_int */ if ((*((ingres_int64 *) columnData->dv_value) > LONG_MAX ) || (*((ingres_int64 *) columnData->dv_value) < LONG_MIN )) { value_long_long = *((ingres_int64 *) columnData->dv_value); sprintf(value_long_long_str, "%lld\0", value_long_long); value_long_long_str_len = strlen(value_long_long_str); } else { // value_long = (long) *((II_INT4 *) columnData->dv_value); value_long = (long) *((II_INT8 *) columnData->dv_value); } break; #endif default: after change II_INT4 on II_INT8 in my php program all work corectly Test script: --------------- before stdClass Object ( [acc_key] => -164999 ) after stdClass Object ( [acc_key]=>1044001000020000 ) Expected result: ---------------- 1044001000020001 Actual result: -------------- 1044001000020001 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=60902&edit=1

« previous php.bugs (#230938) next »