Annotation of embedaddon/php/ext/oci8/tests/bug38161.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Bug #38161 (oci_bind_by_name() returns garbage when Oracle didn't set the variable)
                      3: --SKIPIF--
                      4: <?php if (!extension_loaded("oci8")) print "skip"; ?>
                      5: --FILE--
                      6: <?php
                      7: 
                      8: require dirname(__FILE__).'/connect.inc';
                      9: 
                     10: $query = "begin if false then :bv := 1; end if; end;";
                     11: $stid = oci_parse($c, $query);
                     12: oci_bind_by_name($stid, ":bv", $bv, 22);
                     13: oci_execute($stid, OCI_DEFAULT);
                     14: 
                     15: var_dump($bv);
                     16: unset($bv);
                     17: 
                     18: $query = "begin if false then :bv := 1; end if; end;";
                     19: $stid = oci_parse($c, $query);
                     20: oci_bind_by_name($stid, ":bv", $bv, 22, SQLT_INT);
                     21: oci_execute($stid, OCI_DEFAULT);
                     22: 
                     23: var_dump($bv);
                     24: 
                     25: echo "Done\n";
                     26: ?>
                     27: --EXPECTF--    
                     28: NULL
                     29: int(0)
                     30: Done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>