7
7
** of 5% are more are commonly seen when SQLite is compiled as a single
8
8
** translation unit.
9
9
**
10
- ** This amalgamation was generated on 2009-04-06 09:20:53 +0200.
10
+ ** This amalgamation was generated on 2009-04-11 15:32:35 +0200.
11
11
12
12
Author: Alessandro (Sandro) Furieri <a.furieri@lqt.it>
13
13
@@ -60,15 +60,13 @@ the terms of any one of the MPL, the GPL or the LGPL.
60
60
#include <locale.h>
61
61
#include <errno.h>
62
62
63
- #include "headers/spatialite/ sqlite3ext.h"
63
+ #include "sqlite3ext.h"
64
64
65
65
#if defined(__MINGW32__) || defined(_WIN32)
66
66
#define LIBICONV_STATIC
67
67
#include <iconv.h>
68
68
#define LIBCHARSET_STATIC
69
- #ifndef _MSC_VER
70
69
#include <localcharset.h>
71
- #endif
72
70
#else /* not WINDOWS */
73
71
#ifdef __APPLE__
74
72
#include <iconv.h>
@@ -1482,7 +1480,6 @@ gaiaCleanSqlString (char *value)
1482
1480
1483
1481
/* #include <spatialite/gaiaaux.h> */
1484
1482
1485
- #ifndef _MSC_VER
1486
1483
GAIAAUX_DECLARE const char *
1487
1484
gaiaGetLocaleCharset ()
1488
1485
{
@@ -1497,7 +1494,6 @@ gaiaGetLocaleCharset ()
1497
1494
#endif
1498
1495
#endif
1499
1496
}
1500
- #endif
1501
1497
1502
1498
GAIAAUX_DECLARE int
1503
1499
gaiaConvertCharset (char **buf, const char *fromCs, const char *toCs)
@@ -14953,7 +14949,7 @@ updateGeometryTriggers (sqlite3 * sqlite, const unsigned char *table,
14953
14949
{
14954
14950
/* building MbrCache SpatialIndex */
14955
14951
sprintf (trigger,
14956
- "CREATE VIRTUAL TABLE \"cache_%s_%s\" USING MbrCache(\"%s\", \"%s\" )\n",
14952
+ "CREATE VIRTUAL TABLE \"cache_%s_%s\" USING MbrCache(%s, %s )\n",
14957
14953
curr_idx->TableName, curr_idx->ColumnName,
14958
14954
curr_idx->TableName, curr_idx->ColumnName);
14959
14955
ret = sqlite3_exec (sqlite, trigger, NULL, NULL, &errMsg);
@@ -26642,7 +26638,7 @@ vfdo_insert_row (VirtualFDOPtr p_vt, sqlite3_int64 * rowid, int argc,
26642
26638
int geom_done;
26643
26639
int err_geom = 0;
26644
26640
int geom_constraint_err = 0;
26645
- char prefix;
26641
+ char prefix[16] ;
26646
26642
const char *text;
26647
26643
const unsigned char *blob;
26648
26644
char *text_wkt;
@@ -26655,20 +26651,20 @@ vfdo_insert_row (VirtualFDOPtr p_vt, sqlite3_int64 * rowid, int argc,
26655
26651
for (ic = 0; ic < p_vt->nColumns; ic++)
26656
26652
{
26657
26653
if (ic == 0)
26658
- prefix = '(' ;
26654
+ strcpy( prefix, "(") ;
26659
26655
else
26660
- prefix = ',' ;
26661
- sprintf (buf, "%c%s ", prefix, *(p_vt->Column + ic));
26656
+ strcpy( prefix, ", ") ;
26657
+ sprintf (buf, "%s\"%s\" ", prefix, *(p_vt->Column + ic));
26662
26658
strcat (sql, buf);
26663
26659
}
26664
26660
strcat (sql, ") VALUES ");
26665
26661
for (ic = 0; ic < p_vt->nColumns; ic++)
26666
26662
{
26667
26663
if (ic == 0)
26668
- prefix = '(' ;
26664
+ strcpy( prefix, "(") ;
26669
26665
else
26670
- prefix = ',' ;
26671
- sprintf (buf, "%c ?", prefix);
26666
+ strcpy( prefix, ", ") ;
26667
+ sprintf (buf, "%s ?", prefix);
26672
26668
strcat (sql, buf);
26673
26669
}
26674
26670
strcat (sql, ")");
@@ -26828,7 +26824,7 @@ vfdo_update_row (VirtualFDOPtr p_vt, sqlite3_int64 rowid, int argc,
26828
26824
int geom_done;
26829
26825
int err_geom = 0;
26830
26826
int geom_constraint_err = 0;
26831
- char prefix;
26827
+ char prefix[16] ;
26832
26828
const char *text;
26833
26829
const unsigned char *blob;
26834
26830
char *text_wkt;
@@ -26841,10 +26837,10 @@ vfdo_update_row (VirtualFDOPtr p_vt, sqlite3_int64 rowid, int argc,
26841
26837
for (ic = 0; ic < p_vt->nColumns; ic++)
26842
26838
{
26843
26839
if (ic == 0)
26844
- prefix = ' ' ;
26840
+ strcpy( prefix, " ") ;
26845
26841
else
26846
- prefix = ',' ;
26847
- sprintf (buf, "\"%c %s\" = ?", prefix, *(p_vt->Column + ic));
26842
+ strcpy( prefix, ", ") ;
26843
+ sprintf (buf, "%s\" %s\" = ?", prefix, *(p_vt->Column + ic));
26848
26844
strcat (sql, buf);
26849
26845
}
26850
26846
#if defined(_WIN32) || defined(__MINGW32__)
@@ -27258,7 +27254,7 @@ vfdo_create (sqlite3 * db, void *pAux, int argc, const char *const *argv,
27258
27254
char **results;
27259
27255
char sql[4096];
27260
27256
char buf[256];
27261
- char prefix;
27257
+ char prefix[16] ;
27262
27258
VirtualFDOPtr p_vt = NULL;
27263
27259
/* checking for table_name */
27264
27260
if (argc == 4)
@@ -27388,10 +27384,10 @@ vfdo_create (sqlite3 * db, void *pAux, int argc, const char *const *argv,
27388
27384
for (i = 0; i < p_vt->nColumns; i++)
27389
27385
{
27390
27386
if (i == 0)
27391
- prefix = '(' ;
27387
+ strcpy( prefix, "(") ;
27392
27388
else
27393
- prefix = ',' ;
27394
- sprintf (buf, "\"%c %s\" %s", prefix, *(p_vt->Column + i),
27389
+ strcpy( prefix, ", ") ;
27390
+ sprintf (buf, "%s\" %s\" %s", prefix, *(p_vt->Column + i),
27395
27391
*(p_vt->Type + i));
27396
27392
if (*(p_vt->NotNull + i))
27397
27393
strcat (buf, " NOT NULL");
0 commit comments