Index: CLIuti.c
===================================================================
RCS file: /opldev/source/CVS-MASTER/virtuoso/libsrc/Wi/CLIuti.c,v
retrieving revision 1.125.2.12
diff -u -r1.125.2.12 CLIuti.c
--- CLIuti.c	25 Nov 2010 17:16:01 -0000	1.125.2.12
+++ CLIuti.c	12 Jan 2012 16:11:15 -0000
@@ -181,7 +181,7 @@
       return SQL_WVARCHAR;
 
     case DV_ANY:
-      return SQL_VARCHAR;
+      return SQL_LONGVARCHAR;
 
     case DV_INT64:
       return SQL_INTEGER;
Index: eqlcomp.c
===================================================================
RCS file: /opldev/source/CVS-MASTER/virtuoso/libsrc/Wi/eqlcomp.c,v
retrieving revision 1.114.2.40
diff -u -r1.114.2.40 eqlcomp.c
--- eqlcomp.c	12 Oct 2011 20:10:19 -0000	1.114.2.40
+++ eqlcomp.c	12 Jan 2012 16:11:16 -0000
@@ -2511,7 +2511,7 @@
 	      desc->cd_scale = box_num (6);
 	    }
 	  if (desc->cd_dtp == DV_ANY)
-  	      prec = ROW_MAX_COL_BYTES;
+	    prec = 0x7fffffff;
 	  if (IS_BLOB_DTP (desc->cd_dtp))
 	    prec = 0x7fffffff;
 	  desc->cd_precision = box_num (prec);

Add a patch to apply to virtuoso.
Add a patch to apply to virtuoso.

This patch fix a bug that as been created between PHP version 5.2 and 5.3 which was causing long-read-len issues with value longer than 4072 characters.
