summaryrefslogtreecommitdiff
path: root/ext/oci8
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2012-10-25 16:01:25 +0200
committerOndřej Surý <ondrej@sury.org>2012-10-25 16:01:25 +0200
commitb57a2691d5b72c3894e2d4e0f945cecc6b3a1953 (patch)
tree012a1408ce8a738d45ae429ca7d7f5389c159915 /ext/oci8
parent45c0aa447e02c80bd21a23245574231a110cf5a1 (diff)
downloadphp-b57a2691d5b72c3894e2d4e0f945cecc6b3a1953.tar.gz
Imported Upstream version 5.4.8upstream/5.4.8
Diffstat (limited to 'ext/oci8')
-rw-r--r--ext/oci8/config.m48
-rw-r--r--ext/oci8/package.xml29
-rw-r--r--ext/oci8/tests/bind_char_2_11gR1.phpt2
-rw-r--r--ext/oci8/tests/bind_char_3_11gR1.phpt2
-rw-r--r--ext/oci8/tests/bind_char_4_11gR1.phpt2
-rw-r--r--ext/oci8/tests/details.inc53
-rw-r--r--ext/oci8/tests/pecl_bug10194_blob.phpt3
-rw-r--r--ext/oci8/tests/xmltype_01.phpt1
8 files changed, 61 insertions, 39 deletions
diff --git a/ext/oci8/config.m4 b/ext/oci8/config.m4
index 0634e9628..976eb9e84 100644
--- a/ext/oci8/config.m4
+++ b/ext/oci8/config.m4
@@ -49,8 +49,8 @@ AC_DEFUN([AC_OCI8_CHECK_LIB_DIR],[
AC_DEFUN([AC_OCI8IC_VERSION],[
AC_MSG_CHECKING([Oracle Instant Client library version compatibility])
OCI8_LCS_BASE=$PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME
- OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | tail -1` # Oracle 10g, 11g etc
- OCI8_NNZ=`ls $PHP_OCI8_INSTANT_CLIENT/libnnz*.$SHLIB_SUFFIX_NAME 2> /dev/null | tail -1`
+ OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | tail -n1` # Oracle 10g, 11g etc
+ OCI8_NNZ=`ls $PHP_OCI8_INSTANT_CLIENT/libnnz*.$SHLIB_SUFFIX_NAME 2> /dev/null | tail -n1`
if test -f "$OCI8_NNZ" && test -f "$OCI8_LCS"; then
if test ! -f "$OCI8_LCS_BASE"; then
AC_MSG_ERROR([Link from $OCI8_LCS_BASE to $OCI8_LCS_BASE.*.1 not found])
@@ -65,7 +65,7 @@ AC_DEFUN([AC_OCI8IC_VERSION],[
AC_DEFUN([AC_OCI8_ORACLE_VERSION],[
AC_MSG_CHECKING([Oracle library version compatibility])
OCI8_LCS_BASE=$OCI8_DIR/$OCI8_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME
- OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | tail -1` # Oracle 10g, 11g etc
+ OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | tail -n1` # Oracle 10g, 11g etc
if test -s "$OCI8_DIR/orainst/unix.rgs"; then
OCI8_ORACLE_VERSION=`grep '"ocommon"' $OCI8_DIR/orainst/unix.rgs | $PHP_OCI8_SED 's/[ ][ ]*/:/g' | cut -d: -f 6 | cut -c 2-4`
test -z "$OCI8_ORACLE_VERSION" && OCI8_ORACLE_VERSION=7.3
@@ -278,7 +278,7 @@ if test "$PHP_OCI8" != "no"; then
dnl user must pass in the library directory. But on Linux we default
dnl to the most recent version in /usr/lib which is where the Oracle
dnl Instant Client RPM gets installed.
- PHP_OCI8_INSTANT_CLIENT=`ls -d /usr/lib/oracle/*/client${PHP_OCI8_IC_LIBDIR_SUFFIX}/lib/libclntsh.* 2> /dev/null | tail -1 | $PHP_OCI8_SED -e 's#/libclntsh[^/]*##'`
+ PHP_OCI8_INSTANT_CLIENT=`ls -d /usr/lib/oracle/*/client${PHP_OCI8_IC_LIBDIR_SUFFIX}/lib/libclntsh.* 2> /dev/null | tail -n1 | $PHP_OCI8_SED -e 's#/libclntsh[^/]*##'`
if test -z "$PHP_OCI8_INSTANT_CLIENT"; then
AC_MSG_ERROR([Oracle Instant Client directory /usr/lib/oracle/.../client${PHP_OCI8_IC_LIBDIR_SUFFIX}/lib libraries not found. Try --with-oci8=instantclient,DIR])
fi
diff --git a/ext/oci8/package.xml b/ext/oci8/package.xml
index d3a912832..eac3f0655 100644
--- a/ext/oci8/package.xml
+++ b/ext/oci8/package.xml
@@ -37,8 +37,8 @@ http://pear.php.net/dtd/package-2.0.xsd">
<time>12:00:00</time>
<version>
- <release>1.4.7</release>
- <api>1.4.7</api>
+ <release>1.4.8</release>
+ <api>1.4.8</api>
</version>
<stability>
<release>stable</release>
@@ -46,11 +46,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
</stability>
<license uri="http://www.php.net/license">PHP</license>
<notes>
- Fixed bug #59985 (show normal warning text for OCI_NO_DATA)
- Fixed OCI8 part of bug #55748 (CVE-2011-4153: multiple NULL pointer dereferences with zend_strndup)
- Fixed OCI8 part of bug #55301 (multiple null pointer dereferences with calloc)
- Increased maximum Oracle error message buffer length for new Oracle 11.2.0.3 size
- Improve internal initalization failure error messages
+ Fixed bug #60901 (Improve "tail" syntax for AIX installation)
</notes>
<contents>
<dir name="/">
@@ -416,6 +412,25 @@ http://pear.php.net/dtd/package-2.0.xsd">
<release>
<version>
+ <release>1.4.7</release>
+ <api>1.4.7</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.php.net/license">PHP</license>
+ <notes>
+ Fixed bug #59985 (show normal warning text for OCI_NO_DATA)
+ Fixed OCI8 part of bug #55748 (CVE-2011-4153: multiple NULL pointer dereferences with zend_strndup)
+ Fixed OCI8 part of bug #55301 (multiple null pointer dereferences with calloc)
+ Increased maximum Oracle error message buffer length for new Oracle 11.2.0.3 size
+ Improve internal initalization failure error messages
+ </notes>
+</release>
+
+<release>
+ <version>
<release>1.4.6</release>
<api>1.4.6</api>
</version>
diff --git a/ext/oci8/tests/bind_char_2_11gR1.phpt b/ext/oci8/tests/bind_char_2_11gR1.phpt
index 8bb28733f..edb2a12ff 100644
--- a/ext/oci8/tests/bind_char_2_11gR1.phpt
+++ b/ext/oci8/tests/bind_char_2_11gR1.phpt
@@ -5,7 +5,7 @@ SELECT oci_bind_by_name with SQLT_AFC aka CHAR and dates
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
// The bind buffer size edge cases seem to change each DB version.
-if (preg_match('/Release 11\.1\./', $sv, $matches) !== 1) {
+if (preg_match('/Release 11\.1\./', oci_server_version($c), $matches) !== 1) {
if (preg_match('/Release 11\.2\.0\.3/', oci_server_version($c), $matches) !== 1) {
die("skip expected output only valid when using Oracle 11gR1 or 11.2.0.3 databases");
}
diff --git a/ext/oci8/tests/bind_char_3_11gR1.phpt b/ext/oci8/tests/bind_char_3_11gR1.phpt
index 4c6241ccf..fea77754d 100644
--- a/ext/oci8/tests/bind_char_3_11gR1.phpt
+++ b/ext/oci8/tests/bind_char_3_11gR1.phpt
@@ -5,7 +5,7 @@ PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to CHAR parameter
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
// The bind buffer size edge cases seem to change each DB version.
-if (preg_match('/Release 11\.1\./', $sv, $matches) !== 1) {
+if (preg_match('/Release 11\.1\./', oci_server_version($c), $matches) !== 1) {
if (preg_match('/Release 11\.2\.0\.3/', oci_server_version($c), $matches) !== 1) {
die("skip expected output only valid when using Oracle 11gR1 or 11.2.0.3 databases");
}
diff --git a/ext/oci8/tests/bind_char_4_11gR1.phpt b/ext/oci8/tests/bind_char_4_11gR1.phpt
index 14d587885..2bc2f1424 100644
--- a/ext/oci8/tests/bind_char_4_11gR1.phpt
+++ b/ext/oci8/tests/bind_char_4_11gR1.phpt
@@ -5,7 +5,7 @@ PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to VARCHAR2 parameter
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
// The bind buffer size edge cases seem to change each DB version.
-if (preg_match('/Release 11\.1\./', $sv, $matches) !== 1) {
+if (preg_match('/Release 11\.1\./', oci_server_version($c), $matches) !== 1) {
if (preg_match('/Release 11\.2\.0\.3/', oci_server_version($c), $matches) !== 1) {
die("skip expected output only valid when using Oracle 11gR1 or 11.2.0.3 databases");
}
diff --git a/ext/oci8/tests/details.inc b/ext/oci8/tests/details.inc
index 0f03c3a65..9a86c4686 100644
--- a/ext/oci8/tests/details.inc
+++ b/ext/oci8/tests/details.inc
@@ -45,31 +45,34 @@ if (file_exists(dirname(__FILE__)."/details_local.inc")) {
* Used for creating/dropping schema objects used by a test
*/
-function oci8_test_sql_execute($c, $stmtarray)
-{
- foreach ($stmtarray as $stmt) {
- $s = oci_parse($c, $stmt);
- if (!$s) {
- $m = oci_error($c);
- echo $stmt . PHP_EOL . $m['message'] . PHP_EOL;
- }
- else {
- $r = @oci_execute($s);
- if (!$r) {
- $m = oci_error($s);
- if (!in_array($m['code'], array( // ignore expected errors
- 942 // table or view does not exist
- , 1918 // user does not exist
- , 2024 // database link not found
- , 2289 // sequence does not exist
- , 4080 // trigger does not exist
- , 38802 // edition does not exist
- ))) {
- echo $stmt . PHP_EOL . $m['message'] . PHP_EOL;
- }
- }
- }
- }
+if (!function_exists('oci8_test_sql_execute')) {
+ function oci8_test_sql_execute($c, $stmtarray)
+ {
+ foreach ($stmtarray as $stmt) {
+ $s = oci_parse($c, $stmt);
+ if (!$s) {
+ $m = oci_error($c);
+ echo $stmt . PHP_EOL . $m['message'] . PHP_EOL;
+ }
+ else {
+ $r = @oci_execute($s);
+ if (!$r) {
+ $m = oci_error($s);
+ if (!in_array($m['code'], array( // ignore expected errors
+ 942 // table or view does not exist
+ , 1918 // user does not exist
+ , 2024 // database link not found
+ , 2289 // sequence does not exist
+ , 4080 // trigger does not exist
+ , 38802 // edition does not exist
+ ))) {
+ echo $stmt . PHP_EOL . $m['message'] . PHP_EOL;
+ }
+ }
+ }
+ }
+ }
+
}
?>
diff --git a/ext/oci8/tests/pecl_bug10194_blob.phpt b/ext/oci8/tests/pecl_bug10194_blob.phpt
index faf87ab3c..96f94bcf4 100644
--- a/ext/oci8/tests/pecl_bug10194_blob.phpt
+++ b/ext/oci8/tests/pecl_bug10194_blob.phpt
@@ -6,6 +6,9 @@ $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on t
require(dirname(__FILE__).'/skipif.inc');
if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platforms only");
if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
+if (getenv("USE_ZEND_ALLOC") === "0") {
+ die("skip Zend MM disabled");
+}
?>
--INI--
memory_limit=3M
diff --git a/ext/oci8/tests/xmltype_01.phpt b/ext/oci8/tests/xmltype_01.phpt
index 21aca6cc1..ebbbb31fa 100644
--- a/ext/oci8/tests/xmltype_01.phpt
+++ b/ext/oci8/tests/xmltype_01.phpt
@@ -5,6 +5,7 @@ Basic XMLType test
if (!extension_loaded("simplexml")) die("skip no simplexml extension");
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
require(dirname(__FILE__).'/skipif.inc');
+?>
--FILE--
<?php