Skip to content

Commit 58ed71c

Browse files
committed
MF51:
fix #35536 (mysql_field_type() doesn't handle NEWDECIMAL) add also SET, ENUM, NEWDATE and GEOMETRY to the switch
1 parent 4da3dd5 commit 58ed71c

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ PHP NEWS
44
- Fixed an error in mysqli_fetch_fields (returned NULL instead of an
55
array when row number > field_count). (Georg)
66
- Renamed CachingRecursiveIterator to RecursiveCachingIterator. (Marcus)
7+
- FIxed bug #35536 (mysql_field_type() doesn't handle NEWDECIMAL). (Tony)
78
- Fixed bug #35437 (Segfault or Invalid Opcode 137/1/4). (Dmitry)
89
- Fixed bug #35399 (Since fix of bug #35273 SOAP decoding of
910
soapenc:base64binary fails). (Dmitry)

ext/mysql/php_mysql.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2175,6 +2175,9 @@ static char *php_mysql_get_field_name(int field_type)
21752175
case FIELD_TYPE_FLOAT:
21762176
case FIELD_TYPE_DOUBLE:
21772177
case FIELD_TYPE_DECIMAL:
2178+
#ifdef FIELD_TYPE_NEWDECIMAL
2179+
case FIELD_TYPE_NEWDECIMAL:
2180+
#endif
21782181
return "real";
21792182
break;
21802183
case FIELD_TYPE_TIMESTAMP:
@@ -2186,11 +2189,25 @@ static char *php_mysql_get_field_name(int field_type)
21862189
break;
21872190
#endif
21882191
case FIELD_TYPE_DATE:
2192+
#ifdef FIELD_TYPE_NEWDATE
2193+
case FIELD_TYPE_NEWDATE:
2194+
#endif
21892195
return "date";
21902196
break;
21912197
case FIELD_TYPE_TIME:
21922198
return "time";
21932199
break;
2200+
case FIELD_TYPE_SET:
2201+
return "set";
2202+
break;
2203+
case FIELD_TYPE_ENUM:
2204+
return "enum";
2205+
break;
2206+
#ifdef FIELD_TYPE_GEOMETRY
2207+
case FIELD_TYPE_GEOMETRY:
2208+
return "geometry";
2209+
break;
2210+
#endif
21942211
case FIELD_TYPE_DATETIME:
21952212
return "datetime";
21962213
break;

0 commit comments

Comments
 (0)