You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

20 lines
1.0 KiB

X-Git-Url: http://72.52.91.13:8000/?p=php-src.git;a=blobdiff_plain;f=ext%2Fodbc%2Fphp_odbc.c;h=80af492638640595c6e71e2f679bf2b2bd48adfb;hp=ddfbc4edbe5c624258beab9730c8d5782b5bb398;hb=16db4d1462bf3eacb93c0cd940f799160a284b24;hpb=57525d01dc29804903f03e471cf117e077d86ca4
Index: php5-5.4.45/ext/odbc/php_odbc.c
===================================================================
--- php5-5.4.45.orig/ext/odbc/php_odbc.c 2016-05-26 16:02:56.000000000 +0200
+++ php5-5.4.45/ext/odbc/php_odbc.c 2016-05-26 16:02:56.000000000 +0200
@@ -1008,6 +1008,13 @@
NULL, 0, NULL, &displaysize);
}
+ /* Workaround for drivers that report NVARCHAR(MAX) columns as SQL_WVARCHAR with size 0 (bug #69975) */
+ if (result->values[i].coltype == SQL_WVARCHAR && displaysize == 0) {
+ result->values[i].coltype = SQL_WLONGVARCHAR;
+ result->values[i].value = NULL;
+ break;
+ }
+
/* Workaround for Oracle ODBC Driver bug (#50162) when fetching TIMESTAMP column */
if (result->values[i].coltype == SQL_TIMESTAMP) {
displaysize += 3;