summaryrefslogtreecommitdiff
path: root/ext/oci8/tests/bug26133.phpt
blob: d3f0ed9bf3047aaf250625ff47e497b3330e345c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
--TEST--
Bug #26133 (ocifreedesc() segfault)
--SKIPIF--
<?php
    require 'skipif.inc'; 
?>
--FILE--
<?php
    require 'connect.inc';
    require 'create_table.inc';
   
    if ($connection) {
        $ora_sql = "INSERT INTO 
                               ".$schema."php_test_table (id, value) 
                         VALUES ('1','1')
                      RETURNING 
                               ROWID 
                           INTO :v_rowid ";
                      
        $statement = OCIParse($connection,$ora_sql);
        $rowid = OCINewDescriptor($connection,OCI_D_ROWID);
        OCIBindByName($statement,":v_rowid", $rowid,-1,OCI_B_ROWID);
        if (OCIExecute($statement)) {
            OCICommit($connection);
        }
        OCIFreeStatement($statement);
        $rowid->free();
    }

    require 'drop_table.inc';
    
    echo "Done\n";
?>
--EXPECTF--
Done