Attached is a patch plus test case for PHP_5_3's PDO_OCI that fixes
bug #41996. Should cleanly apply to HEAD, too.

Martin
Index: oci_statement.c
===================================================================
RCS file: /repository/php-src/ext/pdo_oci/oci_statement.c,v
retrieving revision 1.25
diff -u -r1.25 oci_statement.c
--- oci_statement.c	31 Dec 2007 07:12:13 -0000	1.25
+++ oci_statement.c	21 Jul 2008 10:16:31 -0000
@@ -415,7 +415,7 @@
 		case SQLT_BIN:
 		default:
 			dyn = FALSE;
-			if (dtype == SQLT_DAT || dtype == SQLT_NUM
+			if (dtype == SQLT_DAT || dtype == SQLT_NUM || dtype == SQLT_RDD
 #ifdef SQLT_TIMESTAMP
 					|| dtype == SQLT_TIMESTAMP
 #endif
Index: tests/bug_41996.phpt
===================================================================
RCS file: tests/bug_41996.phpt
diff -N tests/bug_41996.phpt
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tests/bug_41996.phpt	21 Jul 2008 10:16:31 -0000
@@ -0,0 +1,19 @@
+--TEST--
+PDO OCI Bug #41996 (Problem accessing Oracle ROWID)
+--SKIPIF--
+<?php
+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)
-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to