|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60902 select integer8 from data base don`t work correctly
Submitted: 2012-01-27 14:10 UTC Modified: 2020-12-08 13:04 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: V dot Bulov at VAZ dot ru Assigned:
Status: Suspended Package: Ingres II related
PHP Version: 5.3.9 OS: Linux kpl 3.2.1-3.fc16.x86_64
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: V dot Bulov at VAZ dot ru
New email:
PHP Version: OS:


 [2012-01-27 14:10 UTC] V dot Bulov at VAZ dot ru
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);
#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);
//                            value_long = (long) *((II_INT4 *) columnData->dv_value);
                            value_long = (long) *((II_INT8 *) columnData->dv_value);

after change II_INT4 on II_INT8 in my php program all work corectly

Test script:

stdClass Object
    [acc_key] => -164999


stdClass Object                                             
(                                  [acc_key]=>1044001000020000                                                                                        

Expected result:

Actual result:


ingres.c (last revision 2012-01-27 14:12 UTC by V dot Bulov at VAZ dot ru)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-12-08 13:04 UTC]
-Status: Open +Status: Suspended
 [2020-12-08 13:04 UTC]
The Ingres extension is no longer maintained for years, so I'm
suspending this ticket.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Sep 29 04:01:24 2023 UTC