2
Bug #27303 (OCIBindByName binds numeric PHP values as characters)
5
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
6
require(dirname(__FILE__)."/connect.inc");
7
$sv = oci_server_version($c);
8
$sv = preg_match('/Release 1[01]\.2\./', $sv, $matches);
10
die ("skip expected output only valid when using Oracle 19gR2 or 11gR2 databases");
16
// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs.
17
// It will diff with a 32bit 11.2.0.1 DB
19
require dirname(__FILE__).'/connect.inc';
22
$create_st[] = "drop sequence myseq";
23
$create_st[] = "drop table mytab";
24
$create_st[] = "create sequence myseq";
25
$create_st[] = "create table mytab (mydata varchar2(20), seqcol number)";
27
foreach ($create_st as $statement) {
28
$stmt = oci_parse($c, $statement);
32
define('MYLIMIT', 200);
34
$stmt = "insert into mytab (mydata, seqcol) values ('Some data', myseq.nextval) returning seqcol into :mybv";
36
$stid = OCIParse($c, $stmt);
37
if (!$stid) { echo "Parse error"; die; }
39
$r = OCIBindByName($stid, ':MYBV', $mybv);
40
if (!$r) { echo "Bind error"; die; }
42
for ($i = 1; $i < MYLIMIT; $i++) {
43
$r = OCIExecute($stid, OCI_DEFAULT);
44
if (!$r) { echo "Execute error"; die; }
51
$drop_st[] = "drop sequence myseq";
52
$drop_st[] = "drop table mytab";
54
foreach ($create_st as $statement) {
55
$stmt = oci_parse($c, $statement);
b'\\ No newline at end of file'