summaryrefslogtreecommitdiff
path: root/ext/pdo_oci
diff options
context:
space:
mode:
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)