]> granicus.if.org Git - php/commitdiff
fix #35536 (mysql_field_type() doesn't handle NEWDECIMAL)
authorAntony Dovgal <tony2001@php.net>
Mon, 5 Dec 2005 13:16:48 +0000 (13:16 +0000)
committerAntony Dovgal <tony2001@php.net>
Mon, 5 Dec 2005 13:16:48 +0000 (13:16 +0000)
add also SET, ENUM, NEWDATE and GEOMETRY to the switch

NEWS
ext/mysql/php_mysql.c

diff --git a/NEWS b/NEWS
index ccda9dbd00d8c7f2f72354af36181421bf0f8f2d..76ffb98756d1ede7830121837306d743a1071289 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -24,6 +24,7 @@ PHP                                                                        NEWS
 - Fixed bug #35543 (php crash when calling non existing method of a class
   that extends PDO). (Tony)
 - Fixed bug #35539 (typo in error message for ErrorException). (Tony)
+- FIxed bug #35536 (mysql_field_type() doesn't handle NEWDECIMAL). (Tony)
 - Fixed bug #35509 (string constant as array key has different behavior inside
   object). (Dmitry)
 - Fixed bug #35508 (PDO fails when unknown fetch mode specified). (Tony)
index 9c2a70b06ecbd814b6f27baa78cd0fe64b4b4553..84e83758c027b44d968e80593c9456f97b45ad1d 100644 (file)
@@ -2188,6 +2188,9 @@ static char *php_mysql_get_field_name(int field_type)
                case FIELD_TYPE_FLOAT:
                case FIELD_TYPE_DOUBLE:
                case FIELD_TYPE_DECIMAL:
+#ifdef FIELD_TYPE_NEWDECIMAL
+               case FIELD_TYPE_NEWDECIMAL:
+#endif
                        return "real";
                        break;
                case FIELD_TYPE_TIMESTAMP:
@@ -2199,11 +2202,25 @@ static char *php_mysql_get_field_name(int field_type)
                        break;
 #endif
                case FIELD_TYPE_DATE:
+#ifdef FIELD_TYPE_NEWDATE
+               case FIELD_TYPE_NEWDATE:
+#endif
                        return "date";
                        break;
                case FIELD_TYPE_TIME:
                        return "time";
                        break;
+               case FIELD_TYPE_SET:
+                       return "set";
+                       break;
+               case FIELD_TYPE_ENUM:
+                       return "enum";
+                       break;
+#ifdef FIELD_TYPE_GEOMETRY
+               case FIELD_TYPE_GEOMETRY:
+                       return "geometry";
+                       break;
+#endif
                case FIELD_TYPE_DATETIME:
                        return "datetime";
                        break;