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

Patch fix-bug-48724.patch for PDO related Bug #48724

Patch version 2012-04-13 12:06 UTC

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

Developer: tony2001@php.net

From d9b4d8d3e3860074172905688ef666e6f9c110f6 Mon Sep 17 00:00:00 2001
From: Antony Dovgal <tony@daylessday.org>
Date: Fri, 13 Apr 2012 13:59:52 +0400
Subject: [PATCH] fix bug #48724

PDO's getColumnMeta() doesn't return native_type for BIT, TINYINT and YEAR
---
 ext/pdo_mysql/mysql_statement.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c
index 0c2689f..e142e31 100755
--- a/ext/pdo_mysql/mysql_statement.c
+++ b/ext/pdo_mysql/mysql_statement.c
@@ -754,9 +754,12 @@ static char *type_to_name_native(int type) /* {{{ */
     switch (type) {
         PDO_MYSQL_NATIVE_TYPE_NAME(STRING)
         PDO_MYSQL_NATIVE_TYPE_NAME(VAR_STRING)
-#ifdef MYSQL_HAS_TINY
+#ifdef FIELD_TYPE_TINY
         PDO_MYSQL_NATIVE_TYPE_NAME(TINY)
 #endif
+#ifdef FIELD_TYPE_BIT
+        PDO_MYSQL_NATIVE_TYPE_NAME(BIT)
+#endif
         PDO_MYSQL_NATIVE_TYPE_NAME(SHORT)
         PDO_MYSQL_NATIVE_TYPE_NAME(LONG)
         PDO_MYSQL_NATIVE_TYPE_NAME(LONGLONG)
@@ -771,7 +774,7 @@ static char *type_to_name_native(int type) /* {{{ */
         PDO_MYSQL_NATIVE_TYPE_NAME(GEOMETRY)
 #endif
         PDO_MYSQL_NATIVE_TYPE_NAME(TIMESTAMP)
-#ifdef MYSQL_HAS_YEAR
+#ifdef FIELD_TYPE_YEAR
         PDO_MYSQL_NATIVE_TYPE_NAME(YEAR)
 #endif
         PDO_MYSQL_NATIVE_TYPE_NAME(SET)
-- 
1.7.3.4
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Nov 03 13:01:28 2024 UTC