Req #81143 [NEW]: BIGINT support

From: Date: Tue, 15 Jun 2021 18:42:57 +0000
Subject: Req #81143 [NEW]: BIGINT support
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-234422@lists.php.net to get a copy of this message
From:             simbiat at outlook dot com
Operating system: 
PHP version:      8.0.7
Package:          PDO Core
Bug Type:         Feature/Change Request
Bug description:BIGINT support

Description:
------------
Currently PHP's PDO does not support BIGINT. When using prepared
statements with binding, if we want to use bind a BIGINT we can't use
PDO::PARAM_INT, since it will fail on PHP's side due to BIGINT being
larger than PHP's maximum value for INT. The only alternative option (at
least for MySQL) seems to be "use string" (PDO::PARAM_STR), but this can
result in strange behavior
(https://dba.stackexchange.com/questions/293791/missing-an-inserted-row),
which can even lead to loss of data in some circumstances, because (as
confirmed in https://bugs.mysql.com/bug.php?id=103992) MySQL
does not
guarantee valid and consistent comparison of BIGINT [UNSIGNED] vs
VARCHAR.
As such PDO needs to have a way to bind BIGINT values.
Of course, one can use casting in the queries to work around the
limitation, but that is counterintuitive and easily forgettable.

Test script:
---------------
N/A since feature request

Expected result:
----------------
PDO::PARAM_BIGINT is added to future versions of PHP

Actual result:
--------------
Currently no PDO::PARAM_BIGINT

-- 
Edit bug report at https://bugs.php.net/bug.php?id=81143&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=81143&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=81143&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=81143&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=81143&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=81143&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=81143&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=81143&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=81143&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=81143&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=81143&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81143&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=81143&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=81143&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=81143&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=81143&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=81143&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=81143&r=mysqlcfg


Thread (2 messages)

« previous php.bugs (#234422) next »