From: Christopher Jones Date: Thu, 14 Apr 2016 03:50:01 +0000 (+1000) Subject: Fixed bug #71422 (Fix ORA-01438: value larger than specified precision allowed for... X-Git-Tag: php-5.6.21RC1~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8f2e6da8066d4f0b4c3846aeba14f894ef8b02ed;p=php Fixed bug #71422 (Fix ORA-01438: value larger than specified precision allowed for this column) --- diff --git a/NEWS b/NEWS index cb7567d0bf..c0a3b17a36 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,10 @@ PHP NEWS . Fixed bug #71889 (DateInterval::format Segmentation fault). (Thomas Punt) +- OCI8: + . Fixed bug #71422 (Fix ORA-01438: value larger than specified precision + allowed for this column) + - ODBC: . Fixed bug #63171 (Script hangs after max_execution_time). (Remi) diff --git a/ext/oci8/oci8_statement.c b/ext/oci8/oci8_statement.c index a0cd56e580..3bc17fda1c 100644 --- a/ext/oci8/oci8_statement.c +++ b/ext/oci8/oci8_statement.c @@ -1145,7 +1145,9 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len, return 1; } convert_to_long(var); -#if defined(OCI_MAJOR_VERSION) && OCI_MAJOR_VERSION > 10 + +#if defined(OCI_MAJOR_VERSION) && (OCI_MAJOR_VERSION > 10) && \ +(defined(__x86_64__) || defined(__LP64__) || defined(_LP64) || defined(_WIN64)) bind_data = (ub8 *)&Z_LVAL_P(var); value_sz = sizeof(ub8); #else diff --git a/ext/oci8/package.xml b/ext/oci8/package.xml index 56872f4fb2..2f93fc4830 100644 --- a/ext/oci8/package.xml +++ b/ext/oci8/package.xml @@ -9,7 +9,7 @@ http://pear.php.net/dtd/package-2.0.xsd"> Use the OCI8 extension to access Oracle Database. PHP OCI8 2.1 builds -with PHP 7. Use 'pecl install oci8-2.0.10' to install OCI8 for PHP +with PHP 7. Use 'pecl install oci8-2.0.11' to install OCI8 for PHP 5.2 - PHP 5.6. Use 'pecl install oci8-1.4.10' to install PHP OCI8 1.4 for PHP 4.3.9 - PHP 5.1. The OCI8 extension can be linked with Oracle client libraries from Oracle Database 12.1, 11, or 10.2. These @@ -46,12 +46,12 @@ Interoperability Support" (ID 207303.1) for details. no - 2015-12-12 + 2016-04-15 - 2.0.10 - 2.0.10 + 2.0.11 + 2.0.11 stable @@ -59,7 +59,7 @@ Interoperability Support" (ID 207303.1) for details. PHP -Fixed bug #68298 (OCI int overflow) +Fixed bug #71422 (Fix ORA-01438: value larger than specified precision allowed for this column) @@ -159,6 +159,7 @@ Fixed bug #68298 (OCI int overflow) + @@ -464,6 +465,21 @@ Fixed bug #68298 (OCI int overflow) + + + 2.0.10 + 2.0.10 + + + stable + stable + + PHP + +Fixed bug #68298 (OCI int overflow) + + + 2.0.9 diff --git a/ext/oci8/php_oci8.h b/ext/oci8/php_oci8.h index 74dfd01fb6..ae28aec6c4 100644 --- a/ext/oci8/php_oci8.h +++ b/ext/oci8/php_oci8.h @@ -45,7 +45,7 @@ */ #undef PHP_OCI8_VERSION #endif -#define PHP_OCI8_VERSION "2.0.10" +#define PHP_OCI8_VERSION "2.0.11" extern zend_module_entry oci8_module_entry; #define phpext_oci8_ptr &oci8_module_entry diff --git a/ext/oci8/tests/bug71422.phpt b/ext/oci8/tests/bug71422.phpt new file mode 100644 index 0000000000..5978e04ece --- /dev/null +++ b/ext/oci8/tests/bug71422.phpt @@ -0,0 +1,65 @@ +--TEST-- +Bug #71422 (Fix ORA-01438: value larger than specified precision allowed for this column) +--SKIPIF-- + +--FILE-- + +===DONE=== + +--EXPECTF-- +array(1) { + ["RAW_QUERY"]=> + string(3) "Foo" +} +array(1) { + ["NUMERIC_BIND_PARAMETER"]=> + string(3) "Foo" +} +array(1) { + ["STRING_BIND_PARAMETER"]=> + string(3) "Foo" +} +===DONE===