Merge branch 'PHP-7.3'

This commit is contained in:
Christopher Jones 2018-12-09 12:17:23 +11:00
commit 36efc39db1
5 changed files with 27 additions and 26 deletions

View file

@ -423,12 +423,10 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_set_client_info, 0, 0, 2)
ZEND_ARG_INFO(0, client_information) ZEND_ARG_INFO(0, client_information)
ZEND_END_ARG_INFO() ZEND_END_ARG_INFO()
#ifdef WAITIING_ORACLE_BUG_16695981_FIX
ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_set_db_operation, 0, 0, 2) ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_set_db_operation, 0, 0, 2)
ZEND_ARG_INFO(0, connection_resource) ZEND_ARG_INFO(0, connection_resource)
ZEND_ARG_INFO(0, action) ZEND_ARG_INFO(0, action)
ZEND_END_ARG_INFO() ZEND_END_ARG_INFO()
#endif
ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_password_change, 0, 0, 4) ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_password_change, 0, 0, 4)
ZEND_ARG_INFO(0, connection_resource_or_connection_string) ZEND_ARG_INFO(0, connection_resource_or_connection_string)
@ -672,9 +670,7 @@ PHP_FUNCTION(oci_statement_type);
PHP_FUNCTION(oci_num_rows); PHP_FUNCTION(oci_num_rows);
PHP_FUNCTION(oci_set_prefetch); PHP_FUNCTION(oci_set_prefetch);
PHP_FUNCTION(oci_set_client_identifier); PHP_FUNCTION(oci_set_client_identifier);
#ifdef WAITIING_ORACLE_BUG_16695981_FIX
PHP_FUNCTION(oci_set_db_operation); PHP_FUNCTION(oci_set_db_operation);
#endif
PHP_FUNCTION(oci_set_edition); PHP_FUNCTION(oci_set_edition);
PHP_FUNCTION(oci_set_module_name); PHP_FUNCTION(oci_set_module_name);
PHP_FUNCTION(oci_set_action); PHP_FUNCTION(oci_set_action);
@ -777,9 +773,7 @@ static const zend_function_entry php_oci_functions[] = {
PHP_FE(oci_new_descriptor, arginfo_oci_new_descriptor) PHP_FE(oci_new_descriptor, arginfo_oci_new_descriptor)
PHP_FE(oci_set_prefetch, arginfo_oci_set_prefetch) PHP_FE(oci_set_prefetch, arginfo_oci_set_prefetch)
PHP_FE(oci_set_client_identifier, arginfo_oci_set_client_identifier) PHP_FE(oci_set_client_identifier, arginfo_oci_set_client_identifier)
#ifdef WAITIING_ORACLE_BUG_16695981_FIX
PHP_FE(oci_set_db_operation, arginfo_oci_set_db_operation) PHP_FE(oci_set_db_operation, arginfo_oci_set_db_operation)
#endif
PHP_FE(oci_set_edition, arginfo_oci_set_edition) PHP_FE(oci_set_edition, arginfo_oci_set_edition)
PHP_FE(oci_set_module_name, arginfo_oci_set_module_name) PHP_FE(oci_set_module_name, arginfo_oci_set_module_name)
PHP_FE(oci_set_action, arginfo_oci_set_action) PHP_FE(oci_set_action, arginfo_oci_set_action)

View file

@ -2027,9 +2027,9 @@ PHP_FUNCTION(oci_set_client_info)
} }
/* }}} */ /* }}} */
#ifdef WAITIING_ORACLE_BUG_16695981_FIX
/* {{{ proto bool oci_set_db_operation(resource connection, string value) /* {{{ proto bool oci_set_db_operation(resource connection, string value)
Sets the "DB operation" on the connection for Oracle end-to-end tracing */ Sets the "DB operation" on the connection for Oracle end-to-end tracing.
For history, see Oracle bug 16695981 */
PHP_FUNCTION(oci_set_db_operation) PHP_FUNCTION(oci_set_db_operation)
{ {
#if (OCI_MAJOR_VERSION > 11) #if (OCI_MAJOR_VERSION > 11)
@ -2058,7 +2058,6 @@ PHP_FUNCTION(oci_set_db_operation)
#endif #endif
} }
/* }}} */ /* }}} */
#endif /* WAITIING_ORACLE_BUG_16695981_FIX */
/* {{{ proto bool oci_password_change(resource connection, string username, string old_password, string new_password) /* {{{ proto bool oci_password_change(resource connection, string username, string old_password, string new_password)
Changes the password of an account */ Changes the password of an account */

View file

@ -67,6 +67,7 @@ Interoperability Support" (ID 207303.1) for details.
<notes> <notes>
This version is for PHP 7 only. This version is for PHP 7 only.
Fixed bug #76804 (oci_pconnect with OCI_CRED_EXT not working). (KoenigsKind) Fixed bug #76804 (oci_pconnect with OCI_CRED_EXT not working). (KoenigsKind)
Support setting Oracle Database 'DBOP' end-to-end-tracing attribute. (Requires Oracle 12.2 or later)
Fixed installation on 7.3. Fixed installation on 7.3.
Internal change: Convert some parameter parsing to the Fast Parameter Parsing API. Internal change: Convert some parameter parsing to the Fast Parameter Parsing API.
</notes> </notes>

View file

@ -16,10 +16,6 @@ preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
if (!(isset($matches[0]) && $matches[0] >= 12)) { if (!(isset($matches[0]) && $matches[0] >= 12)) {
die("skip works only with Oracle 12c or greater version of Oracle client libraries"); die("skip works only with Oracle 12c or greater version of Oracle client libraries");
} }
if (!function_exists('oci_set_db_operation'))
{
die("skip function oci_set_db_operation() does not exist");
}
?> ?>
--FILE-- --FILE--
<?php <?php
@ -40,7 +36,7 @@ function dq($c, $q)
} }
oci_set_db_operation($c, "db_op_1"); oci_set_db_operation($c, "db_op_1");
dq($c, 'select * from dual'); dq($c, 'select /*+ MONITOR */ * from dual');
dq($c, 'select dbop_name from v$sql_monitor where dbop_name is not null order by dbop_exec_id desc'); dq($c, 'select dbop_name from v$sql_monitor where dbop_name is not null order by dbop_exec_id desc');

View file

@ -1,5 +1,5 @@
--TEST-- --TEST--
oci_set_db_operation: basic test for end-to-end tracing oci_set_db_operation: test DBOP for end-to-end tracing
--SKIPIF-- --SKIPIF--
<?php <?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension"); if (!extension_loaded('oci8')) die ("skip no oci8 extension");
@ -35,34 +35,45 @@ function dq($c, $q)
echo "Test 1\n"; echo "Test 1\n";
oci_set_db_operation($c, "db_op_2_a"); oci_set_db_operation($c, "db_op_2_a");
dq($c, 'select * from dual'); dq($c, 'select /*+ MONITOR */ * from dual');
oci_set_db_operation($c, "db_op_2_b");
dq($c, 'select /*+ MONITOR */ * from dual');
dq($c, 'select dbop_name from v$sql_monitor where dbop_name like \'db_op_2%\' order by dbop_exec_id desc');
echo "Test 2\n"; echo "Test 2\n";
oci_set_db_operation($c, "db_op_2_b"); oci_set_db_operation($c, "");
dq($c, 'select * from dual'); dq($c, 'select /*+ MONITOR */ \'dboptest\' from dual');
echo "Test 3\n"; dq($c, 'select sql_text, dbop_name from v$sql_monitor where sql_text like \'%dboptest2%\' order by dbop_exec_id desc');
dq($c, 'select dbop_name from v$sql_monitor where dbop_name like \'db_op2%\' order by dbop_exec_id desc');
?> ?>
===DONE=== ===DONE===
<?php exit(0); ?> <?php exit(0); ?>
--XFAIL--
Fails due to Oracle Bug 16695981
--EXPECT-- --EXPECT--
Test 1 Test 1
array(1) { array(1) {
["DUMMY"]=> ["DUMMY"]=>
string(1) "X" string(1) "X"
} }
Test 2
array(1) { array(1) {
["DUMMY"]=> ["DUMMY"]=>
string(1) "X" string(1) "X"
} }
Test 3 array(1) {
array(2) {
["DBOP_NAME"]=> ["DBOP_NAME"]=>
string(7) "db_op_2a" string(9) "db_op_2_b"
}
Test 2
array(1) {
["'DBOPTEST'"]=>
string(8) "dboptest"
}
array(2) {
["SQL_TEXT"]=>
string(121) "select /*+ MONITOR */ sql_text, dbop_name from v$sql_monitor where sql_text like '%dboptest2%' order by dbop_exec_id desc"
["DBOP_NAME"]=>
NULL
} }
===DONE=== ===DONE===