php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch php-5.3.3-pdo_firebird_driver_attributes.patch for PDO related Bug #53323

Patch version 2010-11-16 16:45 UTC

Return to Bug #53323 | Download this patch
Patch Revisions:

Developer: preeves@ibphoenix.com

--- ext/pdo_firebird/firebird_driver.c.orig	2010-01-12 13:46:54.000000000 +0100
+++ ext/pdo_firebird/firebird_driver.c	2010-11-16 16:23:57.100873646 +0100
@@ -34,6 +34,7 @@
 #include "pdo/php_pdo_driver.h"
 #include "php_pdo_firebird.h"
 #include "php_pdo_firebird_int.h"
+#include "../pdo/php_pdo_driver.h"
 
 static int firebird_alloc_prepare_stmt(pdo_dbh_t*, const char*, long, XSQLDA*, isc_stmt_handle*,
 	HashTable* TSRMLS_DC);
@@ -547,7 +548,7 @@
 	pdo_firebird_db_handle *H = (pdo_firebird_db_handle *)dbh->driver_data;
 
 	switch (attr) {
-		char tmp[200];
+		char tmp[512];
 		
 		case PDO_ATTR_AUTOCOMMIT:
 			ZVAL_LONG(val,dbh->auto_commit);
@@ -590,6 +592,16 @@
 				ZVAL_STRING(val,tmp,1);
 				return 1;
 			}
+			
+		case PDO_ATTR_PREFETCH:
+		case PDO_ATTR_TIMEOUT:
+			ZVAL_STRING(val,"This attribute is not relevant for this driver",1);
+			return 1;
+		  
+		case PDO_ATTR_FETCH_TABLE_NAMES:
+			ZVAL_BOOL(val, H->fetch_table_names );
+			return 1;
+
 	}
 	return 0;
 }       
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Thu Apr 17 03:01:55 2014 UTC