com php-src: Resolve build warnings. Bump ver. Better range check. Fix diffs: ext/oci8/oci8.c ext/oci8/oci8_interface.c ext/ oci8/oci8_lob.c
ext/oci8/oci8_statement.c e xt/oci8/package.xml ext/oci8/php_oci8.h ext/oci 8/tests/imp_res_close.phpt ext/oci8/tests/imp_res _get_close_2.phpt
| From: | Christopher Jones | Date: | Wed, 19 Aug 2015 00:42:53 +0000 |
| Subject: | com php-src: Resolve build warnings. Bump ver. Better range check. Fix diffs: ext/oci8/oci8.c ext/oci8/oci8_interface.c ext/ oci8/oci8_lob.c ext/oci8/oci8_statement.c e xt/oci8/package.xml ext/oci8/php_oci8.h ext/oci 8/tests/imp_res_close.phpt ext/oci8/tests/imp_res _get_close_2.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-88670@lists.php.net to get a copy of this message | ||
Commit: 9047b567e346841ee73fcef27a33d609d438df69
Author: Christopher Jones <christopher.jones@oracle.com> Wed, 19 Aug 2015 10:42:53
+1000
Parents: 4df77a6c5852a8ba0ccb1a10e01a49c71d1f54b5
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9047b567e346841ee73fcef27a33d609d438df69
Log:
Resolve build warnings.. Bump ver. Better range check. Fix diffs
Changed paths:
M ext/oci8/oci8.c
M ext/oci8/oci8_interface.c
M ext/oci8/oci8_lob.c
M ext/oci8/oci8_statement.c
M ext/oci8/package.xml
M ext/oci8/php_oci8.h
M ext/oci8/tests/imp_res_close.phpt
M ext/oci8/tests/imp_res_get_close_2.phpt
Diff:
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index a1c693a..148d90f 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -3121,8 +3121,8 @@ static int php_oci_old_create_session(php_oci_connection *connection, char
*dbna
ub4 statement_cache_size = 0;
if (OCI_G(statement_cache_size) > 0) {
- if (OCI_G(statement_cache_size) > UB4MAXVAL-1)
- statement_cache_size = (ub4) UB4MAXVAL-1;
+ if (OCI_G(statement_cache_size) > SB4MAXVAL)
+ statement_cache_size = (ub4) SB4MAXVAL;
else
statement_cache_size = (ub4) OCI_G(statement_cache_size);
}
@@ -3316,8 +3316,8 @@ static int php_oci_create_session(php_oci_connection *connection,
php_oci_spool
ub4 statement_cache_size = 0;
if (OCI_G(statement_cache_size) > 0) {
- if (OCI_G(statement_cache_size) > UB4MAXVAL-1)
- statement_cache_size = (ub4) UB4MAXVAL-1;
+ if (OCI_G(statement_cache_size) > SB4MAXVAL)
+ statement_cache_size = (ub4) SB4MAXVAL;
else
statement_cache_size = (ub4) OCI_G(statement_cache_size);
}
diff --git a/ext/oci8/oci8_interface.c b/ext/oci8/oci8_interface.c
index d161342..7d845fe 100644
--- a/ext/oci8/oci8_interface.c
+++ b/ext/oci8/oci8_interface.c
@@ -385,7 +385,7 @@ PHP_FUNCTION(oci_lob_eof)
PHP_OCI_ZVAL_TO_DESCRIPTOR(tmp, descriptor);
- if (!php_oci_lob_get_length(descriptor, &lob_length) && lob_length >= 0) {
+ if (!php_oci_lob_get_length(descriptor, &lob_length)) {
if (lob_length == descriptor->lob_current_position) {
RETURN_TRUE;
}
@@ -492,8 +492,7 @@ PHP_FUNCTION(oci_lob_seek)
descriptor->lob_current_position = (offset > 0) ? (ub4) offset : 0;
break;
}
- if ((descriptor->lob_current_position < 0) ||
- (descriptor->lob_current_position > UB4MAXVAL-1)) {
+ if (descriptor->lob_current_position > UB4MAXVAL) {
php_error_docref(NULL, E_WARNING, "Invalid offset or LOB position");
RETURN_FALSE;
}
diff --git a/ext/oci8/oci8_lob.c b/ext/oci8/oci8_lob.c
index 4db9917..4f9c8e3 100644
--- a/ext/oci8/oci8_lob.c
+++ b/ext/oci8/oci8_lob.c
@@ -416,10 +416,6 @@ int php_oci_lob_write (php_oci_descriptor *descriptor, ub4 offset, char *data,
i
return 0;
}
- if (offset < 0) {
- offset = 0;
- }
-
if (offset > descriptor->lob_current_position) {
offset = descriptor->lob_current_position;
}
diff --git a/ext/oci8/oci8_statement.c b/ext/oci8/oci8_statement.c
index 9f251a1..3ab2499 100644
--- a/ext/oci8/oci8_statement.c
+++ b/ext/oci8/oci8_statement.c
@@ -1481,7 +1481,7 @@ php_oci_out_column
*php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAME
}
if (Z_TYPE_P(column_index) == IS_STRING) {
- column = php_oci_statement_get_column(statement, -1, Z_STRVAL_P(column_index),
Z_STRLEN_P(column_index));
+ column = php_oci_statement_get_column(statement, -1, Z_STRVAL_P(column_index), (int)
Z_STRLEN_P(column_index));
if (!column) {
php_error_docref(NULL, E_WARNING, "Invalid column name \"%s\"",
Z_STRVAL_P(column_index));
return NULL;
diff --git a/ext/oci8/package.xml b/ext/oci8/package.xml
index bb2b660..e413697 100644
--- a/ext/oci8/package.xml
+++ b/ext/oci8/package.xml
@@ -15,10 +15,10 @@ in the free Oracle Instant Client available from Oracle. Oracle's
standard cross-version connectivity applies. For example, PHP OCI8
linked with Instant Client 11.2 can connect to Oracle Database 9.2
onward. See Oracle's note "Oracle Client / Server Interoperability
-Support" (ID 207303.1) for details. PHP OCI8 2.0 can be built with
-PHP 5.2 onward. Use the older PHP OCI8 1.4.10 when using PHP 4.3.9
-through to PHP 5.1.x, or when only Oracle Database 9.2 client
-libraries are available.
+Support" (ID 207303.1) for details. PHP OCI8 2.1.0 can be built with
+PHP 7. PHP OCI8 2.0.9 can be built with PHP 5.2 onward. Use the older
+PHP OCI8 1.4.10 when using PHP 4.3.9 through to PHP 5.1.x, or when
+only Oracle Database 9.2 client libraries are available.
</description>
<lead>
<name>Christopher Jones</name>
@@ -45,12 +45,12 @@ libraries are available.
<active>no</active>
</lead>
- <date>2014-03-19</date>
+ <date>2015-01-01</date>
<time>12:00:00</time>
<version>
- <release>2.0.9</release>
- <api>2.0.9</api>
+ <release>2.1.0</release>
+ <api>2.1.0</api>
</version>
<stability>
<release>stable</release>
@@ -58,7 +58,7 @@ libraries are available.
</stability>
<license uri="http://www.php.net/license">PHP</license>
<notes>
-Fixed oci_field_* reflection: $field can be a column name or index
+ PHP 7 Compatibility. This version is for PHP 7 only.
</notes>
<contents>
<dir name="/">
@@ -462,6 +462,21 @@ Fixed oci_field_* reflection: $field can be a column name or index
<release>
<version>
+ <release>2.0.9</release>
+ <api>2.0.9</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.php.net/license">PHP</license>
+ <notes>
+Fixed oci_field_* reflection: $field can be a column name or index
+ </notes>
+</release>
+
+<release>
+ <version>
<release>2.0.8</release>
<api>2.0.8</api>
</version>
diff --git a/ext/oci8/php_oci8.h b/ext/oci8/php_oci8.h
index bdffc01..79ea146 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.9"
+#define PHP_OCI8_VERSION "2.1.0"
extern zend_module_entry oci8_module_entry;
#define phpext_oci8_ptr &oci8_module_entry
diff --git a/ext/oci8/tests/imp_res_close.phpt b/ext/oci8/tests/imp_res_close.phpt
index 01ac2c7..f01205d 100644
--- a/ext/oci8/tests/imp_res_close.phpt
+++ b/ext/oci8/tests/imp_res_close.phpt
@@ -63,7 +63,6 @@ oci8_test_sql_execute($c, $stmtarray);
--EXPECTF--
Test 1
1
- 2
-Warning: oci_fetch_array(): %d is not a valid oci8 statement resource in %simp_res_close.php on
line %d
+Warning: oci_fetch_array(): supplied resource is not a valid oci8 statement resource in
%simp_res_close.php on line %d
===DONE===
diff --git a/ext/oci8/tests/imp_res_get_close_2.phpt b/ext/oci8/tests/imp_res_get_close_2.phpt
index b315383..419a4f4 100644
--- a/ext/oci8/tests/imp_res_get_close_2.phpt
+++ b/ext/oci8/tests/imp_res_get_close_2.phpt
@@ -56,9 +56,8 @@ while (($s1 = oci_get_implicit_resultset($s))) {
--EXPECTF--
Test 1
1
- 2
Warning: oci_fetch_array(): OCI_INVALID_HANDLE in %s on line %d
-Warning: oci_get_implicit_resultset(): %d is not a valid oci8 statement resource in %s on line %d
+Warning: oci_get_implicit_resultset(): supplied resource is not a valid oci8 statement resource in
%s on line %d
===DONE===