summaryrefslogtreecommitdiff
path: root/ext/pdo_oci
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2008-07-21 17:35:50 (GMT)
committerPierre Joye <pajoye@php.net>2008-07-21 17:35:50 (GMT)
commit86a493f43549de38dda15f6f4f4cb649cd57de01 (patch)
tree219031b2633efb42c974a6e8f70894d2d979aaac /ext/pdo_oci
parent9d4064afc0c69fbee15b6fb404b38b205e2988cc (diff)
downloadphp-86a493f43549de38dda15f6f4f4cb649cd57de01.tar.gz
- SAB: #41996, Problem accessing Oracle ROWID (Martin Jansen)
Diffstat (limited to 'ext/pdo_oci')
-rwxr-xr-xext/pdo_oci/oci_statement.c2
-rw-r--r--ext/pdo_oci/tests/bug41996.phpt20
2 files changed, 21 insertions, 1 deletions
diff --git a/ext/pdo_oci/oci_statement.c b/ext/pdo_oci/oci_statement.c
index 1d2c058..7191398 100755
--- a/ext/pdo_oci/oci_statement.c
+++ b/ext/pdo_oci/oci_statement.c
@@ -557,7 +557,7 @@ static int oci_stmt_describe(pdo_stmt_t *stmt, int colno TSRMLS_DC) /* {{{ */
case SQLT_BIN:
default:
- if (dtype == SQLT_DAT || dtype == SQLT_NUM
+ if (dtype == SQLT_DAT || dtype == SQLT_NUM || dtype == SQLT_RDD
#ifdef SQLT_TIMESTAMP
|| dtype == SQLT_TIMESTAMP
#endif
diff --git a/ext/pdo_oci/tests/bug41996.phpt b/ext/pdo_oci/tests/bug41996.phpt
new file mode 100644
index 0000000..ac8e35f
--- /dev/null
+++ b/ext/pdo_oci/tests/bug41996.phpt
@@ -0,0 +1,20 @@
+--TEST--
+PDO OCI Bug #41996 (Problem accessing Oracle ROWID)
+--SKIPIF--
+<?php
+/* $Id$ */
+if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded');
+require dirname(__FILE__).'/../../pdo/tests/pdo_test.inc';
+PDOTest::skip();
+?>
+--FILE--
+<?php
+require 'ext/pdo/tests/pdo_test.inc';
+$db = PDOTest::test_factory('ext/pdo_oci/tests/common.phpt');
+
+$stmt = $db->prepare('SELECT rowid FROM dual');
+$stmt->execute();
+$row = $stmt->fetch();
+var_dump(strlen($row[0]) > 0);
+--EXPECTF--
+bool(true)