summaryrefslogtreecommitdiff
path: root/ext/oci8
diff options
context:
space:
mode:
Diffstat (limited to 'ext/oci8')
-rw-r--r--ext/oci8/oci8.c56
-rw-r--r--ext/oci8/oci8_collection.c4
-rw-r--r--ext/oci8/oci8_interface.c4
-rw-r--r--ext/oci8/oci8_lob.c4
-rw-r--r--ext/oci8/oci8_statement.c4
-rw-r--r--ext/oci8/package.xml34
-rw-r--r--ext/oci8/php_oci8.h6
-rw-r--r--ext/oci8/php_oci8_int.h4
-rw-r--r--ext/oci8/tests/array_bind_003.phpt4
-rw-r--r--ext/oci8/tests/array_bind_004.phpt4
-rw-r--r--ext/oci8/tests/array_bind_bdouble.phpt21
-rw-r--r--ext/oci8/tests/array_bind_bfloat.phpt21
-rw-r--r--ext/oci8/tests/array_bind_uin.phpt21
-rw-r--r--ext/oci8/tests/bind_char_1.phpt10
-rw-r--r--ext/oci8/tests/bind_char_1_11gR1.phpt11
-rw-r--r--ext/oci8/tests/bind_char_2.phpt10
-rw-r--r--ext/oci8/tests/bind_char_2_11gR1.phpt11
-rw-r--r--ext/oci8/tests/bind_char_3.phpt10
-rw-r--r--ext/oci8/tests/bind_char_3_11gR1.phpt11
-rw-r--r--ext/oci8/tests/bind_char_4.phpt10
-rw-r--r--ext/oci8/tests/bind_char_4_11gR1.phpt11
-rw-r--r--ext/oci8/tests/bug27303_1.phpt10
-rw-r--r--ext/oci8/tests/bug27303_1_11gR1.phpt11
-rw-r--r--ext/oci8/tests/bug27303_2.phpt10
-rw-r--r--ext/oci8/tests/bug27303_2_11gR1.phpt11
-rw-r--r--ext/oci8/tests/bug27303_4.phpt20
-rw-r--r--ext/oci8/tests/bug27303_4_11gR1.phpt21
-rw-r--r--ext/oci8/tests/bug42496_1.phpt16
-rw-r--r--ext/oci8/tests/bug42496_2.phpt16
-rw-r--r--ext/oci8/tests/bug43497.phpt2
-rw-r--r--ext/oci8/tests/bug43497_92.phpt2
-rw-r--r--ext/oci8/tests/bug44113.phpt2
-rw-r--r--ext/oci8/tests/bug47281.phpt7
-rw-r--r--ext/oci8/tests/conn_attr_4.phpt2
-rw-r--r--ext/oci8/tests/details.inc11
-rw-r--r--ext/oci8/tests/error2.phpt2
-rw-r--r--ext/oci8/tests/error3.phpt40
-rw-r--r--ext/oci8/tests/extauth_01.phpt2
-rw-r--r--ext/oci8/tests/extauth_02.phpt3
-rw-r--r--ext/oci8/tests/extauth_03.phpt3
-rw-r--r--ext/oci8/tests/lob_043.phpt2
-rw-r--r--ext/oci8/tests/password_new.phpt4
-rw-r--r--ext/oci8/tests/password_old.phpt4
-rw-r--r--ext/oci8/tests/pecl_bug10194.phpt2
-rw-r--r--ext/oci8/tests/pecl_bug10194_blob.phpt2
-rw-r--r--ext/oci8/tests/pecl_bug10194_blob_64.phpt2
-rw-r--r--ext/oci8/tests/pecl_bug16035.phpt3
-rw-r--r--ext/oci8/tests/pecl_bug16842.phpt3
48 files changed, 344 insertions, 140 deletions
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index b2a42ed46..367c55464 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2011 The PHP Group |
+ | Copyright (c) 1997-2012 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -26,7 +26,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: oci8.c 313688 2011-07-25 23:40:57Z sixd $ */
+/* $Id: oci8.c 321634 2012-01-01 13:15:04Z felipe $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -79,11 +79,14 @@ static PHP_GSHUTDOWN_FUNCTION(oci);
#endif
/* For a user friendly message about environment setup */
-/* TODO: add cases for SHLIB_PATH, LIBPATH, LD_LIBRARY_PATH_64 etc */
#if defined(PHP_WIN32)
#define PHP_OCI8_LIB_PATH_MSG "PATH"
#elif defined(__APPLE__)
#define PHP_OCI8_LIB_PATH_MSG "DYLD_LIBRARY_PATH"
+#elif defined(_AIX)
+#define PHP_OCI8_LIB_PATH_MSG "LIBPATH"
+#elif defined(__hpux)
+#define PHP_OCI8_LIB_PATH_MSG "SHLIB_PATH"
#else
#define PHP_OCI8_LIB_PATH_MSG "LD_LIBRARY_PATH"
#endif
@@ -106,7 +109,12 @@ zend_class_entry *oci_coll_class_entry_ptr;
#define SQLT_CFILEE 115
#endif
-#define PHP_OCI_ERRBUF_LEN 1024
+#ifdef OCI_ERROR_MAXMSG_SIZE2
+/* Bigger size is defined from 11.2.0.3 onwards */
+#define PHP_OCI_ERRBUF_LEN OCI_ERROR_MAXMSG_SIZE2
+#else
+#define PHP_OCI_ERRBUF_LEN OCI_ERROR_MAXMSG_SIZE
+#endif
#if ZEND_MODULE_API_NO > 20020429
#define ONUPDATELONGFUNC OnUpdateLong
@@ -1063,7 +1071,7 @@ static void php_oci_init_global_handles(TSRMLS_D)
{
sword errstatus;
sb4 ora_error_code = 0;
- text tmp_buf[PHP_OCI_ERRBUF_LEN];
+ text tmp_buf[OCI_ERROR_MAXMSG_SIZE]; /* Use traditional smaller size: non-PL/SQL errors should fit and it keeps the stack smaller */
errstatus = OCIEnvNlsCreate(&OCI_G(env), PHP_OCI_INIT_MODE, 0, NULL, NULL, NULL, 0, NULL, 0, 0);
@@ -1074,7 +1082,7 @@ static void php_oci_init_global_handles(TSRMLS_D)
php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCIEnvNlsCreate() failed. There is something wrong with your system - please check that ORACLE_HOME and " PHP_OCI8_LIB_PATH_MSG " are set and point to the right directories");
#endif
if (OCI_G(env)
- && OCIErrorGet(OCI_G(env), (ub4)1, NULL, &ora_error_code, tmp_buf, (ub4)PHP_OCI_ERRBUF_LEN, (ub4)OCI_HTYPE_ENV) == OCI_SUCCESS
+ && OCIErrorGet(OCI_G(env), (ub4)1, NULL, &ora_error_code, tmp_buf, (ub4)OCI_ERROR_MAXMSG_SIZE, (ub4)OCI_HTYPE_ENV) == OCI_SUCCESS
&& *tmp_buf) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", tmp_buf);
}
@@ -1103,7 +1111,7 @@ static void php_oci_init_global_handles(TSRMLS_D)
PHP_OCI_CALL(OCIHandleFree, (cpoolh, OCI_HTYPE_CPOOL));
#endif
} else {
- OCIErrorGet(OCI_G(env), (ub4)1, NULL, &ora_error_code, tmp_buf, (ub4)PHP_OCI_ERRBUF_LEN, (ub4)OCI_HTYPE_ERROR);
+ OCIErrorGet(OCI_G(env), (ub4)1, NULL, &ora_error_code, tmp_buf, (ub4)OCI_ERROR_MAXMSG_SIZE, (ub4)OCI_HTYPE_ERROR);
if (ora_error_code) {
int tmp_buf_len = strlen((char *)tmp_buf);
@@ -1333,7 +1341,7 @@ PHP_MINFO_FUNCTION(oci)
php_info_print_table_start();
php_info_print_table_row(2, "OCI8 Support", "enabled");
php_info_print_table_row(2, "Version", PHP_OCI8_VERSION);
- php_info_print_table_row(2, "Revision", "$Revision: 313688 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 321634 $");
snprintf(buf, sizeof(buf), "%ld", OCI_G(num_persistent));
php_info_print_table_row(2, "Active Persistent Connections", buf);
@@ -1624,9 +1632,9 @@ sb4 php_oci_error(OCIError *err_p, sword status TSRMLS_DC)
php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCI_NEED_DATA");
break;
case OCI_NO_DATA:
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCI_NO_DATA");
errcode = php_oci_fetch_errmsg(err_p, &errbuf TSRMLS_CC);
if (errbuf) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", errbuf);
efree(errbuf);
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCI_NO_DATA: failed to fetch error message");
@@ -2046,7 +2054,14 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
connection->is_persistent = 0;
} else {
connection = (php_oci_connection *) calloc(1, sizeof(php_oci_connection));
+ if (connection == NULL) {
+ return NULL;
+ }
connection->hash_key = zend_strndup(hashed_details.c, hashed_details.len);
+ if (connection->hash_key == NULL) {
+ free(connection);
+ return NULL;
+ }
connection->is_persistent = 1;
}
} else {
@@ -2181,10 +2196,10 @@ static int php_oci_connection_ping(php_oci_connection *connection TSRMLS_DC)
return 1;
} else {
sb4 error_code = 0;
- text tmp_buf[PHP_OCI_ERRBUF_LEN];
+ text tmp_buf[OCI_ERROR_MAXMSG_SIZE];
/* Treat ORA-1010 as a successful Ping */
- OCIErrorGet(OCI_G(err), (ub4)1, NULL, &error_code, tmp_buf, (ub4)PHP_OCI_ERRBUF_LEN, (ub4)OCI_HTYPE_ERROR);
+ OCIErrorGet(OCI_G(err), (ub4)1, NULL, &error_code, tmp_buf, (ub4)OCI_ERROR_MAXMSG_SIZE, (ub4)OCI_HTYPE_ERROR);
if (error_code == 1010) {
return 1;
}
@@ -2696,12 +2711,20 @@ static php_oci_spool *php_oci_create_spool(char *username, int username_len, cha
ub4 poolmode = OCI_DEFAULT; /* Mode to be passed to OCISessionPoolCreate */
OCIAuthInfo *spoolAuth = NULL;
- /*Allocate sessionpool out of persistent memory */
+ /* Allocate sessionpool out of persistent memory */
session_pool = (php_oci_spool *) calloc(1, sizeof(php_oci_spool));
+ if (session_pool == NULL) {
+ iserror = 1;
+ goto exit_create_spool;
+ }
/* Populate key if passed */
if (hash_key_len) {
session_pool->spool_hash_key = zend_strndup(hash_key, hash_key_len);
+ if (session_pool->spool_hash_key == NULL) {
+ iserror = 1;
+ goto exit_create_spool;
+ }
}
/* Create the session pool's env */
@@ -2893,11 +2916,20 @@ static OCIEnv *php_oci_create_env(ub2 charsetid TSRMLS_DC)
PHP_OCI_CALL_RETURN(OCI_G(errcode), OCIEnvNlsCreate, (&retenv, OCI_G(events) ? PHP_OCI_INIT_MODE | OCI_EVENTS : PHP_OCI_INIT_MODE, 0, NULL, NULL, NULL, 0, NULL, charsetid, charsetid));
if (OCI_G(errcode) != OCI_SUCCESS) {
+ sb4 ora_error_code = 0;
+ text ora_msg_buf[OCI_ERROR_MAXMSG_SIZE]; /* Use traditional smaller size: non-PL/SQL errors should fit and it keeps the stack smaller */
+
#ifdef HAVE_OCI_INSTANT_CLIENT
php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCIEnvNlsCreate() failed. There is something wrong with your system - please check that " PHP_OCI8_LIB_PATH_MSG " includes the directory with Oracle Instant Client libraries");
#else
php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCIEnvNlsCreate() failed. There is something wrong with your system - please check that ORACLE_HOME and " PHP_OCI8_LIB_PATH_MSG " are set and point to the right directories");
#endif
+ if (retenv
+ && OCIErrorGet(retenv, (ub4)1, NULL, &ora_error_code, ora_msg_buf, (ub4)OCI_ERROR_MAXMSG_SIZE, (ub4)OCI_HTYPE_ENV) == OCI_SUCCESS
+ && *ora_msg_buf) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ora_msg_buf);
+ }
+
return NULL;
}
return retenv;
diff --git a/ext/oci8/oci8_collection.c b/ext/oci8/oci8_collection.c
index 3ee5dc888..480da34cb 100644
--- a/ext/oci8/oci8_collection.c
+++ b/ext/oci8/oci8_collection.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2011 The PHP Group |
+ | Copyright (c) 1997-2012 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -25,7 +25,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: oci8_collection.c 306939 2011-01-01 02:19:59Z felipe $ */
+/* $Id: oci8_collection.c 321634 2012-01-01 13:15:04Z felipe $ */
diff --git a/ext/oci8/oci8_interface.c b/ext/oci8/oci8_interface.c
index e405f12f4..80645fc78 100644
--- a/ext/oci8/oci8_interface.c
+++ b/ext/oci8/oci8_interface.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2011 The PHP Group |
+ | Copyright (c) 1997-2012 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -25,7 +25,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: oci8_interface.c 312017 2011-06-10 17:38:07Z sixd $ */
+/* $Id: oci8_interface.c 321634 2012-01-01 13:15:04Z felipe $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/oci8/oci8_lob.c b/ext/oci8/oci8_lob.c
index 1045e35c1..dd92f0302 100644
--- a/ext/oci8/oci8_lob.c
+++ b/ext/oci8/oci8_lob.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2011 The PHP Group |
+ | Copyright (c) 1997-2012 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -25,7 +25,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: oci8_lob.c 313754 2011-07-27 00:04:23Z sixd $ */
+/* $Id: oci8_lob.c 321634 2012-01-01 13:15:04Z felipe $ */
diff --git a/ext/oci8/oci8_statement.c b/ext/oci8/oci8_statement.c
index fe5ba8399..1f5f171ee 100644
--- a/ext/oci8/oci8_statement.c
+++ b/ext/oci8/oci8_statement.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2011 The PHP Group |
+ | Copyright (c) 1997-2012 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -25,7 +25,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: oci8_statement.c 313754 2011-07-27 00:04:23Z sixd $ */
+/* $Id: oci8_statement.c 321634 2012-01-01 13:15:04Z felipe $ */
#ifdef HAVE_CONFIG_H
diff --git a/ext/oci8/package.xml b/ext/oci8/package.xml
index 0bb6eb532..d3a912832 100644
--- a/ext/oci8/package.xml
+++ b/ext/oci8/package.xml
@@ -33,12 +33,12 @@ http://pear.php.net/dtd/package-2.0.xsd">
<active>no</active>
</lead>
- <date>2011-06-10</date>
+ <date>2011-11-18</date>
<time>12:00:00</time>
<version>
- <release>1.4.6</release>
- <api>1.4.6</api>
+ <release>1.4.7</release>
+ <api>1.4.7</api>
</version>
<stability>
<release>stable</release>
@@ -46,8 +46,11 @@ http://pear.php.net/dtd/package-2.0.xsd">
</stability>
<license uri="http://www.php.net/license">PHP</license>
<notes>
- Added oci_client_version() returning the runtime Oracle client library version
- Made OCI8 extension buildable with PHP 5.4-development code
+ 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>
<contents>
<dir name="/">
@@ -66,6 +69,8 @@ http://pear.php.net/dtd/package-2.0.xsd">
<file name="array_bind_012.phpt" role="test" />
<file name="array_bind_013.phpt" role="test" />
<file name="array_bind_014.phpt" role="test" />
+ <file name="array_bind_bdouble.phpt" role="test" />
+ <file name="array_bind_bfloat.phpt" role="test" />
<file name="array_bind_date1.phpt" role="test" />
<file name="array_bind_date.phpt" role="test" />
<file name="array_bind_float1.phpt" role="test" />
@@ -74,6 +79,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
<file name="array_bind_int.phpt" role="test" />
<file name="array_bind_str1.phpt" role="test" />
<file name="array_bind_str.phpt" role="test" />
+ <file name="array_bind_uin.phpt" role="test" />
<file name="b47243_1.phpt" role="test" />
<file name="b47243_2.phpt" role="test" />
<file name="b47243_3.phpt" role="test" />
@@ -251,6 +257,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
<file name="edition_2.phpt" role="test" />
<file name="error1.phpt" role="test" />
<file name="error2.phpt" role="test" />
+ <file name="error3.phpt" role="test" />
<file name="error_bind.phpt" role="test" />
<file name="error_old.phpt" role="test" />
<file name="error_parse.phpt" role="test" />
@@ -338,7 +345,6 @@ http://pear.php.net/dtd/package-2.0.xsd">
<file name="null_byte_2.phpt" role="test" />
<file name="null_byte_3.phpt" role="test" />
<file name="num.phpt" role="test" />
- <file name="oci8safemode.phpt" role="test" />
<file name="oci_execute_segfault.phpt" role="test" />
<file name="old_oci_close1.phpt" role="test" />
<file name="old_oci_close.phpt" role="test" />
@@ -410,6 +416,22 @@ http://pear.php.net/dtd/package-2.0.xsd">
<release>
<version>
+ <release>1.4.6</release>
+ <api>1.4.6</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.php.net/license">PHP</license>
+ <notes>
+ Added oci_client_version() returning the runtime Oracle client library version
+ Made OCI8 extension buildable with PHP 5.4-development code
+ </notes>
+</release>
+
+<release>
+ <version>
<release>1.4.5</release>
<api>1.4.5</api>
</version>
diff --git a/ext/oci8/php_oci8.h b/ext/oci8/php_oci8.h
index 5a5c8d0b7..74704ccf8 100644
--- a/ext/oci8/php_oci8.h
+++ b/ext/oci8/php_oci8.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2011 The PHP Group |
+ | Copyright (c) 1997-2012 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -25,7 +25,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_oci8.h 312535 2011-06-27 17:24:55Z sixd $ */
+/* $Id: php_oci8.h 321634 2012-01-01 13:15:04Z felipe $ */
#if HAVE_OCI8
# ifndef PHP_OCI8_H
@@ -46,7 +46,7 @@
*/
#undef PHP_OCI8_VERSION
#endif
-#define PHP_OCI8_VERSION "1.4.6"
+#define PHP_OCI8_VERSION "1.4.7"
extern zend_module_entry oci8_module_entry;
#define phpext_oci8_ptr &oci8_module_entry
diff --git a/ext/oci8/php_oci8_int.h b/ext/oci8/php_oci8_int.h
index c88284816..3c2c25de8 100644
--- a/ext/oci8/php_oci8_int.h
+++ b/ext/oci8/php_oci8_int.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2011 The PHP Group |
+ | Copyright (c) 1997-2012 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -25,7 +25,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_oci8_int.h 313754 2011-07-27 00:04:23Z sixd $ */
+/* $Id: php_oci8_int.h 321634 2012-01-01 13:15:04Z felipe $ */
#if HAVE_OCI8
# ifndef PHP_OCI8_INT_H
diff --git a/ext/oci8/tests/array_bind_003.phpt b/ext/oci8/tests/array_bind_003.phpt
index 94bce02e3..0875c694f 100644
--- a/ext/oci8/tests/array_bind_003.phpt
+++ b/ext/oci8/tests/array_bind_003.phpt
@@ -62,7 +62,9 @@ var_dump($array);
echo "Done\n";
?>
--EXPECTF--
-Warning: oci_execute(): OCI_NO_DATA in %s on line %d
+Warning: oci_execute(): ORA-01403: %s
+ORA-06512: at "SYSTEM.ARRAYBINDPKG1", line %d
+ORA-06512: at line %d in %sarray_bind_003.php on line %d
array(4) {
[0]=>
string(9) "06-DEC-05"
diff --git a/ext/oci8/tests/array_bind_004.phpt b/ext/oci8/tests/array_bind_004.phpt
index 1eb1fc7fa..df74025d7 100644
--- a/ext/oci8/tests/array_bind_004.phpt
+++ b/ext/oci8/tests/array_bind_004.phpt
@@ -62,7 +62,9 @@ var_dump($array);
echo "Done\n";
?>
--EXPECTF--
-Warning: oci_execute(): OCI_NO_DATA in %s on line %d
+Warning: oci_execute(): ORA-01403: %s
+ORA-06512: at "SYSTEM.ARRAYBINDPKG1", line %d
+ORA-06512: at line %d in %sarray_bind_004.php on line %d
array(0) {
}
Done
diff --git a/ext/oci8/tests/array_bind_bdouble.phpt b/ext/oci8/tests/array_bind_bdouble.phpt
new file mode 100644
index 000000000..1bb95b236
--- /dev/null
+++ b/ext/oci8/tests/array_bind_bdouble.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Unsupported type: oci_bind_array_by_name() and SQLT_BDOUBLE
+--SKIPIF--
+<?php
+$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
+require(dirname(__FILE__).'/skipif.inc');
+?>
+--FILE--
+<?php
+
+require dirname(__FILE__).'/connect.inc';
+
+$statement = oci_parse($c, "BEGIN ARRAYBINDPKG1.iobind(:c1); END;");
+$array = Array(1.243,2.5658,3.4234,4.2123,5.9999);
+oci_bind_array_by_name($statement, ":c1", $array, 5, 5, SQLT_BDOUBLE);
+
+echo "Done\n";
+?>
+--EXPECTF--
+Warning: oci_bind_array_by_name(): Unknown or unsupported datatype given: 22 in %sarray_bind_bdouble.php on line %d
+Done
diff --git a/ext/oci8/tests/array_bind_bfloat.phpt b/ext/oci8/tests/array_bind_bfloat.phpt
new file mode 100644
index 000000000..0b8fad6e6
--- /dev/null
+++ b/ext/oci8/tests/array_bind_bfloat.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Unsupported type: oci_bind_array_by_name() and SQLT_BFLOAT
+--SKIPIF--
+<?php
+$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
+require(dirname(__FILE__).'/skipif.inc');
+?>
+--FILE--
+<?php
+
+require dirname(__FILE__).'/connect.inc';
+
+$statement = oci_parse($c, "BEGIN ARRAYBINDPKG1.iobind(:c1); END;");
+$array = Array(1.243,2.5658,3.4234,4.2123,5.9999);
+oci_bind_array_by_name($statement, ":c1", $array, 5, 5, SQLT_BFLOAT);
+
+echo "Done\n";
+?>
+--EXPECTF--
+Warning: oci_bind_array_by_name(): Unknown or unsupported datatype given: 21 in %sarray_bind_bfloat.php on line %d
+Done
diff --git a/ext/oci8/tests/array_bind_uin.phpt b/ext/oci8/tests/array_bind_uin.phpt
new file mode 100644
index 000000000..3ce039e0d
--- /dev/null
+++ b/ext/oci8/tests/array_bind_uin.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Unsupported type: oci_bind_array_by_name() and SQLT_UIN
+--SKIPIF--
+<?php
+$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
+require(dirname(__FILE__).'/skipif.inc');
+?>
+--FILE--
+<?php
+
+require dirname(__FILE__).'/connect.inc';
+
+$statement = oci_parse($c, "BEGIN ARRAYBINDPKG1.iobind(:c1); END;");
+$array = Array(1.243,2.5658,3.4234,4.2123,5.9999);
+oci_bind_array_by_name($statement, ":c1", $array, 5, 5, SQLT_UIN);
+
+echo "Done\n";
+?>
+--EXPECTF--
+Warning: oci_bind_array_by_name(): Unknown or unsupported datatype given: 68 in %sarray_bind_uin.php on line %d
+Done
diff --git a/ext/oci8/tests/bind_char_1.phpt b/ext/oci8/tests/bind_char_1.phpt
index a668294d4..91fa4b75b 100644
--- a/ext/oci8/tests/bind_char_1.phpt
+++ b/ext/oci8/tests/bind_char_1.phpt
@@ -4,9 +4,13 @@ SELECT oci_bind_by_name with SQLT_AFC aka CHAR
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
-if (preg_match('/Release 1[01]\.2\./', oci_server_version($c), $matches) !== 1) {
- die("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases");
-} else if (preg_match('/^11\./', oci_client_version()) != 1) {
+// The bind buffer size edge cases seem to change each DB version.
+if (preg_match('/Release 10\.2\./', oci_server_version($c), $matches) !== 1) {
+ if (preg_match('/Release 11\.2\.0\.2/', oci_server_version($c), $matches) !== 2) {
+ die("skip expected output only valid when using Oracle 10gR2 or 11.2.0.2 databases");
+ }
+}
+if (preg_match('/^11\./', oci_client_version()) != 1) {
die("skip test expected to work only with Oracle 11g or greater version of client");
}
?>
diff --git a/ext/oci8/tests/bind_char_1_11gR1.phpt b/ext/oci8/tests/bind_char_1_11gR1.phpt
index 55973a61b..a7feff9f6 100644
--- a/ext/oci8/tests/bind_char_1_11gR1.phpt
+++ b/ext/oci8/tests/bind_char_1_11gR1.phpt
@@ -4,12 +4,15 @@ SELECT oci_bind_by_name with SQLT_AFC aka CHAR
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
-$sv = oci_server_version($c);
-$sv = preg_match('/Release 11\.1\./', $sv, $matches);
-if ($sv !== 1) {
- die ("skip expected output only valid when using Oracle 11gR1 database");
+// The bind buffer size edge cases seem to change each DB version.
+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");
+ }
}
?>
+--ENV--
+NLS_LANG=
--FILE--
<?php
diff --git a/ext/oci8/tests/bind_char_2.phpt b/ext/oci8/tests/bind_char_2.phpt
index 53785e066..43661a065 100644
--- a/ext/oci8/tests/bind_char_2.phpt
+++ b/ext/oci8/tests/bind_char_2.phpt
@@ -4,9 +4,13 @@ SELECT oci_bind_by_name with SQLT_AFC aka CHAR and dates
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
-if (preg_match('/Release 1[01]\.2\./', oci_server_version($c), $matches) !== 1) {
- die("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases");
-} else if (preg_match('/^11\./', oci_client_version()) != 1) {
+// The bind buffer size edge cases seem to change each DB version.
+if (preg_match('/Release 10\.2\./', oci_server_version($c), $matches) !== 1) {
+ if (preg_match('/Release 11\.2\.0\.2/', oci_server_version($c), $matches) !== 2) {
+ die("skip expected output only valid when using Oracle 10gR2 or 11.2.0.2 databases");
+ }
+}
+if (preg_match('/^11\./', oci_client_version()) != 1) {
die("skip test expected to work only with Oracle 11g or greater version of client");
}
?>
diff --git a/ext/oci8/tests/bind_char_2_11gR1.phpt b/ext/oci8/tests/bind_char_2_11gR1.phpt
index 357a716e6..8bb28733f 100644
--- a/ext/oci8/tests/bind_char_2_11gR1.phpt
+++ b/ext/oci8/tests/bind_char_2_11gR1.phpt
@@ -4,12 +4,15 @@ SELECT oci_bind_by_name with SQLT_AFC aka CHAR and dates
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
-$sv = oci_server_version($c);
-$sv = preg_match('/Release 11\.1\./', $sv, $matches);
-if ($sv !== 1) {
- die ("skip expected output only valid when using Oracle 11gR1 database");
+// 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\.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");
+ }
}
?>
+--ENV--
+NLS_LANG=
--FILE--
<?php
diff --git a/ext/oci8/tests/bind_char_3.phpt b/ext/oci8/tests/bind_char_3.phpt
index a459f616b..25115836d 100644
--- a/ext/oci8/tests/bind_char_3.phpt
+++ b/ext/oci8/tests/bind_char_3.phpt
@@ -4,9 +4,13 @@ PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to CHAR parameter
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
-if (preg_match('/Release 1[01]\.2\./', oci_server_version($c), $matches) !== 1) {
- die("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases");
-} else if (preg_match('/^11\./', oci_client_version()) != 1) {
+// The bind buffer size edge cases seem to change each DB version.
+if (preg_match('/Release 10\.2\./', oci_server_version($c), $matches) !== 1) {
+ if (preg_match('/Release 11\.2\.0\.2/', oci_server_version($c), $matches) !== 2) {
+ die("skip expected output only valid when using Oracle 10gR2 or 11.2.0.2 databases");
+ }
+}
+if (preg_match('/^11\./', oci_client_version()) != 1) {
die("skip test expected to work only with Oracle 11g or greater version of client");
}
?>
diff --git a/ext/oci8/tests/bind_char_3_11gR1.phpt b/ext/oci8/tests/bind_char_3_11gR1.phpt
index 1e7da47ed..4c6241ccf 100644
--- a/ext/oci8/tests/bind_char_3_11gR1.phpt
+++ b/ext/oci8/tests/bind_char_3_11gR1.phpt
@@ -4,12 +4,15 @@ PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to CHAR parameter
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
-$sv = oci_server_version($c);
-$sv = preg_match('/Release 11\.1\./', $sv, $matches);
-if ($sv !== 1) {
- die ("skip expected output only valid when using Oracle 11gR1 database");
+// 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\.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");
+ }
}
?>
+--ENV--
+NLS_LANG=
--FILE--
<?php
diff --git a/ext/oci8/tests/bind_char_4.phpt b/ext/oci8/tests/bind_char_4.phpt
index 34d703c52..36765f813 100644
--- a/ext/oci8/tests/bind_char_4.phpt
+++ b/ext/oci8/tests/bind_char_4.phpt
@@ -4,9 +4,13 @@ PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to VARCHAR2 parameter
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
-if (preg_match('/Release 1[01]\.2\./', oci_server_version($c), $matches) !== 1) {
- die("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases");
-} else if (preg_match('/^11\./', oci_client_version()) != 1) {
+// The bind buffer size edge cases seem to change each DB version.
+if (preg_match('/Release 10\.2\./', oci_server_version($c), $matches) !== 1) {
+ if (preg_match('/Release 11\.2\.0\.2/', oci_server_version($c), $matches) !== 2) {
+ die("skip expected output only valid when using Oracle 10gR2 or 11.2.0.2 databases");
+ }
+}
+if (preg_match('/^11\./', oci_client_version()) != 1) {
die("skip test expected to work only with Oracle 11g or greater version of client");
}
?>
diff --git a/ext/oci8/tests/bind_char_4_11gR1.phpt b/ext/oci8/tests/bind_char_4_11gR1.phpt
index 87b7daba8..14d587885 100644
--- a/ext/oci8/tests/bind_char_4_11gR1.phpt
+++ b/ext/oci8/tests/bind_char_4_11gR1.phpt
@@ -4,12 +4,15 @@ PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to VARCHAR2 parameter
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
-$sv = oci_server_version($c);
-$sv = preg_match('/Release 11\.1\./', $sv, $matches);
-if ($sv !== 1) {
- die ("skip expected output only valid when using Oracle 11gR1 database");
+// 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\.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");
+ }
}
?>
+--ENV--
+NLS_LANG=
--FILE--
<?php
diff --git a/ext/oci8/tests/bug27303_1.phpt b/ext/oci8/tests/bug27303_1.phpt
index 028f5b793..40ab4ebed 100644
--- a/ext/oci8/tests/bug27303_1.phpt
+++ b/ext/oci8/tests/bug27303_1.phpt
@@ -4,9 +4,13 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters)
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
-if (preg_match('/Release 1[01]\.2\./', oci_server_version($c), $matches) !== 1) {
- die("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases");
-} else if (preg_match('/^11\./', oci_client_version()) != 1) {
+// The bind buffer size edge cases seem to change each DB version.
+if (preg_match('/Release 10\.2\.0\.2/', oci_server_version($c), $matches) !== 1 &&
+ preg_match('/Release 11\.2\.0\.2/', oci_server_version($c), $matches) !== 1) {
+ die("skip expected output only valid when using Oracle 10.2.0.2 or 11.2.0.2 databases");
+ // Other point releases may also work
+}
+if (preg_match('/^11\./', oci_client_version()) != 1) {
die("skip test expected to work only with Oracle 11g or greater version of client");
}
?>
diff --git a/ext/oci8/tests/bug27303_1_11gR1.phpt b/ext/oci8/tests/bug27303_1_11gR1.phpt
index 20097613f..6de9b9937 100644
--- a/ext/oci8/tests/bug27303_1_11gR1.phpt
+++ b/ext/oci8/tests/bug27303_1_11gR1.phpt
@@ -4,10 +4,13 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters)
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
-$sv = oci_server_version($c);
-$sv = preg_match('/Release 11\.1\./', $sv, $matches);
-if ($sv !== 1) {
- die ("skip expected output only valid when using Oracle 11gR1 database");
+// The bind buffer size edge cases seem to change each DB version.
+if (preg_match('/Release 10\.2\.0\.3/', oci_server_version($c), $matches) !== 1) {
+ if (preg_match('/Release 11\.1\.0\.6/', 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 specific Oracle database versions");
+ }
+ }
}
?>
--FILE--
diff --git a/ext/oci8/tests/bug27303_2.phpt b/ext/oci8/tests/bug27303_2.phpt
index e7564ac21..1fb2b3168 100644
--- a/ext/oci8/tests/bug27303_2.phpt
+++ b/ext/oci8/tests/bug27303_2.phpt
@@ -4,9 +4,13 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters)
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
-if (preg_match('/Release 1[01]\.2\./', oci_server_version($c), $matches) !== 1) {
- die("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases");
-} else if (preg_match('/^11\./', oci_client_version()) != 1) {
+// The bind buffer size edge cases seem to change each DB version.
+if (preg_match('/Release 10\.2\.0\.2/', oci_server_version($c), $matches) !== 1 &&
+ preg_match('/Release 11\.2\.0\.2/', oci_server_version($c), $matches) !== 1) {
+ die("skip expected output only valid when using Oracle 10.2.0.2 or 11.2.0.2 databases");
+ // Other point releases may also work
+}
+if (preg_match('/^11\./', oci_client_version()) != 1) {
die("skip test expected to work only with Oracle 11g or greater version of client");
}
?>
diff --git a/ext/oci8/tests/bug27303_2_11gR1.phpt b/ext/oci8/tests/bug27303_2_11gR1.phpt
index c2b5c433c..1e3e3105a 100644
--- a/ext/oci8/tests/bug27303_2_11gR1.phpt
+++ b/ext/oci8/tests/bug27303_2_11gR1.phpt
@@ -4,10 +4,13 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters)
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
-$sv = oci_server_version($c);
-$sv = preg_match('/Release 11\.1\./', $sv, $matches);
-if ($sv !== 1) {
- die ("skip expected output only valid when using Oracle 11gR1 database");
+// The bind buffer size edge cases seem to change each DB version.
+if (preg_match('/Release 10\.2\.0\.3/', oci_server_version($c), $matches) !== 1) {
+ if (preg_match('/Release 11\.1\.0\.6/', 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 specific Oracle database versions");
+ }
+ }
}
?>
--FILE--
diff --git a/ext/oci8/tests/bug27303_4.phpt b/ext/oci8/tests/bug27303_4.phpt
index 0dcfed913..3137db865 100644
--- a/ext/oci8/tests/bug27303_4.phpt
+++ b/ext/oci8/tests/bug27303_4.phpt
@@ -4,9 +4,13 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters)
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
-if (preg_match('/Release 1[01]\.2\./', oci_server_version($c), $matches) !== 1) {
- die("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases");
-} else if (preg_match('/^11\./', oci_client_version()) != 1) {
+// The bind buffer size edge cases seem to change each DB version.
+if (preg_match('/Release 10\.2\.0\.2/', oci_server_version($c), $matches) !== 1 &&
+ preg_match('/Release 11\.2\.0\.2/', oci_server_version($c), $matches) !== 1) {
+ die("skip expected output only valid when using Oracle 10.2.0.2 or 11.2.0.2 databases");
+ // Other point releases may also work
+}
+if (preg_match('/^11\./', oci_client_version()) != 1) {
die("skip test expected to work only with Oracle 11g or greater version of client");
}
?>
@@ -23,10 +27,7 @@ $create_st[] = "drop table mytab";
$create_st[] = "create sequence myseq";
$create_st[] = "create table mytab (mydata varchar2(20), seqcol number)";
-foreach ($create_st as $statement) {
- $stmt = oci_parse($c, $statement);
- oci_execute($stmt);
-}
+oci8_test_sql_execute($c, $create_st);
define('MYLIMIT', 200);
@@ -50,10 +51,7 @@ $drop_st = array();
$drop_st[] = "drop sequence myseq";
$drop_st[] = "drop table mytab";
-foreach ($create_st as $statement) {
- $stmt = oci_parse($c, $statement);
- oci_execute($stmt);
-}
+oci8_test_sql_execute($c, $drop_st);
echo "Done\n";
?>
diff --git a/ext/oci8/tests/bug27303_4_11gR1.phpt b/ext/oci8/tests/bug27303_4_11gR1.phpt
index 0c88360be..f9bc2da8a 100644
--- a/ext/oci8/tests/bug27303_4_11gR1.phpt
+++ b/ext/oci8/tests/bug27303_4_11gR1.phpt
@@ -4,10 +4,13 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters)
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
-$sv = oci_server_version($c);
-$sv = preg_match('/Release 11\.1\./', $sv, $matches);
-if ($sv !== 1) {
- die ("skip expected output only valid when using Oracle 11gR1 database");
+// The bind buffer size edge cases seem to change each DB version.
+if (preg_match('/Release 10\.2\.0\.3/', oci_server_version($c), $matches) !== 1) {
+ if (preg_match('/Release 11\.1\.0\.6/', 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 specific Oracle database versions");
+ }
+ }
}
?>
--FILE--
@@ -21,10 +24,7 @@ $create_st[] = "drop table mytab";
$create_st[] = "create sequence myseq";
$create_st[] = "create table mytab (mydata varchar2(20), seqcol number)";
-foreach ($create_st as $statement) {
- $stmt = oci_parse($c, $statement);
- oci_execute($stmt);
-}
+oci8_test_sql_execute($c, $create_st);
define('MYLIMIT', 200);
@@ -48,10 +48,7 @@ $drop_st = array();
$drop_st[] = "drop sequence myseq";
$drop_st[] = "drop table mytab";
-foreach ($create_st as $statement) {
- $stmt = oci_parse($c, $statement);
- oci_execute($stmt);
-}
+oci8_test_sql_execute($c, $drop_st);
echo "Done\n";
?>
diff --git a/ext/oci8/tests/bug42496_1.phpt b/ext/oci8/tests/bug42496_1.phpt
index abf6cc8c7..d430474fa 100644
--- a/ext/oci8/tests/bug42496_1.phpt
+++ b/ext/oci8/tests/bug42496_1.phpt
@@ -4,7 +4,7 @@ Bug #42496 (LOB fetch leaks cursors, eventually failing with ORA-1000 maximum op
<?php
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
require(dirname(__FILE__).'/skipif.inc');
-if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE');
+if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
?>
--FILE--
<?php
@@ -14,11 +14,11 @@ require dirname(__FILE__).'/connect.inc';
// Initialization
$stmtarray = array(
- "DROP table bug42496_tab",
- "CREATE table bug42496_tab(c1 CLOB, c2 CLOB)",
- "INSERT INTO bug42496_tab VALUES('test1', 'test1')",
- "INSERT INTO bug42496_tab VALUES('test2', 'test2')",
- "INSERT INTO bug42496_tab VALUES('test3', 'test3')"
+ "DROP table bug42496_1_tab",
+ "CREATE table bug42496_1_tab(c1 CLOB, c2 CLOB)",
+ "INSERT INTO bug42496_1_tab VALUES('test1', 'test1')",
+ "INSERT INTO bug42496_1_tab VALUES('test2', 'test2')",
+ "INSERT INTO bug42496_1_tab VALUES('test3', 'test3')"
);
oci8_test_sql_execute($c, $stmtarray);
@@ -28,7 +28,7 @@ oci8_test_sql_execute($c, $stmtarray);
echo "Test 1\n";
for ($i = 0; $i < 15000; $i++) {
- $s = oci_parse($c, "SELECT * from bug42496_tab");
+ $s = oci_parse($c, "SELECT * from bug42496_1_tab");
oci_define_by_name($s, "C1", $col1);
oci_define_by_name($s, "C2", $col2);
if (oci_execute($s)) {
@@ -46,7 +46,7 @@ echo "Done\n";
// Cleanup
$stmtarray = array(
- "DROP table bug42496_tab"
+ "DROP table bug42496_1_tab"
);
oci8_test_sql_execute($c, $stmtarray);
diff --git a/ext/oci8/tests/bug42496_2.phpt b/ext/oci8/tests/bug42496_2.phpt
index 8c4b79141..71854f3d4 100644
--- a/ext/oci8/tests/bug42496_2.phpt
+++ b/ext/oci8/tests/bug42496_2.phpt
@@ -4,7 +4,7 @@ Bug #42496 (LOB fetch leaks cursors, eventually failing with ORA-1000 maximum op
<?php
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
require(dirname(__FILE__).'/skipif.inc');
-if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE');
+if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
?>
--FILE--
<?php
@@ -14,11 +14,11 @@ require dirname(__FILE__).'/connect.inc';
// Initialization
$stmtarray = array(
- "DROP table bug42496_tab",
- "CREATE table bug42496_tab(c1 CLOB, c2 CLOB)",
- "INSERT INTO bug42496_tab VALUES('test1', 'test1')",
- "INSERT INTO bug42496_tab VALUES('test2', 'test2')",
- "INSERT INTO bug42496_tab VALUES('test3', 'test3')"
+ "DROP table bug42496_2_tab",
+ "CREATE table bug42496_2_tab(c1 CLOB, c2 CLOB)",
+ "INSERT INTO bug42496_2_tab VALUES('test1', 'test1')",
+ "INSERT INTO bug42496_2_tab VALUES('test2', 'test2')",
+ "INSERT INTO bug42496_2_tab VALUES('test3', 'test3')"
);
oci8_test_sql_execute($c, $stmtarray);
@@ -28,7 +28,7 @@ oci8_test_sql_execute($c, $stmtarray);
echo "Test 2\n";
for ($i = 0; $i < 15000; $i++) {
- $s = oci_parse($c, "SELECT * from bug42496_tab");
+ $s = oci_parse($c, "SELECT * from bug42496_2_tab");
if (oci_execute($s)) {
$arr = array();
while ($arr = oci_fetch_assoc($s)) {
@@ -44,7 +44,7 @@ echo "Done\n";
// Cleanup
$stmtarray = array(
- "DROP table bug42496_tab"
+ "DROP table bug42496_2_tab"
);
oci8_test_sql_execute($c, $stmtarray);
diff --git a/ext/oci8/tests/bug43497.phpt b/ext/oci8/tests/bug43497.phpt
index 600fb047b..8c57fabee 100644
--- a/ext/oci8/tests/bug43497.phpt
+++ b/ext/oci8/tests/bug43497.phpt
@@ -4,7 +4,7 @@ Bug #43497 (OCI8 XML/getClobVal aka temporary LOBs leak UGA memory)
<?php
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
require(dirname(__FILE__).'/skipif.inc');
-if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE');
+if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
if (preg_match('/^1[01]\./', oci_client_version()) != 1) {
die("skip expected output only valid with Oracle 10g or greater version of client");
}
diff --git a/ext/oci8/tests/bug43497_92.phpt b/ext/oci8/tests/bug43497_92.phpt
index 932a863d7..d4201257c 100644
--- a/ext/oci8/tests/bug43497_92.phpt
+++ b/ext/oci8/tests/bug43497_92.phpt
@@ -4,7 +4,7 @@ Bug #43497 (OCI8 XML/getClobVal aka temporary LOBs leak UGA memory)
<?php
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
require(dirname(__FILE__).'/skipif.inc');
-if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE');
+if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
if (preg_match('/Unknown/', oci_client_version()) != 1) {
die("skip expected output only valid with Oracle 9gR2 clients");
}
diff --git a/ext/oci8/tests/bug44113.phpt b/ext/oci8/tests/bug44113.phpt
index aa4f2bb8e..d44171561 100644
--- a/ext/oci8/tests/bug44113.phpt
+++ b/ext/oci8/tests/bug44113.phpt
@@ -4,7 +4,7 @@ Bug #44113 (New collection creation can fail with OCI-22303)
<?php
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
require(dirname(__FILE__).'/skipif.inc');
-if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE');
+if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
?>
--FILE--
<?php
diff --git a/ext/oci8/tests/bug47281.phpt b/ext/oci8/tests/bug47281.phpt
index 6b94bdef2..d0e002353 100644
--- a/ext/oci8/tests/bug47281.phpt
+++ b/ext/oci8/tests/bug47281.phpt
@@ -4,6 +4,13 @@ Bug #47281 ($php_errormsg is limited in size of characters)
<?php
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
require(dirname(__FILE__).'/skipif.inc');
+// error3.phpt obsoletes this test for newer Oracle client versions
+// Assume runtime client version is >= compile time client version
+$cv = explode('.', oci_client_version());
+if ($cv[0] > 11 || ($cv[0] == 11 && $cv[1] > 2) || ($cv[0] == 11 && $cv[1] == 2 && $cv[3] >= 3)) {
+ die("skip test works only with Oracle 11.2.0.2 or earlier Oracle client libraries");
+}
+
?>
--ENV--
NLS_LANG=.AL32UTF8
diff --git a/ext/oci8/tests/conn_attr_4.phpt b/ext/oci8/tests/conn_attr_4.phpt
index b1a22858a..d15b7a38d 100644
--- a/ext/oci8/tests/conn_attr_4.phpt
+++ b/ext/oci8/tests/conn_attr_4.phpt
@@ -4,10 +4,10 @@ Set and get of connection attributes with errors.
<?php
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
require(dirname(__FILE__).'/skipif.inc');
+if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
if (strcasecmp($user, "system") && strcasecmp($user, "sys")) die("skip needs to be run as a DBA user");
if ($test_drcp) die("skip output might vary with DRCP");
-if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE');
if (preg_match('/Release (11\.2|12)\./', oci_server_version($c), $matches) !== 1) {
// Bug fixed in 11.2 prevents client_info being rest
diff --git a/ext/oci8/tests/details.inc b/ext/oci8/tests/details.inc
index 4c07e636e..0f03c3a65 100644
--- a/ext/oci8/tests/details.inc
+++ b/ext/oci8/tests/details.inc
@@ -9,10 +9,6 @@
* greater, and $dbase should be set to the tnsnames.ora entry
* corresponding to the POOLED server instance or an Easy Connect
* string like hostname:port/service_name:POOLED
- *
- * Set $stress_test to TRUE if you want to run some longer/slower/more
- * memory intensive tests. External configuration such as increasing
- * the timeout of run-tests.php may also be needed.
*/
if (file_exists(dirname(__FILE__)."/details_local.inc")) {
@@ -23,23 +19,16 @@ if (file_exists(dirname(__FILE__)."/details_local.inc")) {
$password = getenv('PHP_OCI8_TEST_PASS'); // Password for $user
$dbase = getenv('PHP_OCI8_TEST_DB'); // Database connection string
$test_drcp = getenv('PHP_OCI8_TEST_DRCP');
- $stress_test = getenv('PHP_OCI8_STRESS_TEST');
if (false !== $test_drcp && 0 == strcasecmp($test_drcp,'TRUE')) {
$test_drcp = TRUE;
} else {
$test_drcp = FALSE;
}
- if (false !== $stress_test && 0 == strcasecmp($stress_test,'TRUE')) {
- $stress_test = TRUE;
- } else {
- $stress_test = FALSE;
- }
} else {
$user = "system";
$password = "oracle";
$dbase = "localhost/XE";
$test_drcp = FALSE;
- $stress_test = FALSE;
}
/*
diff --git a/ext/oci8/tests/error2.phpt b/ext/oci8/tests/error2.phpt
index 12eab61a6..48f21f440 100644
--- a/ext/oci8/tests/error2.phpt
+++ b/ext/oci8/tests/error2.phpt
@@ -4,7 +4,7 @@ Exercise error code for SUCCESS_WITH_INFO
<?php
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
require(dirname(__FILE__).'/skipif.inc');
-if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE');
+if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
?>
--FILE--
<?php
diff --git a/ext/oci8/tests/error3.phpt b/ext/oci8/tests/error3.phpt
new file mode 100644
index 000000000..8540db250
--- /dev/null
+++ b/ext/oci8/tests/error3.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Maximum Oracle error length
+--SKIPIF--
+<?php
+$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
+require(dirname(__FILE__).'/skipif.inc');
+// Assume runtime client version is >= compile time client version
+$cv = explode('.', oci_client_version());
+if ($cv[0] < 11 || ($cv[0] == 11 && $cv[1] < 2) || ($cv[0] == 11 && $cv[1] == 2 && $cv[3] < 3)) {
+ die("skip test works only with Oracle 11.2.0.3 or greater version of Oracle client libraries");
+}
+?>
+--INI--
+log_errors_max_len=4096
+--FILE--
+<?php
+
+require(dirname(__FILE__).'/connect.inc');
+
+echo "Test 1\n";
+
+error_reporting(E_ALL);
+
+$s = oci_parse($c, "declare
+s varchar2(4000);
+begin
+s := 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBab in %serror3.php on line %d
+===DONE===
diff --git a/ext/oci8/tests/extauth_01.phpt b/ext/oci8/tests/extauth_01.phpt
index 993198c4d..37f8f3834 100644
--- a/ext/oci8/tests/extauth_01.phpt
+++ b/ext/oci8/tests/extauth_01.phpt
@@ -5,7 +5,7 @@ Test External Authentication errors with oci_connect
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
if (substr(PHP_OS, 0, 3) == 'WIN') die("skip feature not available on Windows platforms");
require(dirname(__FILE__).'/details.inc');
-if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE');
+if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
?>
--INI--
oci8.privileged_connect=1
diff --git a/ext/oci8/tests/extauth_02.phpt b/ext/oci8/tests/extauth_02.phpt
index d3bee0bfc..f3b517f73 100644
--- a/ext/oci8/tests/extauth_02.phpt
+++ b/ext/oci8/tests/extauth_02.phpt
@@ -3,9 +3,8 @@ Test External Authentication errors with oci_new_connect
--SKIPIF--
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
+if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
if (substr(PHP_OS, 0, 3) == 'WIN') die("skip feature not available on Windows platforms");
-require(dirname(__FILE__).'/details.inc');
-if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE');
?>
--INI--
oci8.privileged_connect=1
diff --git a/ext/oci8/tests/extauth_03.phpt b/ext/oci8/tests/extauth_03.phpt
index e159c50f9..e6685eb17 100644
--- a/ext/oci8/tests/extauth_03.phpt
+++ b/ext/oci8/tests/extauth_03.phpt
@@ -3,9 +3,8 @@ Test External Authentication errors with oci_pconnect
--SKIPIF--
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
+if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
if (substr(PHP_OS, 0, 3) == 'WIN') die("skip feature not available on Windows platforms");
-require(dirname(__FILE__).'/details.inc');
-if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE');
?>
--INI--
oci8.privileged_connect=1
diff --git a/ext/oci8/tests/lob_043.phpt b/ext/oci8/tests/lob_043.phpt
index ade79a200..4cd159510 100644
--- a/ext/oci8/tests/lob_043.phpt
+++ b/ext/oci8/tests/lob_043.phpt
@@ -4,7 +4,7 @@ Bug #49560 (LOB resource destructor and refcount test)
<?php
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
require(dirname(__FILE__).'/skipif.inc');
-if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE');
+if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
?>
--FILE--
<?php
diff --git a/ext/oci8/tests/password_new.phpt b/ext/oci8/tests/password_new.phpt
index 8041699f9..c218d904f 100644
--- a/ext/oci8/tests/password_new.phpt
+++ b/ext/oci8/tests/password_new.phpt
@@ -17,6 +17,10 @@ if (preg_match('/Release (11|12)\./', oci_server_version($c), $matches) === 1 &&
--FILE--
<?php
+// This test will diff if either the client or the server is 11.2.0.3
+// (or greater) and the other is 11.2.0.2 (or earlier). Both client
+// and server must be upgraded at the same time.
+
require dirname(__FILE__)."/connect.inc";
$new_password = "test";
diff --git a/ext/oci8/tests/password_old.phpt b/ext/oci8/tests/password_old.phpt
index 3ff726d2b..fdbb1f9e8 100644
--- a/ext/oci8/tests/password_old.phpt
+++ b/ext/oci8/tests/password_old.phpt
@@ -19,6 +19,10 @@ if (preg_match('/Release (11|12)\./', oci_server_version($c), $matches) === 1 &&
--FILE--
<?php
+// This test will diff if either the client or the server is 11.2.0.3
+// (or greater) and the other is 11.2.0.2 (or earlier). Both client
+// and server must be upgraded at the same time.
+
require dirname(__FILE__)."/connect.inc";
$new_password = "test";
diff --git a/ext/oci8/tests/pecl_bug10194.phpt b/ext/oci8/tests/pecl_bug10194.phpt
index 6a9044b1a..9947e15db 100644
--- a/ext/oci8/tests/pecl_bug10194.phpt
+++ b/ext/oci8/tests/pecl_bug10194.phpt
@@ -4,7 +4,7 @@ PECL Bug #10194 (segfault in Instant Client when memory_limit is reached inside
<?php
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
require(dirname(__FILE__).'/skipif.inc');
-if ($stress_test !== true) die ('skip Test not run when $stress_test is FALSE');
+if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
?>
--INI--
memory_limit=10M
diff --git a/ext/oci8/tests/pecl_bug10194_blob.phpt b/ext/oci8/tests/pecl_bug10194_blob.phpt
index 75632ce47..faf87ab3c 100644
--- a/ext/oci8/tests/pecl_bug10194_blob.phpt
+++ b/ext/oci8/tests/pecl_bug10194_blob.phpt
@@ -5,7 +5,7 @@ PECL Bug #10194 (segfault in Instant Client when memory_limit is reached inside
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
require(dirname(__FILE__).'/skipif.inc');
if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platforms only");
-if ($stress_test !== true) die ('skip Test not run when $stress_test is FALSE');
+if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
?>
--INI--
memory_limit=3M
diff --git a/ext/oci8/tests/pecl_bug10194_blob_64.phpt b/ext/oci8/tests/pecl_bug10194_blob_64.phpt
index da7ec592f..45788a41b 100644
--- a/ext/oci8/tests/pecl_bug10194_blob_64.phpt
+++ b/ext/oci8/tests/pecl_bug10194_blob_64.phpt
@@ -4,8 +4,8 @@ PECL Bug #10194 (segfault in Instant Client when memory_limit is reached inside
<?php
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on thes
require(dirname(__FILE__).'/skipif.inc');
+if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platforms only");
-if ($stress_test !== true) die ('skip Test not run when $stress_test is FALSE');
?>
--INI--
memory_limit=6M
diff --git a/ext/oci8/tests/pecl_bug16035.phpt b/ext/oci8/tests/pecl_bug16035.phpt
index 29ff6439d..ddd0038de 100644
--- a/ext/oci8/tests/pecl_bug16035.phpt
+++ b/ext/oci8/tests/pecl_bug16035.phpt
@@ -10,6 +10,9 @@ $ov = preg_match('/Compile-time ORACLE_HOME/', $phpinfo);
if ($ov !== 1) {
die ("skip Test only valid when OCI8 is built with an ORACLE_HOME");
}
+if (preg_match('/Unknown/', oci_client_version()) == 1) {
+ die("skip expected output only valid with Oracle clients > 9gR2");
+}
?>
--ENV--
ORACLE_HOME=""
diff --git a/ext/oci8/tests/pecl_bug16842.phpt b/ext/oci8/tests/pecl_bug16842.phpt
index dbf7e6bb8..ca24d0d27 100644
--- a/ext/oci8/tests/pecl_bug16842.phpt
+++ b/ext/oci8/tests/pecl_bug16842.phpt
@@ -39,7 +39,8 @@ oci_close($c);
Test 1
Raises NO_DATA_FOUND
-Warning: oci_execute(): OCI_NO_DATA in %s on line 11
+Warning: oci_execute(): ORA-01403: %s
+ORA-06512: at line %d in %specl_bug16842.php on line %d
bool(false)
array(4) {
["code"]=>