mirror of
https://github.com/php/php-src.git
synced 2024-11-28 04:14:26 +08:00
Fixed bug #24752 (Unhandled "uniqueidentifier" field type)
Original Patch By: s.sonnenberg[at]coolspot.de
This commit is contained in:
parent
9826911139
commit
1a1826903b
@ -800,6 +800,15 @@ static void php_mssql_get_column_content_with_type(mssql_link *mssql_ptr,int off
|
||||
Z_DVAL_P(result) = (double) floatcol8(offset);
|
||||
Z_TYPE_P(result) = IS_DOUBLE;
|
||||
break;
|
||||
#ifdef SQLUNIQUE
|
||||
case SQLUNIQUE: {
|
||||
char *data = charcol(offset);
|
||||
|
||||
/* uniqueidentifier is a 16-byte binary number */
|
||||
ZVAL_STRINGL(result, data, 16, 1);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case SQLVARBINARY:
|
||||
case SQLBINARY:
|
||||
case SQLIMAGE: {
|
||||
@ -1468,6 +1477,11 @@ static char *php_mssql_get_field_name(int type)
|
||||
case SQLIMAGE:
|
||||
return "image";
|
||||
break;
|
||||
#ifdef SQLUNIQUE
|
||||
case SQLUNIQUE:
|
||||
return "uniqueidentifier";
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
return "unknown";
|
||||
break;
|
||||
|
@ -59,6 +59,9 @@
|
||||
#define SQLIMAGE SYBIMAGE
|
||||
#define SQLBINARY SYBBINARY
|
||||
#define SQLVARBINARY SYBVARBINARY
|
||||
#ifdef SQLUNIQUE /* FreeTSD 0.61+ */
|
||||
#define SQLUNIQUE SYBUNIQUE
|
||||
#endif
|
||||
#define DBERRHANDLE(a, b) dberrhandle(b)
|
||||
#define DBMSGHANDLE(a, b) dbmsghandle(b)
|
||||
#define DBSETOPT(a, b, c) dbsetopt(a, b, c, -1)
|
||||
|
Loading…
Reference in New Issue
Block a user