From:             
Operating system: Linux kpl 3.2.1-3.fc16.x86_64
PHP version:      5.3.9
Package:          Ingres II related
Bug Type:         Bug
Bug description: select integer8 from data base don`t work correctly   

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 bug report at https://bugs.php.net/bug.php?id=60902&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=60902&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=60902&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=60902&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=60902&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=60902&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=60902&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=60902&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=60902&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=60902&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=60902&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=60902&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=60902&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=60902&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=60902&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=60902&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=60902&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=60902&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=60902&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=60902&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=60902&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=60902&r=mysqlcfg

Reply via email to