[mapserver-commits] r11146 - branches/branch-5-6/mapserver

svn at osgeo.org svn at osgeo.org
Thu Mar 10 18:00:32 EST 2011


Author: tamas
Date: 2011-03-10 15:00:32 -0800 (Thu, 10 Mar 2011)
New Revision: 11146

Modified:
   branches/branch-5-6/mapserver/HISTORY.TXT
   branches/branch-5-6/mapserver/mapmssql2008.c
Log:
Fixed SQL Spatial to be able to use UniqueIdentifier field as unique key (#3722)

Modified: branches/branch-5-6/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-5-6/mapserver/HISTORY.TXT	2011-03-10 22:58:18 UTC (rev 11145)
+++ branches/branch-5-6/mapserver/HISTORY.TXT	2011-03-10 23:00:32 UTC (rev 11146)
@@ -14,6 +14,8 @@
 Version 5.6.7 (SVN branch-5-6):
 ---------------------------
 
+- Fixed SQL Spatial to be able to use UniqueIdentifier field as unique key (#3722)
+
 - Fixed possible seg. fault when using "OGR:Label*" special attributes (#3667)
 
 - Fixed bug with newlines around multipart boundaries in wcs multipart (#3672)

Modified: branches/branch-5-6/mapserver/mapmssql2008.c
===================================================================
--- branches/branch-5-6/mapserver/mapmssql2008.c	2011-03-10 22:58:18 UTC (rev 11145)
+++ branches/branch-5-6/mapserver/mapmssql2008.c	2011-03-10 23:00:32 UTC (rev 11146)
@@ -573,7 +573,7 @@
     {
         char buffer[1000];
 
-        snprintf(buffer, sizeof(buffer), "%s.STAsBinary(),convert(varchar(20), %s)", layerinfo->geom_column, layerinfo->urid_name);
+        snprintf(buffer, sizeof(buffer), "%s.STAsBinary(),convert(varchar(36), %s)", layerinfo->geom_column, layerinfo->urid_name);
 
         columns_wanted = _strdup(buffer);
     } 
@@ -585,7 +585,7 @@
             snprintf(buffer + strlen(buffer), sizeof(buffer) - strlen(buffer), "convert(varchar(max), %s),", layer->items[t]);
         }
 
-        snprintf(buffer + strlen(buffer), sizeof(buffer) - strlen(buffer), "%s.STAsBinary(),convert(varchar(20), %s)", layerinfo->geom_column, layerinfo->urid_name);
+        snprintf(buffer + strlen(buffer), sizeof(buffer) - strlen(buffer), "%s.STAsBinary(),convert(varchar(36), %s)", layerinfo->geom_column, layerinfo->urid_name);
 
         columns_wanted = _strdup(buffer);
     }
@@ -1485,7 +1485,7 @@
 
     if(layer->numitems == 0) 
     {
-        snprintf(buffer, sizeof(buffer), "%s.STAsBinary(), convert(varchar(20), %s)", layerinfo->geom_column, layerinfo->urid_name);
+        snprintf(buffer, sizeof(buffer), "%s.STAsBinary(), convert(varchar(36), %s)", layerinfo->geom_column, layerinfo->urid_name);
         columns_wanted = _strdup(buffer);
     } 
     else 
@@ -1494,7 +1494,7 @@
             snprintf(buffer + strlen(buffer), sizeof(buffer) - strlen(buffer), "convert(varchar(max), %s),", layer->items[t]);
         }
 
-        snprintf(buffer + strlen(buffer), sizeof(buffer) - strlen(buffer), "%s.STAsBinary(), convert(varchar(20), %s)", layerinfo->geom_column, layerinfo->urid_name);
+        snprintf(buffer + strlen(buffer), sizeof(buffer) - strlen(buffer), "%s.STAsBinary(), convert(varchar(36), %s)", layerinfo->geom_column, layerinfo->urid_name);
 
         columns_wanted = _strdup(buffer);
     }



More information about the mapserver-commits mailing list