]> granicus.if.org Git - php/commitdiff
Deprecate function aliases in oci8 extension.
authorJens de Nies <j.de.nies@protonmail.com>
Sun, 17 May 2020 21:48:01 +0000 (23:48 +0200)
committerGeorge Peter Banyard <girgias@php.net>
Sun, 7 Jun 2020 22:23:38 +0000 (00:23 +0200)
Closes GH-5589

64 files changed:
ext/oci8/oci8.c
ext/oci8/tests/bug26133.phpt
ext/oci8/tests/bug27303_1.phpt
ext/oci8/tests/bug27303_1_11gR1.phpt
ext/oci8/tests/bug27303_2.phpt
ext/oci8/tests/bug27303_2_11gR1.phpt
ext/oci8/tests/bug27303_3.phpt
ext/oci8/tests/bug27303_4.phpt
ext/oci8/tests/bug27303_4_11gR1.phpt
ext/oci8/tests/bug42841.phpt
ext/oci8/tests/bug43492.phpt
ext/oci8/tests/bug43492_2.phpt
ext/oci8/tests/coll_002.phpt
ext/oci8/tests/coll_005.phpt [deleted file]
ext/oci8/tests/coll_006.phpt [deleted file]
ext/oci8/tests/coll_006_func.phpt [deleted file]
ext/oci8/tests/coll_007.phpt [deleted file]
ext/oci8/tests/coll_008.phpt [deleted file]
ext/oci8/tests/coll_009.phpt
ext/oci8/tests/coll_009_func.phpt
ext/oci8/tests/coll_010.phpt
ext/oci8/tests/coll_010_func.phpt
ext/oci8/tests/coll_011.phpt
ext/oci8/tests/coll_011_func.phpt
ext/oci8/tests/coll_012.phpt
ext/oci8/tests/coll_012_func.phpt
ext/oci8/tests/coll_013.phpt
ext/oci8/tests/coll_013_func.phpt
ext/oci8/tests/coll_014.phpt
ext/oci8/tests/coll_014_func.phpt
ext/oci8/tests/coll_015.phpt
ext/oci8/tests/coll_015_func.phpt
ext/oci8/tests/coll_016.phpt
ext/oci8/tests/coll_016_func.phpt
ext/oci8/tests/coll_017.phpt
ext/oci8/tests/coll_017_func.phpt
ext/oci8/tests/commit_old.phpt [deleted file]
ext/oci8/tests/connect_1.phpt
ext/oci8/tests/connect_1_old.phpt [deleted file]
ext/oci8/tests/connect_old.phpt [deleted file]
ext/oci8/tests/connect_without_oracle_home_old.phpt [deleted file]
ext/oci8/tests/connect_without_oracle_home_old_11.phpt [deleted file]
ext/oci8/tests/create_type.inc
ext/oci8/tests/cursors_old.phpt [deleted file]
ext/oci8/tests/define_old.phpt [deleted file]
ext/oci8/tests/details.inc
ext/oci8/tests/error_old.phpt [deleted file]
ext/oci8/tests/existence_aliases.phpt [new file with mode: 0644]
ext/oci8/tests/fetch.phpt
ext/oci8/tests/fetch_all1.phpt
ext/oci8/tests/fetch_into.phpt [deleted file]
ext/oci8/tests/fetch_into1.phpt [deleted file]
ext/oci8/tests/fetch_into2.phpt [deleted file]
ext/oci8/tests/fetch_object.phpt
ext/oci8/tests/fetch_object_1.phpt
ext/oci8/tests/field_funcs_old.phpt [deleted file]
ext/oci8/tests/function_aliases.phpt [deleted file]
ext/oci8/tests/num.phpt
ext/oci8/tests/password_new.phpt
ext/oci8/tests/password_old.phpt [deleted file]
ext/oci8/tests/prefetch_old.phpt [deleted file]
ext/oci8/tests/reflection1.phpt
ext/oci8/tests/serverversion.phpt
ext/oci8/tests/statement_type_old.phpt [deleted file]

index dc506355f2a1cc931b7672136e8895886af37e26..89aafde7ee395226333d3dbc154e5c9a97e14ca1 100644 (file)
@@ -797,52 +797,52 @@ static const zend_function_entry php_oci_functions[] = {
        PHP_FE(oci_unregister_taf_callback, arginfo_oci_unregister_taf_callback)
 
        PHP_FALIAS(oci_free_cursor,             oci_free_statement,             arginfo_oci_free_statement)
-       PHP_FALIAS(ocifreecursor,               oci_free_statement,             arginfo_oci_free_statement)
-       PHP_FALIAS(ocibindbyname,               oci_bind_by_name,               arginfo_oci_bind_by_name)
-       PHP_FALIAS(ocidefinebyname,             oci_define_by_name,             arginfo_oci_define_by_name)
-       PHP_FALIAS(ocicolumnisnull,             oci_field_is_null,              arginfo_oci_field_is_null)
-       PHP_FALIAS(ocicolumnname,               oci_field_name,                 arginfo_oci_field_name)
-       PHP_FALIAS(ocicolumnsize,               oci_field_size,                 arginfo_oci_field_size)
-       PHP_FALIAS(ocicolumnscale,              oci_field_scale,                arginfo_oci_field_scale)
-       PHP_FALIAS(ocicolumnprecision,  oci_field_precision,    arginfo_oci_field_precision)
-       PHP_FALIAS(ocicolumntype,               oci_field_type,                 arginfo_oci_field_type)
-       PHP_FALIAS(ocicolumntyperaw,    oci_field_type_raw,             arginfo_oci_field_type_raw)
-       PHP_FALIAS(ociexecute,                  oci_execute,                    arginfo_oci_execute)
-       PHP_FALIAS(ocicancel,                   oci_cancel,                             arginfo_oci_cancel)
-       PHP_FALIAS(ocifetch,                    oci_fetch,                              arginfo_oci_fetch)
-       PHP_FALIAS(ocifetchstatement,   oci_fetch_all,                  arginfo_oci_fetch_all)
-       PHP_FALIAS(ocifreestatement,    oci_free_statement,             arginfo_oci_free_statement)
-       PHP_FALIAS(ociinternaldebug,    oci_internal_debug,             arginfo_oci_internal_debug)
-       PHP_FALIAS(ocinumcols,                  oci_num_fields,                 arginfo_oci_num_fields)
-       PHP_FALIAS(ociparse,                    oci_parse,                              arginfo_oci_parse)
-       PHP_FALIAS(ocinewcursor,                oci_new_cursor,                 arginfo_oci_new_cursor)
-       PHP_FALIAS(ociresult,                   oci_result,                             arginfo_oci_result)
-       PHP_FALIAS(ociserverversion,    oci_server_version,             arginfo_oci_server_version)
-       PHP_FALIAS(ocistatementtype,    oci_statement_type,             arginfo_oci_statement_type)
-       PHP_FALIAS(ocirowcount,                 oci_num_rows,                   arginfo_oci_num_rows)
-       PHP_FALIAS(ocilogoff,                   oci_close,                              arginfo_oci_close)
-       PHP_FALIAS(ocilogon,                    oci_connect,                    arginfo_oci_connect)
-       PHP_FALIAS(ocinlogon,                   oci_new_connect,                arginfo_oci_new_connect)
-       PHP_FALIAS(ociplogon,                   oci_pconnect,                   arginfo_oci_pconnect)
-       PHP_FALIAS(ocierror,                    oci_error,                              arginfo_oci_error)
-       PHP_FALIAS(ocifreedesc,                 oci_free_descriptor,    arginfo_oci_free_descriptor)
-       PHP_FALIAS(ocisavelob,                  oci_lob_save,                   arginfo_oci_lob_save)
-       PHP_FALIAS(ocisavelobfile,              oci_lob_import,                 arginfo_oci_lob_import)
-       PHP_FALIAS(ociwritelobtofile,   oci_lob_export,                 arginfo_oci_lob_export)
-       PHP_FALIAS(ociloadlob,                  oci_lob_load,                   arginfo_oci_lob_load)
-       PHP_FALIAS(ocicommit,                   oci_commit,                             arginfo_oci_commit)
-       PHP_FALIAS(ocirollback,                 oci_rollback,                   arginfo_oci_rollback)
-       PHP_FALIAS(ocinewdescriptor,    oci_new_descriptor,             arginfo_oci_new_descriptor)
-       PHP_FALIAS(ocisetprefetch,              oci_set_prefetch,               arginfo_oci_set_prefetch)
-       PHP_FALIAS(ocipasswordchange,   oci_password_change,    arginfo_oci_password_change)
-       PHP_FALIAS(ocifreecollection,   oci_free_collection,    arginfo_oci_free_collection)
-       PHP_FALIAS(ocinewcollection,    oci_new_collection,             arginfo_oci_new_collection)
-       PHP_FALIAS(ocicollappend,               oci_collection_append,  arginfo_oci_collection_append)
-       PHP_FALIAS(ocicollgetelem,              oci_collection_element_get,             arginfo_oci_collection_element_get)
-       PHP_FALIAS(ocicollassignelem,   oci_collection_element_assign,  arginfo_oci_collection_element_assign)
-       PHP_FALIAS(ocicollsize,                 oci_collection_size,    arginfo_oci_collection_size)
-       PHP_FALIAS(ocicollmax,                  oci_collection_max,             arginfo_oci_collection_max)
-       PHP_FALIAS(ocicolltrim,                 oci_collection_trim,    arginfo_oci_collection_trim)
+       PHP_DEP_FALIAS(ocifreecursor,           oci_free_statement,             arginfo_oci_free_statement)
+       PHP_DEP_FALIAS(ocibindbyname,           oci_bind_by_name,               arginfo_oci_bind_by_name)
+       PHP_DEP_FALIAS(ocidefinebyname,         oci_define_by_name,             arginfo_oci_define_by_name)
+       PHP_DEP_FALIAS(ocicolumnisnull,         oci_field_is_null,              arginfo_oci_field_is_null)
+       PHP_DEP_FALIAS(ocicolumnname,           oci_field_name,                 arginfo_oci_field_name)
+       PHP_DEP_FALIAS(ocicolumnsize,           oci_field_size,                 arginfo_oci_field_size)
+       PHP_DEP_FALIAS(ocicolumnscale,          oci_field_scale,                arginfo_oci_field_scale)
+       PHP_DEP_FALIAS(ocicolumnprecision,      oci_field_precision,    arginfo_oci_field_precision)
+       PHP_DEP_FALIAS(ocicolumntype,           oci_field_type,                 arginfo_oci_field_type)
+       PHP_DEP_FALIAS(ocicolumntyperaw,        oci_field_type_raw,             arginfo_oci_field_type_raw)
+       PHP_DEP_FALIAS(ociexecute,                      oci_execute,                    arginfo_oci_execute)
+       PHP_DEP_FALIAS(ocicancel,                       oci_cancel,                             arginfo_oci_cancel)
+       PHP_DEP_FALIAS(ocifetch,                        oci_fetch,                              arginfo_oci_fetch)
+       PHP_DEP_FALIAS(ocifetchstatement,       oci_fetch_all,                  arginfo_oci_fetch_all)
+       PHP_DEP_FALIAS(ocifreestatement,        oci_free_statement,             arginfo_oci_free_statement)
+       PHP_DEP_FALIAS(ociinternaldebug,        oci_internal_debug,             arginfo_oci_internal_debug)
+       PHP_DEP_FALIAS(ocinumcols,                      oci_num_fields,                 arginfo_oci_num_fields)
+       PHP_DEP_FALIAS(ociparse,                        oci_parse,                              arginfo_oci_parse)
+       PHP_DEP_FALIAS(ocinewcursor,            oci_new_cursor,                 arginfo_oci_new_cursor)
+       PHP_DEP_FALIAS(ociresult,                       oci_result,                             arginfo_oci_result)
+       PHP_DEP_FALIAS(ociserverversion,        oci_server_version,             arginfo_oci_server_version)
+       PHP_DEP_FALIAS(ocistatementtype,        oci_statement_type,             arginfo_oci_statement_type)
+       PHP_DEP_FALIAS(ocirowcount,                     oci_num_rows,                   arginfo_oci_num_rows)
+       PHP_DEP_FALIAS(ocilogoff,                       oci_close,                              arginfo_oci_close)
+       PHP_DEP_FALIAS(ocilogon,                        oci_connect,                    arginfo_oci_connect)
+       PHP_DEP_FALIAS(ocinlogon,                       oci_new_connect,                arginfo_oci_new_connect)
+       PHP_DEP_FALIAS(ociplogon,                       oci_pconnect,                   arginfo_oci_pconnect)
+       PHP_DEP_FALIAS(ocierror,                        oci_error,                              arginfo_oci_error)
+       PHP_DEP_FALIAS(ocifreedesc,                     oci_free_descriptor,    arginfo_oci_free_descriptor)
+       PHP_DEP_FALIAS(ocisavelob,                      oci_lob_save,                   arginfo_oci_lob_save)
+       PHP_DEP_FALIAS(ocisavelobfile,          oci_lob_import,                 arginfo_oci_lob_import)
+       PHP_DEP_FALIAS(ociwritelobtofile,       oci_lob_export,                 arginfo_oci_lob_export)
+       PHP_DEP_FALIAS(ociloadlob,                      oci_lob_load,                   arginfo_oci_lob_load)
+       PHP_DEP_FALIAS(ocicommit,                       oci_commit,                             arginfo_oci_commit)
+       PHP_DEP_FALIAS(ocirollback,                     oci_rollback,                   arginfo_oci_rollback)
+       PHP_DEP_FALIAS(ocinewdescriptor,        oci_new_descriptor,             arginfo_oci_new_descriptor)
+       PHP_DEP_FALIAS(ocisetprefetch,          oci_set_prefetch,               arginfo_oci_set_prefetch)
+       PHP_DEP_FALIAS(ocipasswordchange,       oci_password_change,    arginfo_oci_password_change)
+       PHP_DEP_FALIAS(ocifreecollection,       oci_free_collection,    arginfo_oci_free_collection)
+       PHP_DEP_FALIAS(ocinewcollection,        oci_new_collection,             arginfo_oci_new_collection)
+       PHP_DEP_FALIAS(ocicollappend,           oci_collection_append,  arginfo_oci_collection_append)
+       PHP_DEP_FALIAS(ocicollgetelem,          oci_collection_element_get,             arginfo_oci_collection_element_get)
+       PHP_DEP_FALIAS(ocicollassignelem,       oci_collection_element_assign,  arginfo_oci_collection_element_assign)
+       PHP_DEP_FALIAS(ocicollsize,                     oci_collection_size,    arginfo_oci_collection_size)
+       PHP_DEP_FALIAS(ocicollmax,                      oci_collection_max,             arginfo_oci_collection_max)
+       PHP_DEP_FALIAS(ocicolltrim,                     oci_collection_trim,    arginfo_oci_collection_trim)
        PHP_FE_END
 };
 
index 1df68ad2d99bd8d83ce201e2705d1f850a3b3792..e2115d17fce0ee702bffcc4855c42b2f69c597b0 100644 (file)
@@ -20,13 +20,13 @@ oci8_test_sql_execute($c, $stmtarray);
 
 $ora_sql = "INSERT INTO bug26133_tab (id, value) VALUES (1,'1') RETURNING ROWID INTO :v_rowid ";
 
-$statement = OCIParse($c,$ora_sql);
-$rowid = OCINewDescriptor($c,OCI_D_ROWID);
-OCIBindByName($statement,":v_rowid", $rowid,-1,OCI_B_ROWID);
-if (OCIExecute($statement)) {
-    OCICommit($c);
+$statement = oci_parse($c,$ora_sql);
+$rowid = oci_new_descriptor($c,OCI_D_ROWID);
+oci_bind_by_name($statement,":v_rowid", $rowid,-1,OCI_B_ROWID);
+if (oci_execute($statement)) {
+    oci_commit($c);
 }
-OCIFreeStatement($statement);
+oci_free_statement($statement);
 $rowid->free();
 
 // Cleanup
index a0e254a7539a45475252f937ed269a397b9e3e51..0ed1a4d54a18c3be5cd278a9faf59db4ff978e24 100644 (file)
@@ -30,19 +30,19 @@ define('MYLIMIT', 200);
 
 $stmt = "insert into mytab (mydata, seqcol) values ('Some data', myseq.nextval) returning seqcol into :mybv";
 
-$stid = OCIParse($c, $stmt);
+$stid = oci_parse($c, $stmt);
 if (!$stid) { echo "Parse error"; die; }
 
-$r = OCIBindByName($stid, ':MYBV', $mybv);
+$r = oci_bind_by_name($stid, ':MYBV', $mybv);
 if (!$r) { echo "Bind error"; die; }
 
 for ($i = 1; $i < MYLIMIT; $i++) {
-    $r = OCIExecute($stid, OCI_DEFAULT);
+    $r = oci_execute($stid, OCI_DEFAULT);
     if (!$r) { echo "Execute error"; die; }
     var_dump($mybv);
 }
 
-OCICommit($c);
+oci_commit($c);
 
 $stmtarray = array(
     "drop sequence myseq",
index 35495a81da96d547cb3e84e078f104cb24ff64cb..f42beb3699ada1bb52477c501c294f609fb969a6 100644 (file)
@@ -28,19 +28,19 @@ define('MYLIMIT', 200);
 
 $stmt = "insert into mytab (mydata, seqcol) values ('Some data', myseq.nextval) returning seqcol into :mybv";
 
-$stid = OCIParse($c, $stmt);
+$stid = oci_parse($c, $stmt);
 if (!$stid) { echo "Parse error"; die; }
 
-$r = OCIBindByName($stid, ':MYBV', $mybv);
+$r = oci_bind_by_name($stid, ':MYBV', $mybv);
 if (!$r) { echo "Bind error"; die; }
 
 for ($i = 1; $i < MYLIMIT; $i++) {
-    $r = OCIExecute($stid, OCI_DEFAULT);
+    $r = oci_execute($stid, OCI_DEFAULT);
     if (!$r) { echo "Execute error"; die; }
     var_dump($mybv);
 }
 
-OCICommit($c);
+oci_commit($c);
 
 $stmtarray = array(
     "drop sequence myseq",
index 3674b724863a41e8e66adc122118b02ced7a933e..655598eb06103f18594f2660fc00bb8df3dba0fb 100644 (file)
@@ -31,20 +31,20 @@ define('INITMYBV', 11);
 
 $stmt = "insert into mytab (mydata, seqcol) values ('Some data', myseq.nextval) returning seqcol into :mybv";
 
-$stid = OCIParse($c, $stmt);
+$stid = oci_parse($c, $stmt);
 if (!$stid) { echo "Parse error"; die; }
 
 $mybv = INITMYBV;
-$r = OCIBindByName($stid, ':MYBV', $mybv);
+$r = oci_bind_by_name($stid, ':MYBV', $mybv);
 if (!$r) { echo "Bind error"; die; }
 
 for ($i = 1; $i < MYLIMIT; $i++) {
-    $r = OCIExecute($stid, OCI_DEFAULT);
+    $r = oci_execute($stid, OCI_DEFAULT);
     if (!$r) { echo "Execute error"; die; }
     var_dump($mybv);
 }
 
-OCICommit($c);
+oci_commit($c);
 
 $stmtarray = array(
     "drop sequence myseq",
index 1abb66538aec63bc972c3ac7ae5095722a37649c..021855741d583103874715e6a483b779d2001841 100644 (file)
@@ -31,20 +31,20 @@ define('INITMYBV', 11);
 
 $stmt = "insert into mytab (mydata, seqcol) values ('Some data', myseq.nextval) returning seqcol into :mybv";
 
-$stid = OCIParse($c, $stmt);
+$stid = oci_parse($c, $stmt);
 if (!$stid) { echo "Parse error"; die; }
 
 $mybv = INITMYBV;
-$r = OCIBindByName($stid, ':MYBV', $mybv);
+$r = oci_bind_by_name($stid, ':MYBV', $mybv);
 if (!$r) { echo "Bind error"; die; }
 
 for ($i = 1; $i < MYLIMIT; $i++) {
-    $r = OCIExecute($stid, OCI_DEFAULT);
+    $r = oci_execute($stid, OCI_DEFAULT);
     if (!$r) { echo "Execute error"; die; }
     var_dump($mybv);
 }
 
-OCICommit($c);
+oci_commit($c);
 
 $stmtarray = array(
     "drop sequence myseq",
index 347a1a93d91d938f586afc3bc48722c17ce009b3..d629de226aabfe19f0bc44de2122821bdd819348 100644 (file)
@@ -23,20 +23,20 @@ define('INITMYBV', 11);
 
 $stmt = "insert into mytab (mydata, seqcol) values ('Some data', myseq.nextval) returning seqcol into :mybv";
 
-$stid = OCIParse($c, $stmt);
+$stid = oci_parse($c, $stmt);
 if (!$stid) { echo "Parse error"; die; }
 
 $mybv = INITMYBV;
-$r = OCIBindByName($stid, ':MYBV', $mybv, 5, SQLT_INT);
+$r = oci_bind_by_name($stid, ':MYBV', $mybv, 5, SQLT_INT);
 if (!$r) { echo "Bind error"; die; }
 
 for ($i = 1; $i < MYLIMIT; $i++) {
-    $r = OCIExecute($stid, OCI_DEFAULT);
+    $r = oci_execute($stid, OCI_DEFAULT);
     if (!$r) { echo "Execute error"; die; }
     var_dump($mybv);
 }
 
-OCICommit($c);
+oci_commit($c);
 
 $drop_st = array();
 $drop_st[] = "drop sequence myseq";
index e51f3cdc75254efdb92d8df541c4e5cb76977817..626f56bd1100b22d424f8903e503ed787f232708 100644 (file)
@@ -29,19 +29,19 @@ define('MYLIMIT', 200);
 
 $stmt = "insert into mytab (mydata, seqcol) values ('Some data', myseq.nextval) returning seqcol into :mybv";
 
-$stid = OCIParse($c, $stmt);
+$stid = oci_parse($c, $stmt);
 if (!$stid) { echo "Parse error"; die; }
 
-$r = OCIBindByName($stid, ':MYBV', $mybv, 0 );
+$r = oci_bind_by_name($stid, ':MYBV', $mybv, 0 );
 if (!$r) { echo "Bind error"; die; }
 
 for ($i = 1; $i < MYLIMIT; $i++) {
-    $r = OCIExecute($stid, OCI_DEFAULT);
+    $r = oci_execute($stid, OCI_DEFAULT);
     if (!$r) { echo "Execute error"; die; }
     var_dump($mybv);
 }
 
-OCICommit($c);
+oci_commit($c);
 
 $drop_st = array();
 $drop_st[] = "drop sequence myseq";
index bd5e2571fc01afd3194cadeca3953b1926512dfa..168a52878557cf53b386a046195e0ddfa775234c 100644 (file)
@@ -27,19 +27,19 @@ define('MYLIMIT', 200);
 
 $stmt = "insert into mytab (mydata, seqcol) values ('Some data', myseq.nextval) returning seqcol into :mybv";
 
-$stid = OCIParse($c, $stmt);
+$stid = oci_parse($c, $stmt);
 if (!$stid) { echo "Parse error"; die; }
 
-$r = OCIBindByName($stid, ':MYBV', $mybv, 0 );
+$r = oci_bind_by_name($stid, ':MYBV', $mybv, 0 );
 if (!$r) { echo "Bind error"; die; }
 
 for ($i = 1; $i < MYLIMIT; $i++) {
-    $r = OCIExecute($stid, OCI_DEFAULT);
+    $r = oci_execute($stid, OCI_DEFAULT);
     if (!$r) { echo "Execute error"; die; }
     var_dump($mybv);
 }
 
-OCICommit($c);
+oci_commit($c);
 
 $drop_st = array();
 $drop_st[] = "drop sequence myseq";
index eade55fc02f5185853a83e430abdf239bb28a839..3b4a6051a66036177be51cc202ee206aa32f6764 100644 (file)
@@ -99,7 +99,7 @@ function bug43449_getCur($c)
 
     $ret = array();
 
-    while (ocifetchinto($cur, $row, OCI_ASSOC)) {
+    while ($row = oci_fetch_assoc($cur)) {
         $ret[] = $row;
     }
 
index 27eed00b0a85fa7cc2cc25ec30a9777b71354aaa..05fc43210b1ae8749234de84234364f45202abc4 100644 (file)
@@ -40,22 +40,22 @@ will fail with the error "ORA-01000: maximum open cursors exceeded".
 
 function fetch($c, $i) {
     global $s;   //  (*) Allow parent statement to be available when child is used
-    $s = ociparse($c, 'select cursor(select * from bug43492_tab) c from bug43492_tab');
-    ociexecute($s, OCI_DEFAULT);
-    ocifetchinto($s, $result, OCI_ASSOC);
-    ociexecute($result['C'], OCI_DEFAULT);
+    $s = oci_parse($c, 'select cursor(select * from bug43492_tab) c from bug43492_tab');
+    oci_execute($s, OCI_DEFAULT);
+    $result = oci_fetch_assoc($s);
+    oci_execute($result['C'], OCI_DEFAULT);
     return $result['C'];
 }
 
 for($i = 0; $i < 300; $i++) {
     $cur = fetch($c, $i);
     for($j = 0; $j < 10; $j++) {
-        ocifetchinto($cur, $row, OCI_NUM);
+        $row = oci_fetch_row($cur);
         echo "$row[0] ";
     }
     echo "\n";
-    ocifreestatement($cur);
-    ocifreestatement($s);   // (*) Free the parent statement cleanly
+    oci_free_statement($cur);
+    oci_free_statement($s);   // (*) Free the parent statement cleanly
 }
 
 echo "Done\n";
index 03b4c31382e355c352926d5f057c0d572c7344c0..0ea4cdf8061a6ec9de469e0311ce32278819f470 100644 (file)
@@ -32,21 +32,21 @@ $stmtarray = array(
 oci8_test_sql_execute($c, $stmtarray);
 
 function fetch($c, $i) {
-    $s = ociparse($c, 'select cursor(select * from bug43492_tab) c from bug43492_tab');
-    ociexecute($s, OCI_DEFAULT);
-    ocifetchinto($s, $result, OCI_ASSOC);
-    ociexecute($result['C'], OCI_DEFAULT);
+    $s = oci_parse($c, 'select cursor(select * from bug43492_tab) c from bug43492_tab');
+    oci_execute($s, OCI_DEFAULT);
+    $result = oci_fetch_assoc($s);
+    oci_execute($result['C'], OCI_DEFAULT);
     return $result['C'];
 }
 
 for($i = 0; $i < 300; $i++) {
     $cur = fetch($c, $i);
     for($j = 0; $j < 10; $j++) {
-        ocifetchinto($cur, $row, OCI_NUM);
+        $row = oci_fetch_row($cur);
         echo "$row[0] ";
     }
     echo "\n";
-    ocifreestatement($cur);
+    oci_free_statement($cur);
 }
 
 echo "Done\n";
index 2de2d2b1255dacc6d7f899dadab0454d346325ae..05515f63ae8b820b93a13c4de223fce5f30cd05d 100644 (file)
@@ -12,9 +12,15 @@ require __DIR__."/connect.inc";
 require __DIR__."/create_type.inc";
 
 var_dump($coll1 = oci_new_collection($c, $type_name));
-
 var_dump($coll1->free());
-var_dump($coll1->size());
+
+try {
+    var_dump($coll1->size());
+} catch (TypeError $error) {
+    var_dump($error->getMessage());
+}
+
+var_dump(oci_new_collection($c, "NONEXISTENT"));
 
 echo "Done\n";
 
@@ -27,7 +33,8 @@ object(OCI-Collection)#%d (1) {
   resource(%d) of type (oci8 collection)
 }
 bool(true)
+string(%d) "OCI-Collection::size(): supplied resource is not a valid oci8 collection resource"
 
-Warning: OCI-Collection::size(): supplied resource is not a valid oci8 collection resource in %s on line %d
+Warning: oci_new_collection(): OCI-22303: type ""."NONEXISTENT" not found in %s on line %d
 bool(false)
 Done
diff --git a/ext/oci8/tests/coll_005.phpt b/ext/oci8/tests/coll_005.phpt
deleted file mode 100644 (file)
index 72fdbfd..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
---TEST--
-ocinewcollection()
---SKIPIF--
-<?php
-$target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
-require(__DIR__.'/skipif.inc');
-?>
---FILE--
-<?php
-
-require __DIR__."/connect.inc";
-require __DIR__."/create_type.inc";
-
-var_dump(ocinewcollection($c, $type_name));
-var_dump(ocinewcollection($c, "NONEXISTENT"));
-
-echo "Done\n";
-
-require __DIR__."/drop_type.inc";
-
-?>
---EXPECTF--
-object(OCI-Collection)#%d (1) {
-  ["collection"]=>
-  resource(%d) of type (oci8 collection)
-}
-
-Warning: ocinewcollection(): OCI-22303: type ""."NONEXISTENT" not found in %s on line %d
-bool(false)
-Done
diff --git a/ext/oci8/tests/coll_006.phpt b/ext/oci8/tests/coll_006.phpt
deleted file mode 100644 (file)
index cc69f9b..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
---TEST--
-ocinewcollection() + free()
---SKIPIF--
-<?php
-$target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
-require(__DIR__.'/skipif.inc');
-?>
---FILE--
-<?php
-
-require __DIR__."/connect.inc";
-require __DIR__."/create_type.inc";
-
-var_dump($coll1 = ocinewcollection($c, $type_name));
-
-var_dump($coll1->free());
-var_dump($coll1->size());
-
-echo "Done\n";
-
-require __DIR__."/drop_type.inc";
-
-?>
---EXPECTF--
-object(OCI-Collection)#%d (1) {
-  ["collection"]=>
-  resource(%d) of type (oci8 collection)
-}
-bool(true)
-
-Warning: OCI-Collection::size(): supplied resource is not a valid oci8 collection resource in %s on line %d
-bool(false)
-Done
diff --git a/ext/oci8/tests/coll_006_func.phpt b/ext/oci8/tests/coll_006_func.phpt
deleted file mode 100644 (file)
index 7bd1152..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
---TEST--
-ocinewcollection() + free()
---SKIPIF--
-<?php
-$target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
-require(__DIR__.'/skipif.inc');
-?>
---FILE--
-<?php
-
-require __DIR__."/connect.inc";
-require __DIR__."/create_type.inc";
-
-var_dump($coll1 = ocinewcollection($c, $type_name));
-
-var_dump(oci_free_collection($coll1));
-var_dump(oci_collection_size($coll1));
-
-echo "Done\n";
-
-require __DIR__."/drop_type.inc";
-
-?>
---EXPECTF--
-object(OCI-Collection)#%d (1) {
-  ["collection"]=>
-  resource(%d) of type (oci8 collection)
-}
-bool(true)
-
-Warning: oci_collection_size(): supplied resource is not a valid oci8 collection resource in %s on line %d
-bool(false)
-Done
diff --git a/ext/oci8/tests/coll_007.phpt b/ext/oci8/tests/coll_007.phpt
deleted file mode 100644 (file)
index b3b05a5..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
---TEST--
-collection methods
---SKIPIF--
-<?php
-$target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
-require(__DIR__.'/skipif.inc');
-?>
---FILE--
-<?php
-
-require __DIR__."/connect.inc";
-require __DIR__."/create_type.inc";
-
-$coll1 = ocinewcollection($c, $type_name);
-
-var_dump($coll1->size());
-var_dump($coll1->max());
-var_dump($coll1->trim(3));
-var_dump($coll1->append(1));
-var_dump($coll1->getElem(0));
-var_dump($coll1->assignElem(0,2));
-
-echo "Done\n";
-
-require __DIR__."/drop_type.inc";
-
-?>
---EXPECTF--
-int(0)
-int(0)
-
-Warning: OCI-Collection::trim(): OCI-22167: given trim size [3] must be less than or equal to [0] in %s on line %d
-bool(false)
-bool(true)
-float(1)
-bool(true)
-Done
diff --git a/ext/oci8/tests/coll_008.phpt b/ext/oci8/tests/coll_008.phpt
deleted file mode 100644 (file)
index b85dc1e..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
---TEST--
-ocicollassign()
---SKIPIF--
-<?php
-$target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
-require(__DIR__.'/skipif.inc');
-?>
---FILE--
-<?php
-
-require __DIR__."/connect.inc";
-require __DIR__."/create_type.inc";
-
-$coll1 = ocinewcollection($c, $type_name);
-$coll2 = ocinewcollection($c, $type_name);
-
-var_dump($coll1->append(1));
-
-var_dump($coll2->assign($coll1));
-
-var_dump($coll2->getElem(0));
-
-echo "Done\n";
-
-require __DIR__."/drop_type.inc";
-
-?>
---EXPECT--
-bool(true)
-bool(true)
-float(1)
-Done
index 2707fbccf7e4a4313860e434b2b9274311c40279..19289c52908ebce466cacd91d51e75a669afeeb4 100644 (file)
@@ -14,17 +14,17 @@ $ora_sql = "DROP TYPE
                         ".$type_name."
            ";
 
-$statement = OCIParse($c,$ora_sql);
-@OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+@oci_execute($statement);
 
 $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF DATE";
 
-$statement = OCIParse($c,$ora_sql);
-OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+oci_execute($statement);
 
 
-$coll1 = ocinewcollection($c, $type_name);
-$coll2 = ocinewcollection($c, $type_name);
+$coll1 = oci_new_collection($c, $type_name);
+$coll2 = oci_new_collection($c, $type_name);
 
 var_dump($coll1->append("2005-07-28"));
 
index 5b3e08579aa42369ccaf0894e1962a71609fabc4..10e03c209567ad0676e11483ea6c69c43a86e6a0 100644 (file)
@@ -14,17 +14,17 @@ $ora_sql = "DROP TYPE
                         ".$type_name."
            ";
 
-$statement = OCIParse($c,$ora_sql);
-@OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+@oci_execute($statement);
 
 $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF DATE";
 
-$statement = OCIParse($c,$ora_sql);
-OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+oci_execute($statement);
 
 
-$coll1 = ocinewcollection($c, $type_name);
-$coll2 = ocinewcollection($c, $type_name);
+$coll1 = oci_new_collection($c, $type_name);
+$coll2 = oci_new_collection($c, $type_name);
 
 var_dump(oci_collection_append($coll1, "2005-07-28"));
 
index 42bd788a81c167ff55cde1ac779cc84dc96ab04e..da0b278e07272c7b4d1fcb3f48118e275c45f478 100644 (file)
@@ -14,17 +14,17 @@ $ora_sql = "DROP TYPE
                         ".$type_name."
            ";
 
-$statement = OCIParse($c,$ora_sql);
-@OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+@oci_execute($statement);
 
 $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR(10)";
 
-$statement = OCIParse($c,$ora_sql);
-OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+oci_execute($statement);
 
 
-$coll1 = ocinewcollection($c, $type_name);
-$coll2 = ocinewcollection($c, $type_name);
+$coll1 = oci_new_collection($c, $type_name);
+$coll2 = oci_new_collection($c, $type_name);
 
 var_dump($coll1->append(null));
 
index 9ef6c222503e9e895c30dbfee9e040203816f699..f244ce16a8fac4dc324f70168089bbe17af918a5 100644 (file)
@@ -14,17 +14,17 @@ $ora_sql = "DROP TYPE
                         ".$type_name."
            ";
 
-$statement = OCIParse($c,$ora_sql);
-@OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+@oci_execute($statement);
 
 $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR(10)";
 
-$statement = OCIParse($c,$ora_sql);
-OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+oci_execute($statement);
 
 
-$coll1 = ocinewcollection($c, $type_name);
-$coll2 = ocinewcollection($c, $type_name);
+$coll1 = oci_new_collection($c, $type_name);
+$coll2 = oci_new_collection($c, $type_name);
 
 var_dump(oci_collection_append($coll1, null));
 
index 562de0889f81d081ea8738e75ce370fd9eebef2b..6af52e9a3c7d0aa734127e06b1f1c457d2672e78 100644 (file)
@@ -14,17 +14,17 @@ $ora_sql = "DROP TYPE
                         ".$type_name."
            ";
 
-$statement = OCIParse($c,$ora_sql);
-@OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+@oci_execute($statement);
 
 $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR(10)";
 
-$statement = OCIParse($c,$ora_sql);
-OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+oci_execute($statement);
 
 
-$coll1 = ocinewcollection($c, $type_name);
-$coll2 = ocinewcollection($c, $type_name);
+$coll1 = oci_new_collection($c, $type_name);
+$coll2 = oci_new_collection($c, $type_name);
 
 var_dump($coll1->append("string"));
 var_dump($coll1->append("string"));
index ca43336ffc8d14eb059ddfcde4f8506ce5b892a9..ca9d733e885e5778c7d9a4d28b81d9adb432029e 100644 (file)
@@ -14,17 +14,17 @@ $ora_sql = "DROP TYPE
                         ".$type_name."
            ";
 
-$statement = OCIParse($c,$ora_sql);
-@OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+@oci_execute($statement);
 
 $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR(10)";
 
-$statement = OCIParse($c,$ora_sql);
-OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+oci_execute($statement);
 
 
-$coll1 = ocinewcollection($c, $type_name);
-$coll2 = ocinewcollection($c, $type_name);
+$coll1 = oci_new_collection($c, $type_name);
+$coll2 = oci_new_collection($c, $type_name);
 
 var_dump(oci_collection_append($coll1, "string"));
 var_dump(oci_collection_append($coll1, "string"));
index be0439e8baf6d7e35abdaa2ec126cd0df9e27845..680e03049ff7885e763a98ec14a613722abde855 100644 (file)
@@ -14,17 +14,17 @@ $ora_sql = "DROP TYPE
                         ".$type_name."
            ";
 
-$statement = OCIParse($c,$ora_sql);
-@OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+@oci_execute($statement);
 
 $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF DATE";
 
-$statement = OCIParse($c,$ora_sql);
-OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+oci_execute($statement);
 
 
-$coll1 = ocinewcollection($c, $type_name);
-$coll2 = ocinewcollection($c, $type_name);
+$coll1 = oci_new_collection($c, $type_name);
+$coll2 = oci_new_collection($c, $type_name);
 
 var_dump($coll1->append("28-JUL-05"));
 
index fa6a026d16a0ec5e71a0d43effbc61eb5d0658a4..aa047653dd75620bfa2e6b8444155e2842834938 100644 (file)
@@ -14,17 +14,17 @@ $ora_sql = "DROP TYPE
                         ".$type_name."
            ";
 
-$statement = OCIParse($c,$ora_sql);
-@OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+@oci_execute($statement);
 
 $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF DATE";
 
-$statement = OCIParse($c,$ora_sql);
-OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+oci_execute($statement);
 
 
-$coll1 = ocinewcollection($c, $type_name);
-$coll2 = ocinewcollection($c, $type_name);
+$coll1 = oci_new_collection($c, $type_name);
+$coll2 = oci_new_collection($c, $type_name);
 
 var_dump(oci_collection_append($coll1, "28-JUL-05"));
 
index 1e943bf57ebf628b0d5304f17ee0d28645316e7c..10e5422b2a7e68531a8f79ee0ca57ccc3049bac3 100644 (file)
@@ -14,16 +14,16 @@ $ora_sql = "DROP TYPE
                         ".$type_name."
            ";
 
-$statement = OCIParse($c,$ora_sql);
-@OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+@oci_execute($statement);
 
 $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF DATE";
 
-$statement = OCIParse($c,$ora_sql);
-OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+oci_execute($statement);
 
 
-$coll1 = ocinewcollection($c, $type_name);
+$coll1 = oci_new_collection($c, $type_name);
 
 var_dump($coll1->append("28-JUL-05"));
 var_dump($coll1->assignElem(0,"01-JAN-05"));
index 417bfdb18f2f53d98be907dae524f2668452d3fc..7e4f253bfc23b32a51712ff27ffe3ea64dcffec4 100644 (file)
@@ -14,16 +14,16 @@ $ora_sql = "DROP TYPE
                         ".$type_name."
            ";
 
-$statement = OCIParse($c,$ora_sql);
-@OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+@oci_execute($statement);
 
 $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF DATE";
 
-$statement = OCIParse($c,$ora_sql);
-OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+oci_execute($statement);
 
 
-$coll1 = ocinewcollection($c, $type_name);
+$coll1 = oci_new_collection($c, $type_name);
 
 var_dump(oci_collection_append($coll1, "28-JUL-05"));
 var_dump(oci_collection_element_assign($coll1, 0, "01-JAN-05"));
index 697d306818c41539df86a5148486488293c716ba..158fd39f2edc5436f2aef6dd3db67607ddac68cb 100644 (file)
@@ -14,16 +14,16 @@ $ora_sql = "DROP TYPE
                         ".$type_name."
            ";
 
-$statement = OCIParse($c,$ora_sql);
-@OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+@oci_execute($statement);
 
 $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR(10)";
 
-$statement = OCIParse($c,$ora_sql);
-OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+oci_execute($statement);
 
 
-$coll1 = ocinewcollection($c, $type_name);
+$coll1 = oci_new_collection($c, $type_name);
 
 var_dump($coll1->append("striing"));
 var_dump($coll1->assignElem(0,"blah"));
index fc9df35a7cfa3046e5b470a0fafc70b50eb3f6af..a3f1d9bde863963bfc45c38fdb228f2314423083 100644 (file)
@@ -14,16 +14,16 @@ $ora_sql = "DROP TYPE
                         ".$type_name."
            ";
 
-$statement = OCIParse($c,$ora_sql);
-@OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+@oci_execute($statement);
 
 $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR(10)";
 
-$statement = OCIParse($c,$ora_sql);
-OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+oci_execute($statement);
 
 
-$coll1 = ocinewcollection($c, $type_name);
+$coll1 = oci_new_collection($c, $type_name);
 
 var_dump(oci_collection_append($coll1, "striing"));
 var_dump(oci_collection_element_assign($coll1, 0,"blah"));
index d3bffd2fe5bcbc3721a49ad321ef510bdca51884..cc519f202f9d05b4f3d7f59b62240e2a4f3b1d6c 100644 (file)
@@ -14,16 +14,16 @@ $ora_sql = "DROP TYPE
                         ".$type_name."
            ";
 
-$statement = OCIParse($c,$ora_sql);
-@OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+@oci_execute($statement);
 
 $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF NUMBER";
 
-$statement = OCIParse($c,$ora_sql);
-OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+oci_execute($statement);
 
 
-$coll1 = ocinewcollection($c, $type_name);
+$coll1 = oci_new_collection($c, $type_name);
 
 var_dump($coll1->append(1));
 var_dump($coll1->assignElem(0,2345));
index 3685a28b96a12a80bfb9e68ee8caa58fd092dbb3..5db45ee3393897273ba477b89b48a78364cfb604 100644 (file)
@@ -14,16 +14,16 @@ $ora_sql = "DROP TYPE
                         ".$type_name."
            ";
 
-$statement = OCIParse($c,$ora_sql);
-@OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+@oci_execute($statement);
 
 $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF NUMBER";
 
-$statement = OCIParse($c,$ora_sql);
-OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+oci_execute($statement);
 
 
-$coll1 = ocinewcollection($c, $type_name);
+$coll1 = oci_new_collection($c, $type_name);
 
 var_dump(oci_collection_append($coll1, 1));
 var_dump(oci_collection_element_assign($coll1,0,2345));
index d4b19efb432ac3340717c0de640a0ce45c279342..f64ac03f527fd8e3b0143f127df65a9aa69ad00f 100644 (file)
@@ -14,16 +14,16 @@ $ora_sql = "DROP TYPE
                         ".$type_name."
            ";
 
-$statement = OCIParse($c,$ora_sql);
-@OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+@oci_execute($statement);
 
 $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF NUMBER";
 
-$statement = OCIParse($c,$ora_sql);
-OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+oci_execute($statement);
 
 
-$coll1 = ocinewcollection($c, $type_name);
+$coll1 = oci_new_collection($c, $type_name);
 
 var_dump($coll1->append(1));
 var_dump($coll1->assignElem(-1,2345));
index 95ed0588dc55301e77f9abbc63af3f2c68a64cff..a9d9f0f8f41c29c7b59a75e88e237a56234de065 100644 (file)
@@ -14,16 +14,16 @@ $ora_sql = "DROP TYPE
                         ".$type_name."
            ";
 
-$statement = OCIParse($c,$ora_sql);
-@OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+@oci_execute($statement);
 
 $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF NUMBER";
 
-$statement = OCIParse($c,$ora_sql);
-OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+oci_execute($statement);
 
 
-$coll1 = ocinewcollection($c, $type_name);
+$coll1 = oci_new_collection($c, $type_name);
 
 var_dump(oci_collection_append($coll1, 1));
 var_dump(oci_collection_element_assign($coll1,-1,2345));
index 0bd730934f3acf06b101cadfeae0971b65d21296..6701a930c329f3fde212b4829c0434575feb8d84 100644 (file)
@@ -14,16 +14,16 @@ $ora_sql = "DROP TYPE
                         ".$type_name."
            ";
 
-$statement = OCIParse($c,$ora_sql);
-@OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+@oci_execute($statement);
 
 $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR(10)";
 
-$statement = OCIParse($c,$ora_sql);
-OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+oci_execute($statement);
 
 
-$coll1 = ocinewcollection($c, $type_name);
+$coll1 = oci_new_collection($c, $type_name);
 
 var_dump($coll1->append("string"));
 var_dump($coll1->assignElem(0, null));
index e3d9be2a4314006eb8ad50463d29b3e9f5023c6f..b1c403a16b199eccab528430dafa8c84c293a38f 100644 (file)
@@ -14,16 +14,16 @@ $ora_sql = "DROP TYPE
                         ".$type_name."
            ";
 
-$statement = OCIParse($c,$ora_sql);
-@OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+@oci_execute($statement);
 
 $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR(10)";
 
-$statement = OCIParse($c,$ora_sql);
-OCIExecute($statement);
+$statement = oci_parse($c,$ora_sql);
+oci_execute($statement);
 
 
-$coll1 = ocinewcollection($c, $type_name);
+$coll1 = oci_new_collection($c, $type_name);
 
 var_dump(oci_collection_append($coll1, "string"));
 var_dump(oci_collection_element_assign($coll1, 0, null));
diff --git a/ext/oci8/tests/commit_old.phpt b/ext/oci8/tests/commit_old.phpt
deleted file mode 100644 (file)
index bfbae9b..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
---TEST--
-ocicommit()/ocirollback()
---SKIPIF--
-<?php
-$target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
-require(__DIR__.'/skipif.inc');
-?>
---FILE--
-<?php
-
-require __DIR__."/connect.inc";
-require __DIR__.'/create_table.inc';
-
-$insert_sql = "INSERT INTO ".$schema.$table_name." (id, value) VALUES (1,1)";
-
-if (!($s = ociparse($c, $insert_sql))) {
-    die("ociparse(insert) failed!\n");
-}
-
-for ($i = 0; $i<3; $i++) {
-    if (!ociexecute($s, OCI_DEFAULT)) {
-        die("ociexecute(insert) failed!\n");
-    }
-}
-
-var_dump(ocirollback($c));
-
-$select_sql = "SELECT * FROM ".$schema.$table_name."";
-
-if (!($select = ociparse($c, $select_sql))) {
-    die("ociparse(select) failed!\n");
-}
-
-if (!oci_execute($select)) {
-    die("ociexecute(select) failed!\n");
-}
-var_dump(ocifetchstatement($select, $all));
-var_dump($all);
-
-/* ocifetchstatement */
-if (!ociexecute($s)) {
-    die("ociexecute(select) failed!\n");
-}
-
-$insert_sql = "INSERT INTO ".$schema.$table_name." (id, value) VALUES (1,1)";
-
-if (!($s = ociparse($c, $insert_sql))) {
-    die("ociparse(insert) failed!\n");
-}
-
-for ($i = 0; $i<3; $i++) {
-    if (!ociexecute($s, OCI_DEFAULT)) {
-        die("ociexecute(insert) failed!\n");
-    }
-}
-
-var_dump(ocicommit($c));
-
-if (!ociexecute($select)) {
-    die("ociexecute(select) failed!\n");
-}
-var_dump(ocifetchstatement($select, $all));
-var_dump($all);
-
-
-require __DIR__.'/drop_table.inc';
-
-echo "Done\n";
-?>
---EXPECT--
-bool(true)
-int(0)
-array(5) {
-  ["ID"]=>
-  array(0) {
-  }
-  ["VALUE"]=>
-  array(0) {
-  }
-  ["BLOB"]=>
-  array(0) {
-  }
-  ["CLOB"]=>
-  array(0) {
-  }
-  ["STRING"]=>
-  array(0) {
-  }
-}
-bool(true)
-int(4)
-array(5) {
-  ["ID"]=>
-  array(4) {
-    [0]=>
-    string(1) "1"
-    [1]=>
-    string(1) "1"
-    [2]=>
-    string(1) "1"
-    [3]=>
-    string(1) "1"
-  }
-  ["VALUE"]=>
-  array(4) {
-    [0]=>
-    string(1) "1"
-    [1]=>
-    string(1) "1"
-    [2]=>
-    string(1) "1"
-    [3]=>
-    string(1) "1"
-  }
-  ["BLOB"]=>
-  array(4) {
-    [0]=>
-    NULL
-    [1]=>
-    NULL
-    [2]=>
-    NULL
-    [3]=>
-    NULL
-  }
-  ["CLOB"]=>
-  array(4) {
-    [0]=>
-    NULL
-    [1]=>
-    NULL
-    [2]=>
-    NULL
-    [3]=>
-    NULL
-  }
-  ["STRING"]=>
-  array(4) {
-    [0]=>
-    NULL
-    [1]=>
-    NULL
-    [2]=>
-    NULL
-    [3]=>
-    NULL
-  }
-}
-Done
index 297b0897b6b43ce607fc6ef1cc5f54874c1283b8..9bdcf3e2b371be417c00bccb7087ad8a82dd1bf6 100644 (file)
@@ -22,7 +22,7 @@ else {
 }
 
 var_dump(oci_close($c1));
-var_dump(ocilogoff($c2));
+var_dump(oci_close($c2));
 
 echo "Done\n";
 
diff --git a/ext/oci8/tests/connect_1_old.phpt b/ext/oci8/tests/connect_1_old.phpt
deleted file mode 100644 (file)
index 3ce756f..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
---TEST--
-ociplogon() & ocinlogon()
---SKIPIF--
-<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
---FILE--
-<?php
-
-require __DIR__."/connect.inc";
-
-if (!empty($dbase)) {
-    var_dump($c1 = ociplogon($user, $password, $dbase));
-}
-else {
-    var_dump($c1 = ociplogon($user, $password));
-}
-
-if (!empty($dbase)) {
-    var_dump($c2 = ocinlogon($user, $password, $dbase));
-}
-else {
-    var_dump($c2 = ocinlogon($user, $password));
-}
-
-var_dump(ocilogoff($c1));
-var_dump(ocilogoff($c2));
-
-echo "Done\n";
-
-?>
---EXPECTF--
-resource(%d) of type (oci8 persistent connection)
-resource(%d) of type (oci8 connection)
-bool(true)
-bool(true)
-Done
diff --git a/ext/oci8/tests/connect_old.phpt b/ext/oci8/tests/connect_old.phpt
deleted file mode 100644 (file)
index c55197f..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-ocilogon()
---SKIPIF--
-<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
---FILE--
-<?php
-
-require __DIR__."/connect.inc";
-
-if (!empty($dbase)) {
-    var_dump(ocilogon($user, $password, $dbase));
-}
-else {
-    var_dump(ocilogon($user, $password));
-}
-
-echo "Done\n";
-
-?>
---EXPECTF--
-resource(%d) of type (oci8 connection)
-Done
diff --git a/ext/oci8/tests/connect_without_oracle_home_old.phpt b/ext/oci8/tests/connect_without_oracle_home_old.phpt
deleted file mode 100644 (file)
index bd217ac..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
---TEST--
-ocilogon() without ORACLE_HOME set (OCIServerAttach() segfaults)
---SKIPIF--
-<?php
-if (!extension_loaded('oci8')) die("skip no oci8 extension");
-ob_start();
-phpinfo(INFO_MODULES);
-$phpinfo = ob_get_clean();
-$ov = preg_match('/Compile-time ORACLE_HOME/', $phpinfo);
-if ($ov !== 1) {
-       die ("skip Test only valid when OCI8 is built with an ORACLE_HOME");
-}
-?>
---ENV--
-ORACLE_HOME=""
---FILE--
-<?php
-
-require __DIR__."/details.inc";
-
-if (!empty($dbase)) {
-    var_dump(ocilogon($user, $password, $dbase));
-}
-else {
-    var_dump(ocilogon($user, $password));
-}
-
-?>
---EXPECTF--
-Warning: ocilogon(): OCIEnvNlsCreate() failed. There is something wrong with your system - please check that ORACLE_HOME and %s are set and point to the right directories in %s on line %d
-
-Warning: ocilogon(): %s ORA-01804
- in %s on line %d
-bool(false)
diff --git a/ext/oci8/tests/connect_without_oracle_home_old_11.phpt b/ext/oci8/tests/connect_without_oracle_home_old_11.phpt
deleted file mode 100644 (file)
index 243741b..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
---TEST--
-ocilogon() without ORACLE_HOME set (OCIServerAttach() segfaults)
---SKIPIF--
-<?php
-if (!extension_loaded('oci8')) die("skip no oci8 extension");
-ob_start();
-phpinfo(INFO_MODULES);
-$phpinfo = ob_get_clean();
-$ov = preg_match('/Compile-time ORACLE_HOME/', $phpinfo);
-if ($ov !== 1) {
-       die ("skip Test only valid when OCI8 is built with an ORACLE_HOME");
-}
-preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
-if (!(isset($matches[0]) &&
-      (($matches[1] == 11 && $matches[2] >= 2) ||
-       ($matches[1] >= 12)
-       ))) {
-    die("skip test expected to work only with Oracle 11gR2 or greater version of client");
-}
-?>
---ENV--
-ORACLE_HOME=""
---FILE--
-<?php
-
-require __DIR__."/details.inc";
-
-if (!empty($dbase)) {
-    var_dump(ocilogon($user, $password, $dbase));
-}
-else {
-    var_dump(ocilogon($user, $password));
-}
-
-?>
---EXPECTF--
-Warning: ocilogon(): OCIEnvNlsCreate() failed. There is something wrong with your system - please check that ORACLE_HOME and %s are set and point to the right directories in %s on line %d
-
-Warning: ocilogon(): Error while trying to retrieve text for error ORA-01804
- in %sconnect_without_oracle_home_old_11.php on line %d
-bool(false)
index 40df1b95943c17d4b0e2d8015a31aa3e31379e60..3415e1b9cc1f2b0e3bd9f471de496ff7235cb9df 100644 (file)
@@ -5,13 +5,13 @@
                                 ".$type_name."
                    ";
 
-        $statement = OCIParse($c,$ora_sql);
-        @OCIExecute($statement);
+        $statement = oci_parse($c,$ora_sql);
+        @oci_execute($statement);
 
         $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF NUMBER(11)";
 
-        $statement = OCIParse($c,$ora_sql);
-        OCIExecute($statement);
+        $statement = oci_parse($c,$ora_sql);
+        oci_execute($statement);
     }
 
 ?>
diff --git a/ext/oci8/tests/cursors_old.phpt b/ext/oci8/tests/cursors_old.phpt
deleted file mode 100644 (file)
index 7c5c668..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
---TEST--
-fetching cursor from a statement
---SKIPIF--
-<?php
-$target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
-require(__DIR__.'/skipif.inc');
-?>
---FILE--
-<?php
-
-require(__DIR__."/connect.inc");
-
-// Initialize
-
-$stmtarray = array(
-    "drop table cursors_old_tab",
-    "create table cursors_old_tab (id number, value number)",
-    "insert into cursors_old_tab (id, value) values (1,1)",
-    "insert into cursors_old_tab (id, value) values (1,1)",
-    "insert into cursors_old_tab (id, value) values (1,1)",
-);
-
-oci8_test_sql_execute($c, $stmtarray);
-
-// Run Test
-
-$sql = "select cursor(select * from cursors_old_tab) as curs from dual";
-$stmt = ociparse($c, $sql);
-
-ociexecute($stmt);
-
-while ($result = ocifetchinto($stmt, $data, OCI_ASSOC)) {
-    ociexecute($data["CURS"]);
-    ocifetchinto($data["CURS"], $subdata, OCI_ASSOC);
-    var_dump($subdata);
-    var_dump(ocicancel($data["CURS"]));
-    ocifetchinto($data["CURS"], $subdata, OCI_ASSOC);
-    var_dump($subdata);
-    var_dump(ocicancel($data["CURS"]));
-}
-
-// Cleanup
-
-$stmtarray = array(
-    "drop table cursors_old_tab"
-);
-
-oci8_test_sql_execute($c, $stmtarray);
-
-echo "Done\n";
-
-?>
---EXPECTF--
-array(2) {
-  ["ID"]=>
-  string(1) "1"
-  ["VALUE"]=>
-  string(1) "1"
-}
-bool(true)
-
-Warning: ocifetchinto():%sORA-01002: %s in %scursors_old.php on line %d
-array(2) {
-  ["ID"]=>
-  string(1) "1"
-  ["VALUE"]=>
-  string(1) "1"
-}
-bool(true)
-Done
diff --git a/ext/oci8/tests/define_old.phpt b/ext/oci8/tests/define_old.phpt
deleted file mode 100644 (file)
index 25458e1..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
---TEST--
-ocidefinebyname()
---SKIPIF--
-<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
---FILE--
-<?php
-
-require(__DIR__."/connect.inc");
-
-// Initialize
-
-$stmtarray = array(
-    "drop table define_old_tab",
-    "create table define_old_tab (string varchar(10))",
-    "insert into define_old_tab (string) values ('some')",
-);
-
-oci8_test_sql_execute($c, $stmtarray);
-
-// Run test
-
-$stmt = ociparse($c, "select string from define_old_tab");
-
-/* the define MUST be done BEFORE ociexecute! */
-
-$string = '';
-ocidefinebyname($stmt, "STRING", $string, 20);
-
-ociexecute($stmt);
-
-while (ocifetch($stmt)) {
-    var_dump($string);
-}
-
-// Cleanup
-
-$stmtarray = array(
-    "drop table define_old_tab"
-);
-
-oci8_test_sql_execute($c, $stmtarray);
-
-echo "Done\n";
-
-?>
---EXPECT--
-string(4) "some"
-Done
index 101ebfcd79f8eb4ffd1c6c859e91e97fdafa0df6..34c8d15dab9ed4ea90f1fa4505c9bc79365feeac 100644 (file)
@@ -75,4 +75,4 @@ if (!function_exists('oci8_test_sql_execute')) {
 
 }
 
-?>
+?>
\ No newline at end of file
diff --git a/ext/oci8/tests/error_old.phpt b/ext/oci8/tests/error_old.phpt
deleted file mode 100644 (file)
index e25b665..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
---TEST--
-ocierror()
---SKIPIF--
-<?php
-$target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs: different error messages from TimesTen
-require(__DIR__.'/skipif.inc');
-?>
---FILE--
-<?php
-
-require __DIR__."/connect.inc";
-
-if (!empty($dbase)) {
-    var_dump(ocilogon($user, $password, $dbase));
-}
-else {
-    var_dump(ocilogon($user, $password));
-}
-
-var_dump($s = ociparse($c, "WRONG SYNTAX"));
-var_dump(ociexecute($s));
-var_dump(ocierror($s));
-
-echo "Done\n";
-
-?>
---EXPECTF--
-resource(%s) of type (oci8 connection)
-resource(%s) of type (oci8 statement)
-
-Warning: ociexecute(): ORA-00900: %s in %s on line %d
-bool(false)
-array(4) {
-  ["code"]=>
-  int(900)
-  ["message"]=>
-  string(%d) "ORA-00900: %s"
-  ["offset"]=>
-  int(0)
-  ["sqltext"]=>
-  string(12) "WRONG SYNTAX"
-}
-Done
diff --git a/ext/oci8/tests/existence_aliases.phpt b/ext/oci8/tests/existence_aliases.phpt
new file mode 100644 (file)
index 0000000..9cdd7fb
--- /dev/null
@@ -0,0 +1,100 @@
+--TEST--
+Test if function aliases still exist.
+--SKIPIF--
+<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
+--FILE--
+<?php
+var_dump(function_exists('ocifreecursor'));
+var_dump(function_exists('ocibindbyname'));
+var_dump(function_exists('ocidefinebyname'));
+var_dump(function_exists('ocicolumnisnull'));
+var_dump(function_exists('ocicolumnname'));
+var_dump(function_exists('ocicolumnsize'));
+var_dump(function_exists('ocicolumnscale'));
+var_dump(function_exists('ocicolumnprecision'));
+var_dump(function_exists('ocicolumntype'));
+var_dump(function_exists('ocicolumntyperaw'));
+var_dump(function_exists('ociexecute'));
+var_dump(function_exists('ocicancel'));
+var_dump(function_exists('ocifetch'));
+var_dump(function_exists('ocifetchstatement'));
+var_dump(function_exists('ocifreestatement'));
+var_dump(function_exists('ociinternaldebug'));
+var_dump(function_exists('ocinumcols'));
+var_dump(function_exists('ociparse'));
+var_dump(function_exists('ocinewcursor'));
+var_dump(function_exists('ociresult'));
+var_dump(function_exists('ociserverversion'));
+var_dump(function_exists('ocistatementtype'));
+var_dump(function_exists('ocirowcount'));
+var_dump(function_exists('ocilogoff'));
+var_dump(function_exists('ocilogon'));
+var_dump(function_exists('ocinlogon'));
+var_dump(function_exists('ociplogon'));
+var_dump(function_exists('ocierror'));
+var_dump(function_exists('ocifreedesc'));
+var_dump(function_exists('ocisavelob'));
+var_dump(function_exists('ocisavelobfile'));
+var_dump(function_exists('ociwritelobtofile'));
+var_dump(function_exists('ociloadlob'));
+var_dump(function_exists('ocicommit'));
+var_dump(function_exists('ocirollback'));
+var_dump(function_exists('ocinewdescriptor'));
+var_dump(function_exists('ocisetprefetch'));
+var_dump(function_exists('ocipasswordchange'));
+var_dump(function_exists('ocifreecollection'));
+var_dump(function_exists('ocinewcollection'));
+var_dump(function_exists('ocicollappend'));
+var_dump(function_exists('ocicollgetelem'));
+var_dump(function_exists('ocicollassignelem'));
+var_dump(function_exists('ocicollsize'));
+var_dump(function_exists('ocicollmax'));
+var_dump(function_exists('ocicolltrim'));
+?>
+--EXPECTF--
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
\ No newline at end of file
index eae30bad23a9bcfacccfbe5c779016f4f36b8f7a..2bb455c4d1abf3d0d639859081486ebda6183793 100644 (file)
@@ -29,9 +29,9 @@ if (!oci_execute($s)) {
     die("oci_execute(select) failed!\n");
 }
 
-while(ocifetch($s)) {
-        $row = ociresult($s, 1);
-        $row1 = ociresult($s, 2);
+while(oci_fetch($s)) {
+        $row = oci_result($s, 1);
+        $row1 = oci_result($s, 2);
         var_dump($row);
         var_dump($row1);
 }
index b531364109fc8b1d0fbb10d2f940880488eba41c..911b458754c78597a8c78b0decaddf95711a3ee2 100644 (file)
@@ -30,14 +30,6 @@ if (!oci_execute($s)) {
 var_dump(oci_fetch_all($s, $all));
 var_dump($all);
 
-/* ocifetchstatement */
-if (!oci_execute($s)) {
-    die("oci_execute(select) failed!\n");
-}
-
-var_dump(ocifetchstatement($s, $all));
-var_dump($all);
-
 // Cleanup
 
 $stmtarray = array(
@@ -70,25 +62,4 @@ array(2) {
     string(1) "1"
   }
 }
-int(3)
-array(2) {
-  ["ID"]=>
-  array(3) {
-    [0]=>
-    string(1) "1"
-    [1]=>
-    string(1) "1"
-    [2]=>
-    string(1) "1"
-  }
-  ["VALUE"]=>
-  array(3) {
-    [0]=>
-    string(1) "1"
-    [1]=>
-    string(1) "1"
-    [2]=>
-    string(1) "1"
-  }
-}
 Done
diff --git a/ext/oci8/tests/fetch_into.phpt b/ext/oci8/tests/fetch_into.phpt
deleted file mode 100644 (file)
index 634e737..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
---TEST--
-ocifetchinto()
---SKIPIF--
-<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
---FILE--
-<?php
-
-require(__DIR__."/connect.inc");
-
-// Initialize
-
-$stmtarray = array(
-    "drop table fetch_into_tab",
-    "create table fetch_into_tab (id number, value number)",
-    "insert into fetch_into_tab (id, value) values (1,1)",
-    "insert into fetch_into_tab (id, value) values (1,1)",
-    "insert into fetch_into_tab (id, value) values (1,1)",
-);
-
-oci8_test_sql_execute($c, $stmtarray);
-
-// Run Test
-
-if (!($s = oci_parse($c, "select * from fetch_into_tab"))) {
-    die("oci_parse(select) failed!\n");
-}
-
-/* ocifetchinto */
-if (!oci_execute($s)) {
-    die("oci_execute(select) failed!\n");
-}
-var_dump(ocifetchinto($s, $all));
-var_dump($all);
-
-/* ocifetchinto */
-if (!oci_execute($s)) {
-    die("oci_execute(select) failed!\n");
-}
-var_dump(ocifetchinto($s, $all, OCI_NUM+OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS));
-var_dump($all);
-
-// Cleanup
-
-$stmtarray = array(
-    "drop table fetch_into_tab"
-);
-
-oci8_test_sql_execute($c, $stmtarray);
-
-echo "Done\n";
-?>
---EXPECT--
-int(2)
-array(2) {
-  [0]=>
-  string(1) "1"
-  [1]=>
-  string(1) "1"
-}
-int(2)
-array(4) {
-  [0]=>
-  string(1) "1"
-  ["ID"]=>
-  string(1) "1"
-  [1]=>
-  string(1) "1"
-  ["VALUE"]=>
-  string(1) "1"
-}
-Done
diff --git a/ext/oci8/tests/fetch_into1.phpt b/ext/oci8/tests/fetch_into1.phpt
deleted file mode 100644 (file)
index 27591ea..0000000
+++ /dev/null
@@ -1,195 +0,0 @@
---TEST--
-various ocifetchinto() tests
---SKIPIF--
-<?php
-$target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
-require(__DIR__.'/skipif.inc');
-?>
---FILE--
-<?php
-
-require __DIR__."/connect.inc";
-require __DIR__.'/create_table.inc';
-
-$insert_sql = "INSERT INTO ".$schema."".$table_name." (id, value, string) VALUES (1, 1, NULL)";
-
-if (!($s = oci_parse($c, $insert_sql))) {
-    die("oci_parse(insert) failed!\n");
-}
-
-for ($i = 0; $i<20; $i++) {
-    if (!oci_execute($s)) {
-        die("oci_execute(insert) failed!\n");
-    }
-}
-
-if (!oci_commit($c)) {
-    die("oci_commit() failed!\n");
-}
-
-$select_sql = "SELECT * FROM ".$schema."".$table_name."";
-
-if (!($s = oci_parse($c, $select_sql))) {
-    die("oci_parse(select) failed!\n");
-}
-
-if (!oci_execute($s)) {
-    die("oci_execute(select) failed!\n");
-}
-var_dump(ocifetchinto($s, $all, OCI_NUM));
-var_dump($all);
-var_dump(ocifetchinto($s, $all, OCI_ASSOC));
-var_dump($all);
-var_dump(ocifetchinto($s, $all, OCI_RETURN_NULLS));
-var_dump($all);
-var_dump(ocifetchinto($s, $all, OCI_RETURN_LOBS));
-var_dump($all);
-var_dump(ocifetchinto($s, $all, OCI_NUM+OCI_ASSOC));
-var_dump($all);
-var_dump(ocifetchinto($s, $all, OCI_NUM+OCI_ASSOC+OCI_RETURN_NULLS));
-var_dump($all);
-var_dump(ocifetchinto($s, $all, OCI_NUM+OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS));
-var_dump($all);
-var_dump(ocifetchinto($s, $all, OCI_RETURN_NULLS+OCI_RETURN_LOBS));
-var_dump($all);
-var_dump(ocifetchinto($s, $all, OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS));
-var_dump($all);
-var_dump(ocifetchinto($s, $all, OCI_NUM+OCI_RETURN_NULLS+OCI_RETURN_LOBS));
-var_dump($all);
-
-require __DIR__.'/drop_table.inc';
-
-echo "Done\n";
-?>
---EXPECT--
-int(5)
-array(2) {
-  [0]=>
-  string(1) "1"
-  [1]=>
-  string(1) "1"
-}
-int(5)
-array(2) {
-  ["ID"]=>
-  string(1) "1"
-  ["VALUE"]=>
-  string(1) "1"
-}
-int(5)
-array(5) {
-  [0]=>
-  string(1) "1"
-  [1]=>
-  string(1) "1"
-  [2]=>
-  NULL
-  [3]=>
-  NULL
-  [4]=>
-  NULL
-}
-int(5)
-array(2) {
-  [0]=>
-  string(1) "1"
-  [1]=>
-  string(1) "1"
-}
-int(5)
-array(4) {
-  [0]=>
-  string(1) "1"
-  ["ID"]=>
-  string(1) "1"
-  [1]=>
-  string(1) "1"
-  ["VALUE"]=>
-  string(1) "1"
-}
-int(5)
-array(10) {
-  [0]=>
-  string(1) "1"
-  ["ID"]=>
-  string(1) "1"
-  [1]=>
-  string(1) "1"
-  ["VALUE"]=>
-  string(1) "1"
-  [2]=>
-  NULL
-  ["BLOB"]=>
-  NULL
-  [3]=>
-  NULL
-  ["CLOB"]=>
-  NULL
-  [4]=>
-  NULL
-  ["STRING"]=>
-  NULL
-}
-int(5)
-array(10) {
-  [0]=>
-  string(1) "1"
-  ["ID"]=>
-  string(1) "1"
-  [1]=>
-  string(1) "1"
-  ["VALUE"]=>
-  string(1) "1"
-  [2]=>
-  NULL
-  ["BLOB"]=>
-  NULL
-  [3]=>
-  NULL
-  ["CLOB"]=>
-  NULL
-  [4]=>
-  NULL
-  ["STRING"]=>
-  NULL
-}
-int(5)
-array(5) {
-  [0]=>
-  string(1) "1"
-  [1]=>
-  string(1) "1"
-  [2]=>
-  NULL
-  [3]=>
-  NULL
-  [4]=>
-  NULL
-}
-int(5)
-array(5) {
-  ["ID"]=>
-  string(1) "1"
-  ["VALUE"]=>
-  string(1) "1"
-  ["BLOB"]=>
-  NULL
-  ["CLOB"]=>
-  NULL
-  ["STRING"]=>
-  NULL
-}
-int(5)
-array(5) {
-  [0]=>
-  string(1) "1"
-  [1]=>
-  string(1) "1"
-  [2]=>
-  NULL
-  [3]=>
-  NULL
-  [4]=>
-  NULL
-}
-Done
diff --git a/ext/oci8/tests/fetch_into2.phpt b/ext/oci8/tests/fetch_into2.phpt
deleted file mode 100644 (file)
index 13467e0..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
---TEST--
-ocifetchinto() & wrong number of params
---SKIPIF--
-<?php
-$target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
-require(__DIR__.'/skipif.inc');
-?>
---FILE--
-<?php
-
-require __DIR__."/connect.inc";
-require __DIR__.'/create_table.inc';
-
-$insert_sql = "INSERT INTO ".$schema."".$table_name." (id, value, string) VALUES (1, 1, NULL)";
-
-if (!($s = oci_parse($c, $insert_sql))) {
-    die("oci_parse(insert) failed!\n");
-}
-
-for ($i = 0; $i<20; $i++) {
-    if (!oci_execute($s)) {
-        die("oci_execute(insert) failed!\n");
-    }
-}
-
-if (!oci_commit($c)) {
-    die("oci_commit() failed!\n");
-}
-
-$select_sql = "SELECT * FROM ".$schema."".$table_name."";
-
-if (!($s = oci_parse($c, $select_sql))) {
-    die("oci_parse(select) failed!\n");
-}
-
-if (!oci_execute($s)) {
-    die("oci_execute(select) failed!\n");
-}
-var_dump(ocifetchinto($s));
-var_dump($all);
-var_dump(ocifetchinto($s, $all, OCI_ASSOC, 5));
-var_dump($all);
-var_dump(ocifetchinto($c, $all, OCI_RETURN_LOBS));
-var_dump($all);
-var_dump(ocifetchinto($s, $all, 1000000));
-var_dump($all);
-
-require __DIR__.'/drop_table.inc';
-
-echo "Done\n";
-?>
---EXPECTF--
-Warning: ocifetchinto() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
-Notice: Undefined variable $all in %s on line %d
-NULL
-
-Warning: ocifetchinto() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-NULL
-
-Warning: ocifetchinto(): supplied resource is not a valid oci8 statement resource in %s on line %d
-bool(false)
-NULL
-int(5)
-array(2) {
-  [0]=>
-  string(1) "1"
-  [1]=>
-  string(1) "1"
-}
-Done
index 1e270b6000fec05891ec4dd097c34c32c1881655..ca6d153abe56593b53800ce035850da3756adad1 100644 (file)
@@ -116,5 +116,5 @@ Test 2
 Test 3
 123
 
-Notice: Undefined property: stdClass::$CASESENSITIVE in %sfetch_object.php on line %d
+Warning: Undefined property: stdClass::$CASESENSITIVE in %sfetch_object.php on line %d
 
index 586daebca8d73c1451b4cbc5a5e580f985339636..fc83f375715e5117d72e46d61505a705a15aeb9b 100644 (file)
@@ -116,5 +116,5 @@ Test 2
 Test 3
 123
 
-Notice: Undefined property: stdClass::$CASESENSITIVE in %sfetch_object_1.php on line %d
+Warning: Undefined property: stdClass::$CASESENSITIVE in %sfetch_object_1.php on line %d
 
diff --git a/ext/oci8/tests/field_funcs_old.phpt b/ext/oci8/tests/field_funcs_old.phpt
deleted file mode 100644 (file)
index afb6dc6..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
---TEST--
-ocicolumn*() family
---SKIPIF--
-<?php
-$target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
-require(__DIR__.'/skipif.inc');
-?>
---FILE--
-<?php
-
-require __DIR__."/connect.inc";
-require __DIR__.'/create_table.inc';
-
-$insert_sql = "INSERT INTO ".$schema."".$table_name." (id, value) VALUES (1,1)";
-
-if (!($s = ociparse($c, $insert_sql))) {
-    die("ociparse(insert) failed!\n");
-}
-
-for ($i = 0; $i<3; $i++) {
-    if (!ociexecute($s)) {
-        die("ociexecute(insert) failed!\n");
-    }
-}
-
-if (!ocicommit($c)) {
-    die("ocicommit() failed!\n");
-}
-
-$select_sql = "SELECT * FROM ".$schema."".$table_name."";
-
-if (!($s = ociparse($c, $select_sql))) {
-    die("ociparse(select) failed!\n");
-}
-
-if (!ociexecute($s)) {
-    die("ociexecute(select) failed!\n");
-}
-
-ocifetchinto($s, $row, OCI_NUM + OCI_RETURN_NULLS + OCI_RETURN_LOBS);
-var_dump($row);
-
-foreach ($row as $num => $field) {
-    $num++;
-    var_dump(ocicolumnisnull($s, $num));
-    var_dump(ocicolumnname($s, $num));
-    var_dump(ocicolumntype($s, $num));
-    var_dump(ocicolumntyperaw($s, $num));
-    var_dump(ocicolumnscale($s, $num));
-    var_dump(ocicolumnprecision($s, $num));
-    var_dump(ocicolumnsize($s, $num));
-}
-
-
-require __DIR__.'/drop_table.inc';
-
-echo "Done\n";
-
-?>
---EXPECT--
-array(5) {
-  [0]=>
-  string(1) "1"
-  [1]=>
-  string(1) "1"
-  [2]=>
-  NULL
-  [3]=>
-  NULL
-  [4]=>
-  NULL
-}
-bool(false)
-string(2) "ID"
-string(6) "NUMBER"
-int(2)
-int(-127)
-int(0)
-int(22)
-bool(false)
-string(5) "VALUE"
-string(6) "NUMBER"
-int(2)
-int(-127)
-int(0)
-int(22)
-bool(true)
-string(4) "BLOB"
-string(4) "BLOB"
-int(113)
-int(0)
-int(0)
-int(4000)
-bool(true)
-string(4) "CLOB"
-string(4) "CLOB"
-int(112)
-int(0)
-int(0)
-int(4000)
-bool(true)
-string(6) "STRING"
-string(8) "VARCHAR2"
-int(1)
-int(0)
-int(0)
-int(10)
-Done
diff --git a/ext/oci8/tests/function_aliases.phpt b/ext/oci8/tests/function_aliases.phpt
deleted file mode 100644 (file)
index 2c890d6..0000000
+++ /dev/null
@@ -1,196 +0,0 @@
---TEST--
-Existence of old function aliases
---SKIPIF--
-<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
---FILE--
-<?php
-
-var_dump(oci_free_cursor());
-var_dump(ocifreecursor());
-var_dump(ocibindbyname());
-var_dump(ocidefinebyname());
-var_dump(ocicolumnisnull());
-var_dump(ocicolumnname());
-var_dump(ocicolumnsize());
-var_dump(ocicolumnscale());
-var_dump(ocicolumnprecision());
-var_dump(ocicolumntype());
-var_dump(ocicolumntyperaw());
-var_dump(ociexecute());
-var_dump(ocicancel());
-var_dump(ocifetch());
-var_dump(ocifetchstatement());
-var_dump(ocifreestatement());
-var_dump(ociinternaldebug());
-var_dump(ocinumcols());
-var_dump(ociparse());
-var_dump(ocinewcursor());
-var_dump(ociresult());
-var_dump(ociserverversion());
-var_dump(ocistatementtype());
-var_dump(ocirowcount());
-var_dump(ocilogoff());
-var_dump(ocilogon());
-var_dump(ocinlogon());
-var_dump(ociplogon());
-var_dump(ocierror());
-var_dump(ocifreedesc());
-var_dump(ocisavelob());
-var_dump(ocisavelobfile());
-var_dump(ociwritelobtofile());
-var_dump(ociloadlob());
-var_dump(ocicommit());
-var_dump(ocirollback());
-var_dump(ocinewdescriptor());
-var_dump(ocisetprefetch());
-var_dump(ocipasswordchange());
-var_dump(ocifreecollection());
-var_dump(ocinewcollection());
-var_dump(ocicollappend());
-var_dump(ocicollgetelem());
-var_dump(ocicollassignelem());
-var_dump(ocicollsize());
-var_dump(ocicollmax());
-var_dump(ocicolltrim());
-
-echo "Done\n";
-
-?>
---EXPECTF--
-Warning: oci_free_cursor() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: ocifreecursor() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: ocibindbyname() expects at least 3 parameters, 0 given in %s on line %d
-NULL
-
-Warning: ocidefinebyname() expects at least 3 parameters, 0 given in %s on line %d
-NULL
-
-Warning: ocicolumnisnull() expects exactly 2 parameters, 0 given in %s on line %d
-bool(false)
-
-Warning: ocicolumnname() expects exactly 2 parameters, 0 given in %s on line %d
-bool(false)
-
-Warning: ocicolumnsize() expects exactly 2 parameters, 0 given in %s on line %d
-bool(false)
-
-Warning: ocicolumnscale() expects exactly 2 parameters, 0 given in %s on line %d
-bool(false)
-
-Warning: ocicolumnprecision() expects exactly 2 parameters, 0 given in %s on line %d
-bool(false)
-
-Warning: ocicolumntype() expects exactly 2 parameters, 0 given in %s on line %d
-bool(false)
-
-Warning: ocicolumntyperaw() expects exactly 2 parameters, 0 given in %s on line %d
-bool(false)
-
-Warning: ociexecute() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: ocicancel() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: ocifetch() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: ocifetchstatement() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: ocifreestatement() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-NULL
-
-Warning: ocinumcols() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: ociparse() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: ocinewcursor() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: ociresult() expects exactly 2 parameters, 0 given in %s on line %d
-bool(false)
-
-Warning: ociserverversion() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: ocistatementtype() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: ocirowcount() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: ocilogoff() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: ocilogon() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: ocinlogon() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: ociplogon() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-bool(false)
-
-Warning: ocifreedesc() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: ocisavelob() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: ocisavelobfile() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: ociwritelobtofile() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: ociloadlob() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: ocicommit() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: ocirollback() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: ocinewdescriptor() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: ocisetprefetch() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: Wrong parameter count for ocipasswordchange() in %s on line %d
-NULL
-
-Warning: ocifreecollection() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: ocinewcollection() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: ocicollappend() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: ocicollgetelem() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: ocicollassignelem() expects exactly 3 parameters, 0 given in %s on line %d
-NULL
-
-Warning: ocicollsize() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: ocicollmax() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: ocicolltrim() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-Done
index d23450734f6fe345fa54d80c0b5101f7a934216a..ef1def4bdb411a1fff20545084012d8ffd1c1c83 100644 (file)
@@ -17,22 +17,13 @@ $stmtarray = array(
 oci8_test_sql_execute($c, $stmtarray);
 
 // Run Test
-
 echo "Test 1\n";
-var_dump(ocirowcount());
-var_dump(oci_num_rows());
-var_dump(ocinumcols());
-var_dump(oci_num_fields());
-
-echo "Test 2\n";
 $insert_sql = "insert into num_tab (id, value) values (1,1)";
 if (!($s = oci_parse($c, $insert_sql))) {
     die("oci_parse(insert) failed!\n");
 }
 
-var_dump(ocirowcount($s));
 var_dump(oci_num_rows($s));
-var_dump(ocinumcols($s));
 var_dump(oci_num_fields($s));
 
 for ($i = 0; $i<3; $i++) {
@@ -41,20 +32,16 @@ for ($i = 0; $i<3; $i++) {
   }
 }
 
-echo "Test 3\n";
-var_dump(ocirowcount($s));
+echo "Test 2\n";
 var_dump(oci_num_rows($s));
-var_dump(ocinumcols($s));
 var_dump(oci_num_fields($s));
 
 if (!oci_commit($c)) {
   die("oci_commit() failed!\n");
 }
 
-echo "Test 4\n";
-var_dump(ocirowcount($s));
+echo "Test 3\n";
 var_dump(oci_num_rows($s));
-var_dump(ocinumcols($s));
 var_dump(oci_num_fields($s));
 
 // All rows
@@ -64,20 +51,16 @@ if (!($s = oci_parse($c, $select_sql))) {
   die("oci_parse(select) failed!\n");
 }
 
-echo "Test 5a\n";
-var_dump(ocirowcount($s));
+echo "Test 4a\n";
 var_dump(oci_num_rows($s));
-var_dump(ocinumcols($s));
 var_dump(oci_num_fields($s));
 
 if (!oci_execute($s)) {
   die("oci_execute(select) failed!\n");
 }
 
-echo "Test 5b\n";
-var_dump(ocirowcount($s));
+echo "Test 4b\n";
 var_dump(oci_num_rows($s));
-var_dump(ocinumcols($s));
 var_dump(oci_num_fields($s));
 
 
@@ -85,10 +68,8 @@ if (oci_fetch_all($s,$r) === false) {
   die("oci_fetch_all(select) failed!\n");
 }
 
-echo "Test 5c\n";
-var_dump(ocirowcount($s));
+echo "Test 4c\n";
 var_dump(oci_num_rows($s));
-var_dump(ocinumcols($s));
 var_dump(oci_num_fields($s));
 
 // One row
@@ -106,10 +87,8 @@ if (oci_fetch_all($s,$r) === false) {
   die("oci_fetch_all(select) failed!\n");
 }
 
-echo "Test 6\n";
-var_dump(ocirowcount($s));
+echo "Test 5\n";
 var_dump(oci_num_rows($s));
-var_dump(ocinumcols($s));
 var_dump(oci_num_fields($s));
 
 // No rows
@@ -127,10 +106,8 @@ if (oci_fetch_all($s,$r) === false) {
   die("oci_fetch_all(select) failed!\n");
 }
 
-echo "Test 7\n";
-var_dump(ocirowcount($s));
+echo "Test 6\n";
 var_dump(oci_num_rows($s));
-var_dump(ocinumcols($s));
 var_dump(oci_num_fields($s));
 
 $delete_sql = "delete from num_tab";
@@ -143,22 +120,12 @@ if (!oci_execute($s)) {
     die("oci_execute(delete) failed!\n");
 }
 
-echo "Test 8a\n";
-var_dump(ocirowcount($s));
+echo "Test 7a\n";
 var_dump(oci_num_rows($s));
-var_dump(ocinumcols($s));
 var_dump(oci_num_fields($s));
 
-
 oci_commit($c);
 
-echo "Test 8b\n";
-var_dump(ocirowcount($s));
-var_dump(oci_num_rows($s));
-var_dump(ocinumcols($s));
-var_dump(oci_num_fields($s));
-
-
 // Cleanup
 
 $stmtarray = array(
@@ -172,66 +139,30 @@ echo "Done\n";
 ?>
 --EXPECTF--
 Test 1
-
-Warning: ocirowcount() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: oci_num_rows() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: ocinumcols() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: oci_num_fields() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-Test 2
 int(0)
 int(0)
-int(0)
-int(0)
-Test 3
-int(1)
+Test 2
 int(1)
 int(0)
-int(0)
-Test 4
-int(1)
+Test 3
 int(1)
 int(0)
-int(0)
-Test 5a
-int(0)
-int(0)
+Test 4a
 int(0)
 int(0)
-Test 5b
+Test 4b
 int(0)
-int(0)
-int(2)
 int(2)
-Test 5c
-int(3)
+Test 4c
 int(3)
 int(2)
-int(2)
-Test 6
+Test 5
 int(1)
-int(1)
-int(2)
 int(2)
-Test 7
-int(0)
+Test 6
 int(0)
 int(1)
-int(1)
-Test 8a
-int(3)
+Test 7a
 int(3)
 int(0)
-int(0)
-Test 8b
-int(3)
-int(3)
-int(0)
-int(0)
-Done
+Done
\ No newline at end of file
index c0e53001dff40547349e02d2db9c58dccde47e18..8c7acd471feaa32c76a2e602cca735b997b4089f 100644 (file)
@@ -37,7 +37,7 @@ require __DIR__."/connect.inc";
 
 $new_password = "test";
 var_dump(oci_password_change($dbase, $user, $password, $new_password));
-var_dump($new_c = ocilogon($user,$new_password,$dbase));
+var_dump($new_c = oci_connect($user,$new_password,$dbase));
 var_dump(oci_password_change($dbase, $user, $new_password, $password));
 
 
diff --git a/ext/oci8/tests/password_old.phpt b/ext/oci8/tests/password_old.phpt
deleted file mode 100644 (file)
index a92dba4..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
---TEST--
-ocipasswordchange()
---SKIPIF--
-<?php
-$target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
-require(__DIR__.'/skipif.inc');
-require(__DIR__.'/connect.inc');
-if (empty($dbase)) die ("skip requires database connection string be set");
-if ($test_drcp) die("skip password change not supported in DRCP Mode");
-
-preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches_sv);
-preg_match('/([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
-if (!(isset($matches_sv[0]) && isset($matches[0])
-       && $matches_sv[1] == $matches[1]
-       && $matches_sv[2] == $matches[2]
-       && $matches_sv[3] == $matches[3]
-       && $matches_sv[4] == $matches[4])) {
-           // Avoid diffs due to cross version protocol changes (e.g. like 11.2.0.2-11.2.0.3) and bugs like Oracle bug: 6277160
-                  die ("skip test only runs when database client libraries and database server are the same version");
-}
-
-// This test in Oracle 12c needs a non-CDB or the root container
-if (isset($matches_sv[0]) && $matches_sv[1] >= 12) {
-    $s = oci_parse($c, "select nvl(sys_context('userenv', 'con_name'), 'notacdb') as dbtype from dual");
-    $r = @oci_execute($s);
-    if (!$r)
-        die('skip could not identify container type');
-    $r = oci_fetch_array($s);
-    if ($r['DBTYPE'] !== 'CDB$ROOT')
-        die('skip cannot run test using a PDB');
-}
-?>
---FILE--
-<?php
-
-require __DIR__."/connect.inc";
-
-$new_password = "test";
-var_dump(ocipasswordchange($dbase, $user, $password, $new_password));
-var_dump($new_c = ocilogon($user,$new_password,$dbase));
-var_dump(ocipasswordchange($dbase, $user, $new_password, $password));
-
-echo "Done\n";
-
-?>
---EXPECTF--
-resource(%d) of type (oci8 connection)
-resource(%d) of type (oci8 connection)
-resource(%d) of type (oci8 connection)
-Done
diff --git a/ext/oci8/tests/prefetch_old.phpt b/ext/oci8/tests/prefetch_old.phpt
deleted file mode 100644 (file)
index 1fdf013..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
---TEST--
-ocisetprefetch()
---SKIPIF--
-<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
---FILE--
-<?php
-
-require(__DIR__."/connect.inc");
-
-$stmtarray = array(
-    "drop table prefetch_old_tab",
-    "create table prefetch_old_tab (id number, value number)",
-    "insert into prefetch_old_tab (id, value) values (1,1)",
-    "insert into prefetch_old_tab (id, value) values (1,1)",
-    "insert into prefetch_old_tab (id, value) values (1,1)",
-);
-
-oci8_test_sql_execute($c, $stmtarray);
-
-// Run Test
-
-if (!ocicommit($c)) {
-    die("ocicommit() failed!\n");
-}
-
-$select_sql = "select * from prefetch_old_tab";
-
-if (!($s = ociparse($c, $select_sql))) {
-    die("ociparse(select) failed!\n");
-}
-
-var_dump(ocisetprefetch($s, 10));
-
-if (!ociexecute($s)) {
-    die("ociexecute(select) failed!\n");
-}
-
-var_dump(ocifetch($s));
-var_dump(ocirowcount($s));
-
-
-// Cleanup
-
-$stmtarray = array(
-    "drop table prefetch_old_tab"
-);
-
-oci8_test_sql_execute($c, $stmtarray);
-
-echo "Done\n";
-?>
---EXPECT--
-bool(true)
-bool(true)
-int(1)
-Done
index 43c3205337e9ccb07a7f28c98a36a82cd73aaab4..3420387326e3212f4496aa8ab724cd2a90fb9f25 100644 (file)
@@ -24,7 +24,6 @@ reflection::export(new reflectionfunction('oci_fetch_object'));
 reflection::export(new reflectionfunction('oci_fetch_row'));
 reflection::export(new reflectionfunction('oci_fetch_assoc'));
 reflection::export(new reflectionfunction('oci_fetch_array'));
-reflection::export(new reflectionfunction('ocifetchinto'));
 reflection::export(new reflectionfunction('oci_fetch_all'));
 reflection::export(new reflectionfunction('oci_free_statement'));
 reflection::export(new reflectionfunction('oci_internal_debug'));
@@ -75,52 +74,6 @@ reflection::export(new reflectionfunction('oci_collection_max'));
 reflection::export(new reflectionfunction('oci_collection_trim'));
 reflection::export(new reflectionfunction('oci_new_collection'));
 reflection::export(new reflectionfunction('oci_free_cursor'));
-reflection::export(new reflectionfunction('ocifreecursor'));
-reflection::export(new reflectionfunction('ocibindbyname'));
-reflection::export(new reflectionfunction('ocidefinebyname'));
-reflection::export(new reflectionfunction('ocicolumnisnull'));
-reflection::export(new reflectionfunction('ocicolumnname'));
-reflection::export(new reflectionfunction('ocicolumnsize'));
-reflection::export(new reflectionfunction('ocicolumnscale'));
-reflection::export(new reflectionfunction('ocicolumnprecision'));
-reflection::export(new reflectionfunction('ocicolumntype'));
-reflection::export(new reflectionfunction('ocicolumntyperaw'));
-reflection::export(new reflectionfunction('ociexecute'));
-reflection::export(new reflectionfunction('ocicancel'));
-reflection::export(new reflectionfunction('ocifetch'));
-reflection::export(new reflectionfunction('ocifetchstatement'));
-reflection::export(new reflectionfunction('ocifreestatement'));
-reflection::export(new reflectionfunction('ociinternaldebug'));
-reflection::export(new reflectionfunction('ocinumcols'));
-reflection::export(new reflectionfunction('ociparse'));
-reflection::export(new reflectionfunction('ocinewcursor'));
-reflection::export(new reflectionfunction('ociresult'));
-reflection::export(new reflectionfunction('ociserverversion'));
-reflection::export(new reflectionfunction('ocistatementtype'));
-reflection::export(new reflectionfunction('ocirowcount'));
-reflection::export(new reflectionfunction('ocilogoff'));
-reflection::export(new reflectionfunction('ocilogon'));
-reflection::export(new reflectionfunction('ocinlogon'));
-reflection::export(new reflectionfunction('ociplogon'));
-reflection::export(new reflectionfunction('ocierror'));
-reflection::export(new reflectionfunction('ocifreedesc'));
-reflection::export(new reflectionfunction('ocisavelob'));
-reflection::export(new reflectionfunction('ocisavelobfile'));
-reflection::export(new reflectionfunction('ociwritelobtofile'));
-reflection::export(new reflectionfunction('ociloadlob'));
-reflection::export(new reflectionfunction('ocicommit'));
-reflection::export(new reflectionfunction('ocirollback'));
-reflection::export(new reflectionfunction('ocinewdescriptor'));
-reflection::export(new reflectionfunction('ocisetprefetch'));
-reflection::export(new reflectionfunction('ocipasswordchange'));
-reflection::export(new reflectionfunction('ocifreecollection'));
-reflection::export(new reflectionfunction('ocinewcollection'));
-reflection::export(new reflectionfunction('ocicollappend'));
-reflection::export(new reflectionfunction('ocicollgetelem'));
-reflection::export(new reflectionfunction('ocicollassignelem'));
-reflection::export(new reflectionfunction('ocicollsize'));
-reflection::export(new reflectionfunction('ocicollmax'));
-reflection::export(new reflectionfunction('ocicolltrim'));
 reflection::export(new reflectionfunction('oci_set_edition'));
 reflection::export(new reflectionfunction('oci_set_module_name'));
 reflection::export(new reflectionfunction('oci_set_action'));
@@ -270,15 +223,6 @@ Function [ <internal%s> function oci_fetch_array ] {
   }
 }
 
-Function [ <internal%s> function ocifetchinto ] {
-
-  - Parameters [3] {
-    Parameter #0 [ <required> $statement_resource ]
-    Parameter #1 [ <required> &$result ]
-    Parameter #2 [ <optional> $mode ]
-  }
-}
-
 Function [ <internal%s> function oci_fetch_all ] {
 
   - Parameters [5] {
@@ -680,379 +624,6 @@ Function [ <internal%s> function oci_free_cursor ] {
   }
 }
 
-Function [ <internal%s> function ocifreecursor ] {
-
-  - Parameters [1] {
-    Parameter #0 [ <required> $statement_resource ]
-  }
-}
-
-Function [ <internal%s> function ocibindbyname ] {
-
-  - Parameters [5] {
-    Parameter #0 [ <required> $statement_resource ]
-    Parameter #1 [ <required> $column_name ]
-    Parameter #2 [ <required> &$variable ]
-    Parameter #3 [ <optional> $maximum_length ]
-    Parameter #4 [ <optional> $type ]
-  }
-}
-
-Function [ <internal%s> function ocidefinebyname ] {
-
-  - Parameters [4] {
-    Parameter #0 [ <required> $statement_resource ]
-    Parameter #1 [ <required> $column_name ]
-    Parameter #2 [ <required> &$variable ]
-    Parameter #3 [ <optional> $type ]
-  }
-}
-
-Function [ <internal%s> function ocicolumnisnull ] {
-
-  - Parameters [2] {
-    Parameter #0 [ <required> $statement_resource ]
-    Parameter #1 [ <required> $column_number_or_name ]
-  }
-}
-
-Function [ <internal%s> function ocicolumnname ] {
-
-  - Parameters [2] {
-    Parameter #0 [ <required> $statement_resource ]
-    Parameter #1 [ <required> $column_number_or_name ]
-  }
-}
-
-Function [ <internal%s> function ocicolumnsize ] {
-
-  - Parameters [2] {
-    Parameter #0 [ <required> $statement_resource ]
-    Parameter #1 [ <required> $column_number_or_name ]
-  }
-}
-
-Function [ <internal%s> function ocicolumnscale ] {
-
-  - Parameters [2] {
-    Parameter #0 [ <required> $statement_resource ]
-    Parameter #1 [ <required> $column_number_or_name ]
-  }
-}
-
-Function [ <internal%s> function ocicolumnprecision ] {
-
-  - Parameters [2] {
-    Parameter #0 [ <required> $statement_resource ]
-    Parameter #1 [ <required> $column_number_or_name ]
-  }
-}
-
-Function [ <internal%s> function ocicolumntype ] {
-
-  - Parameters [2] {
-    Parameter #0 [ <required> $statement_resource ]
-    Parameter #1 [ <required> $column_number_or_name ]
-  }
-}
-
-Function [ <internal%s> function ocicolumntyperaw ] {
-
-  - Parameters [2] {
-    Parameter #0 [ <required> $statement_resource ]
-    Parameter #1 [ <required> $column_number_or_name ]
-  }
-}
-
-Function [ <internal%s> function ociexecute ] {
-
-  - Parameters [2] {
-    Parameter #0 [ <required> $statement_resource ]
-    Parameter #1 [ <optional> $mode ]
-  }
-}
-
-Function [ <internal%s> function ocicancel ] {
-
-  - Parameters [1] {
-    Parameter #0 [ <required> $statement_resource ]
-  }
-}
-
-Function [ <internal%s> function ocifetch ] {
-
-  - Parameters [1] {
-    Parameter #0 [ <required> $statement_resource ]
-  }
-}
-
-Function [ <internal%s> function ocifetchstatement ] {
-
-  - Parameters [5] {
-    Parameter #0 [ <required> $statement_resource ]
-    Parameter #1 [ <required> &$output ]
-    Parameter #2 [ <optional> $skip ]
-    Parameter #3 [ <optional> $maximum_rows ]
-    Parameter #4 [ <optional> $flags ]
-  }
-}
-
-Function [ <internal%s> function ocifreestatement ] {
-
-  - Parameters [1] {
-    Parameter #0 [ <required> $statement_resource ]
-  }
-}
-
-Function [ <internal%s> function ociinternaldebug ] {
-
-  - Parameters [1] {
-    Parameter #0 [ <required> $mode ]
-  }
-}
-
-Function [ <internal%s> function ocinumcols ] {
-
-  - Parameters [1] {
-    Parameter #0 [ <required> $statement_resource ]
-  }
-}
-
-Function [ <internal%s> function ociparse ] {
-
-  - Parameters [2] {
-    Parameter #0 [ <required> $connection_resource ]
-    Parameter #1 [ <required> $sql_text ]
-  }
-}
-
-Function [ <internal%s> function ocinewcursor ] {
-
-  - Parameters [1] {
-    Parameter #0 [ <required> $connection_resource ]
-  }
-}
-
-Function [ <internal%s> function ociresult ] {
-
-  - Parameters [2] {
-    Parameter #0 [ <required> $statement_resource ]
-    Parameter #1 [ <required> $column_number_or_name ]
-  }
-}
-
-Function [ <internal%s> function ociserverversion ] {
-
-  - Parameters [1] {
-    Parameter #0 [ <required> $connection_resource ]
-  }
-}
-
-Function [ <internal%s> function ocistatementtype ] {
-
-  - Parameters [1] {
-    Parameter #0 [ <required> $statement_resource ]
-  }
-}
-
-Function [ <internal%s> function ocirowcount ] {
-
-  - Parameters [1] {
-    Parameter #0 [ <required> $statement_resource ]
-  }
-}
-
-Function [ <internal%s> function ocilogoff ] {
-
-  - Parameters [1] {
-    Parameter #0 [ <required> $connection_resource ]
-  }
-}
-
-Function [ <internal%s> function ocilogon ] {
-
-  - Parameters [5] {
-    Parameter #0 [ <required> $username ]
-    Parameter #1 [ <required> $password ]
-    Parameter #2 [ <optional> $connection_string ]
-    Parameter #3 [ <optional> $character_set ]
-    Parameter #4 [ <optional> $session_mode ]
-  }
-}
-
-Function [ <internal%s> function ocinlogon ] {
-
-  - Parameters [5] {
-    Parameter #0 [ <required> $username ]
-    Parameter #1 [ <required> $password ]
-    Parameter #2 [ <optional> $connection_string ]
-    Parameter #3 [ <optional> $character_set ]
-    Parameter #4 [ <optional> $session_mode ]
-  }
-}
-
-Function [ <internal%s> function ociplogon ] {
-
-  - Parameters [5] {
-    Parameter #0 [ <required> $username ]
-    Parameter #1 [ <required> $password ]
-    Parameter #2 [ <optional> $connection_string ]
-    Parameter #3 [ <optional> $character_set ]
-    Parameter #4 [ <optional> $session_mode ]
-  }
-}
-
-Function [ <internal%s> function ocierror ] {
-
-  - Parameters [1] {
-    Parameter #0 [ <optional> $connection_or_statement_resource ]
-  }
-}
-
-Function [ <internal%s> function ocifreedesc ] {
-
-  - Parameters [1] {
-    Parameter #0 [ <required> $lob_descriptor ]
-  }
-}
-
-Function [ <internal%s> function ocisavelob ] {
-
-  - Parameters [3] {
-    Parameter #0 [ <required> $lob_descriptor ]
-    Parameter #1 [ <required> $data ]
-    Parameter #2 [ <optional> $offset ]
-  }
-}
-
-Function [ <internal%s> function ocisavelobfile ] {
-
-  - Parameters [2] {
-    Parameter #0 [ <required> $lob_descriptor ]
-    Parameter #1 [ <required> $filename ]
-  }
-}
-
-Function [ <internal%s> function ociwritelobtofile ] {
-
-  - Parameters [4] {
-    Parameter #0 [ <required> $lob_descriptor ]
-    Parameter #1 [ <required> $filename ]
-    Parameter #2 [ <optional> $start ]
-    Parameter #3 [ <optional> $length ]
-  }
-}
-
-Function [ <internal%s> function ociloadlob ] {
-
-  - Parameters [1] {
-    Parameter #0 [ <required> $lob_descriptor ]
-  }
-}
-
-Function [ <internal%s> function ocicommit ] {
-
-  - Parameters [1] {
-    Parameter #0 [ <required> $connection_resource ]
-  }
-}
-
-Function [ <internal%s> function ocirollback ] {
-
-  - Parameters [1] {
-    Parameter #0 [ <required> $connection_resource ]
-  }
-}
-
-Function [ <internal%s> function ocinewdescriptor ] {
-
-  - Parameters [2] {
-    Parameter #0 [ <required> $connection_resource ]
-    Parameter #1 [ <optional> $type ]
-  }
-}
-
-Function [ <internal%s> function ocisetprefetch ] {
-
-  - Parameters [2] {
-    Parameter #0 [ <required> $statement_resource ]
-    Parameter #1 [ <required> $number_of_rows ]
-  }
-}
-
-Function [ <internal%s> function ocipasswordchange ] {
-
-  - Parameters [4] {
-    Parameter #0 [ <required> $connection_resource_or_connection_string ]
-    Parameter #1 [ <required> $username ]
-    Parameter #2 [ <required> $old_password ]
-    Parameter #3 [ <required> $new_password ]
-  }
-}
-
-Function [ <internal%s> function ocifreecollection ] {
-
-  - Parameters [1] {
-    Parameter #0 [ <required> $collection ]
-  }
-}
-
-Function [ <internal%s> function ocinewcollection ] {
-
-  - Parameters [3] {
-    Parameter #0 [ <required> $connection_resource ]
-    Parameter #1 [ <required> $type_name ]
-    Parameter #2 [ <optional> $schema_name ]
-  }
-}
-
-Function [ <internal%s> function ocicollappend ] {
-
-  - Parameters [2] {
-    Parameter #0 [ <required> $collection ]
-    Parameter #1 [ <required> $value ]
-  }
-}
-
-Function [ <internal%s> function ocicollgetelem ] {
-
-  - Parameters [2] {
-    Parameter #0 [ <required> $collection ]
-    Parameter #1 [ <required> $index ]
-  }
-}
-
-Function [ <internal%s> function ocicollassignelem ] {
-
-  - Parameters [3] {
-    Parameter #0 [ <required> $collection ]
-    Parameter #1 [ <required> $index ]
-    Parameter #2 [ <required> $value ]
-  }
-}
-
-Function [ <internal%s> function ocicollsize ] {
-
-  - Parameters [1] {
-    Parameter #0 [ <required> $collection ]
-  }
-}
-
-Function [ <internal%s> function ocicollmax ] {
-
-  - Parameters [1] {
-    Parameter #0 [ <required> $collection ]
-  }
-}
-
-Function [ <internal%s> function ocicolltrim ] {
-
-  - Parameters [2] {
-    Parameter #0 [ <required> $collection ]
-    Parameter #1 [ <required> $number ]
-  }
-}
-
 Function [ <internal%s> function oci_set_edition ] {
 
   - Parameters [1] {
@@ -1097,5 +668,4 @@ Function [ <internal%s> function oci_get_implicit_resultset ] {
   - Parameters [1] {
     Parameter #0 [ <required> $statement_resource ]
   }
-}
-
+}
\ No newline at end of file
index d2a781e6a300fe47666a5b2fdb43a797b7f2fc6b..bf634a3be809fd4d3950c02ede96105d86d96e49 100644 (file)
@@ -17,14 +17,10 @@ else {
 $v = oci_server_version($c);
 var_dump(str_replace("\n", "", $v));
 
-$v = ociserverversion($c);
-var_dump(str_replace("\n", "", $v));
-
 echo "Done\n";
 
 ?>
 --EXPECTF--
 resource(%d) of type (oci8 connection)
 string(%d) "Oracle %s"
-string(%d) "Oracle %s"
 Done
diff --git a/ext/oci8/tests/statement_type_old.phpt b/ext/oci8/tests/statement_type_old.phpt
deleted file mode 100644 (file)
index b095bc2..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
---TEST--
-ocistatementtype()
---SKIPIF--
-<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
---FILE--
-<?php
-
-require __DIR__."/connect.inc";
-
-if (!empty($dbase)) {
-    var_dump($c = ocilogon($user, $password, $dbase));
-}
-else {
-    var_dump($c = ocilogon($user, $password));
-}
-
-$sqls = Array(
-    "SELECT * FROM table",
-    "DELETE FROM table WHERE id = 1",
-    "INSERT INTO table VALUES(1)",
-    "UPDATE table SET id = 1",
-    "DROP TABLE table",
-    "CREATE OR REPLACE PROCEDURE myproc(v1 NUMBER) as BEGIN DBMS_OUTPUT.PUT_LINE(v1); END;",
-    "CREATE TABLE table (id NUMBER)",
-    "ALTER TABLE table ADD (col1 NUMBER)",
-    "BEGIN NULL; END;",
-    "DECLARE myn NUMBER BEGIN myn := 1; END;",
-    "CALL myproc(1)",
-    "WRONG SYNTAX",
-    ""
-);
-
-foreach ($sqls as $sql) {
-    $s = ociparse($c, $sql);
-    var_dump(ocistatementtype($s));
-}
-
-echo "Done\n";
-
-?>
---EXPECTF--
-resource(%d) of type (oci8 connection)
-string(6) "SELECT"
-string(6) "DELETE"
-string(6) "INSERT"
-string(6) "UPDATE"
-string(4) "DROP"
-string(6) "CREATE"
-string(6) "CREATE"
-string(5) "ALTER"
-string(5) "BEGIN"
-string(7) "DECLARE"
-string(4) "CALL"
-string(7) "UNKNOWN"
-string(7) "UNKNOWN"
-Done