Bug #71422 [NEW]: Bogus ORA-01438: value larger than specified precision allowed for this column
From: alvaro at demogracia dot com
Operating system: Windows 7
PHP version: 5.6.17
Package: OCI8 related
Bug Type: Bug
Bug description:Bogus ORA-01438: value larger than specified precision allowed for this column
Description:
------------
After upgrading from PHP/5.6.10 to 5.6.17 it's no longer possible to
insert
3 (int) in a NUMBER(1,0) column because now it triggers:
ORA-01438: value larger than specified precision allowed for this column
Test script:
---------------
CREATE TABLE TEST (
FORMATO_IMPORTACION_ID NUMBER(1,0) DEFAULT 1 NOT NULL
);
<?php
$value = 3;
$conn = oci_connect('test', 'test', '//example.com/xe');
$stmt = oci_parse($conn, 'INSERT INTO TEST (FORMATO_IMPORTACION_ID)
VALUES (:formato_importacion_id)');
oci_bind_by_name($stmt, ':formato_importacion_id', $value, -1,
SQLT_INT);
oci_execute($stmt);
--
Edit bug report at https://bugs.php.net/bug.php?id=71422&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71422&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71422&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71422&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=71422&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=71422&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=71422&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=71422&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=71422&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=71422&r=support
Expected behavior: https://bugs.php.net/fix.php?id=71422&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=71422&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=71422&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=71422&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71422&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=71422&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=71422&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=71422&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71422&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=71422&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=71422&r=mysqlcfg
Thread (10 messages)
- alvaro at demogracia dot com