[Git][debian-gis-team/spatialite][experimental] 4 commits: New upstream version 5.0.0
Bas Couwenberg
gitlab at salsa.debian.org
Sun Aug 23 18:37:20 BST 2020
Bas Couwenberg pushed to branch experimental at Debian GIS Project / spatialite
Commits:
a7590a69 by Bas Couwenberg at 2020-08-23T19:17:07+02:00
New upstream version 5.0.0
- - - - -
25bcd679 by Bas Couwenberg at 2020-08-23T19:17:47+02:00
Update upstream source from tag 'upstream/5.0.0'
Update to upstream version '5.0.0'
with Debian dir 20d4a3ad7d37e242219d7ed31465287456221e42
- - - - -
3f0f2b19 by Bas Couwenberg at 2020-08-23T19:18:42+02:00
New upstream release.
- - - - -
4457268d by Bas Couwenberg at 2020-08-23T19:20:18+02:00
Set distribution to experimental.
- - - - -
12 changed files:
- config-msvc.h
- configure
- configure.ac
- debian/changelog
- makefile.vc
- makefile64.vc
- makefile_mod.vc
- makefile_mod64.vc
- spatialite-sql-latest.html
- src/shapefiles/shapefiles.c
- src/spatialite/metatables.c
- src/spatialite/spatialite.c
Changes:
=====================================
config-msvc.h
=====================================
@@ -14,6 +14,9 @@
/* Should be defined in order to enable LIBXML2 support. */
#define ENABLE_LIBXML2 1
+/* Should be defined in order to enable MiniZIP support. */
+/* #undef ENABLE_MINIZIP */
+
/* Should be defined in order to enable RTTOPO support. */
#define ENABLE_RTTOPO 1
@@ -155,7 +158,7 @@
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
+/* #undef HAVE_UNISTD_H */
/* Define to 1 if you have the <zlib.h> header file. */
#define HAVE_ZLIB_H 1
@@ -205,7 +208,7 @@
#define PACKAGE_NAME "libspatialite"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "libspatialite 5.0.0-beta1"
+#define PACKAGE_STRING "libspatialite 5.0.0"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "libspatialite"
@@ -214,7 +217,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "5.0.0-beta1"
+#define PACKAGE_VERSION "5.0.0"
/* Should be defined in order to enable PROJ.6 support. */
#define PROJ_NEW 1
@@ -232,7 +235,7 @@
/* #undef TM_IN_SYS_TIME */
/* Version number of package */
-#define VERSION "5.0.0-beta1"
+#define VERSION "5.0.0"
/* Must be =64 in order to enable huge-file support. */
#define _FILE_OFFSET_BITS 64
=====================================
configure
=====================================
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libspatialite 5.0.0-RC1.
+# Generated by GNU Autoconf 2.69 for libspatialite 5.0.0.
#
# Report bugs to <a.furieri at lqt.it>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libspatialite'
PACKAGE_TARNAME='libspatialite'
-PACKAGE_VERSION='5.0.0-RC1'
-PACKAGE_STRING='libspatialite 5.0.0-RC1'
+PACKAGE_VERSION='5.0.0'
+PACKAGE_STRING='libspatialite 5.0.0'
PACKAGE_BUGREPORT='a.furieri at lqt.it'
PACKAGE_URL=''
@@ -1371,7 +1371,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures libspatialite 5.0.0-RC1 to adapt to many kinds of systems.
+\`configure' configures libspatialite 5.0.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1441,7 +1441,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libspatialite 5.0.0-RC1:";;
+ short | recursive ) echo "Configuration of libspatialite 5.0.0:";;
esac
cat <<\_ACEOF
@@ -1585,7 +1585,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libspatialite configure 5.0.0-RC1
+libspatialite configure 5.0.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2175,7 +2175,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libspatialite $as_me 5.0.0-RC1, which was
+It was created by libspatialite $as_me 5.0.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3046,7 +3046,7 @@ fi
# Define the identity of the package.
PACKAGE='libspatialite'
- VERSION='5.0.0-RC1'
+ VERSION='5.0.0'
cat >>confdefs.h <<_ACEOF
@@ -19591,7 +19591,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libspatialite $as_me 5.0.0-RC1, which was
+This file was extended by libspatialite $as_me 5.0.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -19657,7 +19657,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-libspatialite config.status 5.0.0-RC1
+libspatialite config.status 5.0.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
=====================================
configure.ac
=====================================
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
-AC_INIT(libspatialite, 5.0.0-RC1, a.furieri at lqt.it)
+AC_INIT(libspatialite, 5.0.0, a.furieri at lqt.it)
AC_LANG(C)
AC_CONFIG_MACRO_DIR([m4])
=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+spatialite (5.0.0-1~exp1) experimental; urgency=medium
+
+ * New upstream release.
+
+ -- Bas Couwenberg <sebastic at debian.org> Sun, 23 Aug 2020 19:19:53 +0200
+
spatialite (5.0.0~rc1-1~exp1) experimental; urgency=medium
* New upstream release candidate.
=====================================
makefile.vc
=====================================
@@ -62,6 +62,7 @@ LIBOBJ = src\gaiaaux\gg_sqlaux.obj src\gaiaaux\gg_utf8.obj \
src\srsinit\epsg_inlined_52.obj src\srsinit\epsg_inlined_53.obj \
src\srsinit\epsg_inlined_54.obj src\srsinit\epsg_inlined_55.obj \
src\srsinit\epsg_inlined_56.obj src\srsinit\epsg_inlined_57.obj \
+ src\srsinit\epsg_inlined_58.obj src\srsinit\epsg_inlined_59.obj \
src\srsinit\epsg_inlined_extra.obj src\srsinit\epsg_inlined_prussian.obj \
src\srsinit\epsg_inlined_wgs84_00.obj src\srsinit\epsg_inlined_wgs84_01.obj \
src\versioninfo\version.obj src\virtualtext\virtualtext.obj \
@@ -106,7 +107,7 @@ spatialite.lib: $(LIBOBJ)
$(SPATIALITE_DLL): spatialite_i.lib
spatialite_i.lib: $(LIBOBJ)
- link /debug /dll /out:$(SPATIALITE_DLL) \
+ link /dll /out:$(SPATIALITE_DLL) \
/implib:spatialite_i.lib $(LIBOBJ) \
C:\OSGeo4W\lib\proj_i.lib C:\OSGeo4W\lib\geos_c.lib \
C:\OSGeo4w\lib\freexl_i.lib C:\OSGeo4w\lib\iconv.lib \
=====================================
makefile64.vc
=====================================
@@ -62,6 +62,7 @@ LIBOBJ = src\gaiaaux\gg_sqlaux.obj src\gaiaaux\gg_utf8.obj \
src\srsinit\epsg_inlined_52.obj src\srsinit\epsg_inlined_53.obj \
src\srsinit\epsg_inlined_54.obj src\srsinit\epsg_inlined_55.obj \
src\srsinit\epsg_inlined_56.obj src\srsinit\epsg_inlined_57.obj \
+ src\srsinit\epsg_inlined_58.obj src\srsinit\epsg_inlined_59.obj \
src\srsinit\epsg_inlined_extra.obj src\srsinit\epsg_inlined_prussian.obj \
src\srsinit\epsg_inlined_wgs84_00.obj src\srsinit\epsg_inlined_wgs84_01.obj \
src\versioninfo\version.obj src\virtualtext\virtualtext.obj \
@@ -106,7 +107,7 @@ spatialite.lib: $(LIBOBJ)
$(SPATIALITE_DLL): spatialite_i.lib
spatialite_i.lib: $(LIBOBJ)
- link /debug /dll /out:$(SPATIALITE_DLL) \
+ link /dll /out:$(SPATIALITE_DLL) \
/implib:spatialite_i.lib $(LIBOBJ) \
C:\OSGeo4W64\lib\proj_i.lib C:\OSGeo4W64\lib\geos_c.lib \
C:\OSGeo4w64\lib\freexl_i.lib C:\OSGeo4w64\lib\iconv.lib \
=====================================
makefile_mod.vc
=====================================
@@ -62,6 +62,7 @@ LIBOBJ = src\gaiaaux\gg_sqlaux.obj src\gaiaaux\gg_utf8.obj \
src\srsinit\epsg_inlined_52.obj src\srsinit\epsg_inlined_53.obj \
src\srsinit\epsg_inlined_54.obj src\srsinit\epsg_inlined_55.obj \
src\srsinit\epsg_inlined_56.obj src\srsinit\epsg_inlined_57.obj \
+ src\srsinit\epsg_inlined_58.obj src\srsinit\epsg_inlined_59.obj \
src\srsinit\epsg_inlined_extra.obj src\srsinit\epsg_inlined_prussian.obj \
src\srsinit\epsg_inlined_wgs84_00.obj src\srsinit\epsg_inlined_wgs84_01.obj \
src\versioninfo\version.obj src\virtualtext\virtualtext.obj \
@@ -106,7 +107,7 @@ mod_spatialite.lib: $(LIBOBJ)
$(MOD_SPATIALITE_DLL): mod_spatialite_i.lib
mod_spatialite_i.lib: $(LIBOBJ)
- link /debug /dll /out:$(MOD_SPATIALITE_DLL) \
+ link /dll /out:$(MOD_SPATIALITE_DLL) \
/implib:mod_spatialite_i.lib $(LIBOBJ) \
C:\OSGeo4W\lib\proj_i.lib C:\OSGeo4W\lib\geos_c.lib \
C:\OSGeo4w\lib\freexl_i.lib C:\OSGeo4w\lib\iconv.lib \
=====================================
makefile_mod64.vc
=====================================
@@ -62,6 +62,7 @@ LIBOBJ = src\gaiaaux\gg_sqlaux.obj src\gaiaaux\gg_utf8.obj \
src\srsinit\epsg_inlined_52.obj src\srsinit\epsg_inlined_53.obj \
src\srsinit\epsg_inlined_54.obj src\srsinit\epsg_inlined_55.obj \
src\srsinit\epsg_inlined_56.obj src\srsinit\epsg_inlined_57.obj \
+ src\srsinit\epsg_inlined_58.obj src\srsinit\epsg_inlined_59.obj \
src\srsinit\epsg_inlined_extra.obj src\srsinit\epsg_inlined_prussian.obj \
src\srsinit\epsg_inlined_wgs84_00.obj src\srsinit\epsg_inlined_wgs84_01.obj \
src\versioninfo\version.obj src\virtualtext\virtualtext.obj \
@@ -106,7 +107,7 @@ mod_spatialite.lib: $(LIBOBJ)
$(MOD_SPATIALITE_DLL): mod_spatialite_i.lib
mod_spatialite_i.lib: $(LIBOBJ)
- link /debug /dll /out:$(MOD_SPATIALITE_DLL) \
+ link /dll /out:$(MOD_SPATIALITE_DLL) \
/implib:mod_spatialite_i.lib $(LIBOBJ) \
C:\OSGeo4W64\lib\proj_i.lib C:\OSGeo4W64\lib\geos_c.lib \
C:\OSGeo4w64\lib\freexl_i.lib C:\OSGeo4w64\lib\iconv.lib \
=====================================
spatialite-sql-latest.html
=====================================
@@ -10,7 +10,7 @@
i {color:navy;}
</style>
</head><body bgcolor="#fffff0">
- <h2>SpatiaLite 5.0.0-beta1 SQL functions reference list</h2>
+ <h2>SpatiaLite 5.0.0 SQL functions reference list</h2>
<a href="https://www.gaia-gis.it/fossil/libspatialite">back</a>
<ul>
<li><a href="#version">SQL Version Info [and build options testing] functions</a></li>
@@ -2439,11 +2439,11 @@ This function only supports Long/Lat coordinates, and will return NULL for any p
<td></td>
<td align="center" bgcolor="#f0d0d0">GEOS</td>
<td>return the Hausdorff distance between geom1 and geom2<br>
- <a href="http://en.wikipedia.org/wiki/Frechet_distance">learn more</a><hr>
+ <a href="http://en.wikipedia.org/wiki/Hausdorff_distance">learn more</a><hr>
the optional argument <b>densify_fract</b> is the fraction (in the range <b>0.0 / 1.0</b>) by which to densify
each segment. Each segment will be split into a number of equal-lenght subsegments, whose fraction of the total
length is closest to the given fraction.<br>
- The smaller <b>densify_fract</b> we specify, the more acurate Fréchet distance we get.
+ The smaller <b>densify_fract</b> we specify, the more acurate Hausdorff distance we get.
But, the computation time and the memory usage increase with the square of the number of subsegments.<hr>
The second form of this SQL function (supporting <b>densify_fract</b>) is only available when using <b>GEOS 3.7.0</b> (or any subsequent version).</td></tr>
<tr><td><b>FrechetDistance</b></td>
=====================================
src/shapefiles/shapefiles.c
=====================================
@@ -79,7 +79,9 @@ the terms of any one of the MPL, the GPL or the LGPL.
#endif
#endif
+#ifdef ENABLE_MINIZIP /* MINIZIP is enabled */
#include <minizip/unzip.h>
+#endif
#if defined(_WIN32) && !defined(__MINGW32__)
#define strcasecmp _stricmp
=====================================
src/spatialite/metatables.c
=====================================
@@ -205,7 +205,7 @@ updateSpatiaLiteHistory (void *p_sqlite, const char *table,
ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
if (ret != SQLITE_OK)
{
- spatialite_e ("SQL error: %s\n%s\n", sql, sqlite3_errmsg (sqlite));
+ spatialite_e ("SQL error: %s: %s\n", sql, sqlite3_errmsg (sqlite));
goto stop;
}
sqlite3_reset (stmt);
@@ -3115,6 +3115,306 @@ createTemporarySpatialRefSys (void *p_sqlite, const char *db_prefix)
return 0;
}
+static int
+createTemporaryViewsGeometryColumns (sqlite3 * sqlite, const char *db_prefix)
+{
+/* creating the VIEWS_GEOMETRY_COLUMNS table */
+ char *sql;
+ char *errMsg = NULL;
+ int ret;
+ char *prefix;
+
+/* creating the VIEWS_GEOMETRY_COLUMNS table */
+ prefix = gaiaDoubleQuotedSql (db_prefix);
+ sql =
+ sqlite3_mprintf
+ ("CREATE TABLE IF NOT EXISTS \"%s\".views_geometry_columns (\n"
+ "view_name TEXT NOT NULL,\n" "view_geometry TEXT NOT NULL,\n"
+ "view_rowid TEXT NOT NULL,\n" "f_table_name TEXT NOT NULL,\n"
+ "f_geometry_column TEXT NOT NULL,\n" "read_only INTEGER NOT NULL,\n"
+ "CONSTRAINT pk_geom_cols_views PRIMARY KEY "
+ "(view_name, view_geometry),\n"
+ "CONSTRAINT fk_views_geom_cols FOREIGN KEY "
+ "(f_table_name, f_geometry_column) " "REFERENCES geometry_columns "
+ "(f_table_name, f_geometry_column) " "ON DELETE CASCADE,\n"
+ "CONSTRAINT ck_vw_rdonly CHECK (read_only IN (0,1)))", prefix);
+ free (prefix);
+ ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
+ sqlite3_free (sql);
+ if (ret != SQLITE_OK)
+ {
+ spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
+ sqlite3_free (errMsg);
+ return 0;
+ }
+/* creating an INDEX supporting the GEOMETRY_COLUMNS FK */
+ prefix = gaiaDoubleQuotedSql (db_prefix);
+ sql = sqlite3_mprintf ("CREATE INDEX IF NOT EXISTS \"%s\".idx_viewsjoin "
+ "ON views_geometry_columns\n"
+ "(f_table_name, f_geometry_column)", prefix);
+ free (prefix);
+ ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
+ if (ret != SQLITE_OK)
+ {
+ spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
+ sqlite3_free (errMsg);
+ sqlite3_free (sql);
+ return 0;
+ }
+ sqlite3_free (sql);
+/* creating the VIEWS_GEOMETRY_COLUMNS triggers */
+ prefix = gaiaDoubleQuotedSql (db_prefix);
+ sql =
+ sqlite3_mprintf
+ ("CREATE TRIGGER IF NOT EXISTS \"%s\".vwgc_view_name_insert\n"
+ "BEFORE INSERT ON 'views_geometry_columns'\n" "FOR EACH ROW BEGIN\n"
+ "SELECT RAISE(ABORT,'insert on views_geometry_columns violates constraint: "
+ "view_name value must not contain a single quote')\n"
+ "WHERE NEW.view_name LIKE ('%%''%%');\n"
+ "SELECT RAISE(ABORT,'insert on views_geometry_columns violates constraint: "
+ "view_name value must not contain a double quote')\n"
+ "WHERE NEW.view_name LIKE ('%%\"%%');\n"
+ "SELECT RAISE(ABORT,'insert on views_geometry_columns violates constraint: \n"
+ "view_name value must be lower case')\n"
+ "WHERE NEW.view_name <> lower(NEW.view_name);\n" "END", prefix);
+ free (prefix);
+ ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
+ if (ret != SQLITE_OK)
+ {
+ spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
+ sqlite3_free (errMsg);
+ sqlite3_free (sql);
+ return 0;
+ }
+ sqlite3_free (sql);
+ prefix = gaiaDoubleQuotedSql (db_prefix);
+ sql =
+ sqlite3_mprintf
+ ("CREATE TRIGGER IF NOT EXISTS \"%s\".vwgc_view_name_update\n"
+ "BEFORE UPDATE OF 'view_name' ON 'views_geometry_columns'\n"
+ "FOR EACH ROW BEGIN\n"
+ "SELECT RAISE(ABORT,'update on views_geometry_columns violates constraint: "
+ "view_name value must not contain a single quote')\n"
+ "WHERE NEW.view_name LIKE ('%%''%%');\n"
+ "SELECT RAISE(ABORT,'update on views_geometry_columns violates constraint: "
+ "view_name value must not contain a double quote')\n"
+ "WHERE NEW.view_name LIKE ('%%\"%%');\n"
+ "SELECT RAISE(ABORT,'update on views_geometry_columns violates constraint: "
+ "view_name value must be lower case')\n"
+ "WHERE NEW.view_name <> lower(NEW.view_name);\n" "END", prefix);
+ free (prefix);
+ ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
+ if (ret != SQLITE_OK)
+ {
+ spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
+ sqlite3_free (errMsg);
+ sqlite3_free (sql);
+ return 0;
+ }
+ sqlite3_free (sql);
+ prefix = gaiaDoubleQuotedSql (db_prefix);
+ sql =
+ sqlite3_mprintf
+ ("CREATE TRIGGER IF NOT EXISTS \"%s\".vwgc_view_geometry_insert\n"
+ "BEFORE INSERT ON 'views_geometry_columns'\n" "FOR EACH ROW BEGIN\n"
+ "SELECT RAISE(ABORT,'insert on views_geometry_columns violates constraint: "
+ "view_geometry value must not contain a single quote')\n"
+ "WHERE NEW.view_geometry LIKE ('%%''%%');\n"
+ "SELECT RAISE(ABORT,'insert on views_geometry_columns violates constraint: \n"
+ "view_geometry value must not contain a double quote')\n"
+ "WHERE NEW.view_geometry LIKE ('%%\"%%');\n"
+ "SELECT RAISE(ABORT,'insert on views_geometry_columns violates constraint: "
+ "view_geometry value must be lower case')\n"
+ "WHERE NEW.view_geometry <> lower(NEW.view_geometry);\n" "END",
+ prefix);
+ free (prefix);
+ ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
+ if (ret != SQLITE_OK)
+ {
+ spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
+ sqlite3_free (errMsg);
+ sqlite3_free (sql);
+ return 0;
+ }
+ sqlite3_free (sql);
+ prefix = gaiaDoubleQuotedSql (db_prefix);
+ sql =
+ sqlite3_mprintf
+ ("CREATE TRIGGER IF NOT EXISTS \"%s\".vwgc_view_geometry_update\n"
+ "BEFORE UPDATE OF 'view_geometry' ON 'views_geometry_columns'\n"
+ "FOR EACH ROW BEGIN\n"
+ "SELECT RAISE(ABORT,'update on views_geometry_columns violates constraint: "
+ "view_geometry value must not contain a single quote')\n"
+ "WHERE NEW.view_geometry LIKE ('%%''%%');\n"
+ "SELECT RAISE(ABORT,'update on views_geometry_columns violates constraint: \n"
+ "view_geometry value must not contain a double quote')\n"
+ "WHERE NEW.view_geometry LIKE ('%%\"%%');\n"
+ "SELECT RAISE(ABORT,'update on views_geometry_columns violates constraint: "
+ "view_geometry value must be lower case')\n"
+ "WHERE NEW.view_geometry <> lower(NEW.view_geometry);\n" "END",
+ prefix);
+ free (prefix);
+ ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
+ if (ret != SQLITE_OK)
+ {
+ spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
+ sqlite3_free (errMsg);
+ sqlite3_free (sql);
+ return 0;
+ }
+ sqlite3_free (sql);
+ prefix = gaiaDoubleQuotedSql (db_prefix);
+ sql =
+ sqlite3_mprintf
+ ("CREATE TRIGGER IF NOT EXISTS \"%s\".vwgc_view_rowid_update\n"
+ "BEFORE UPDATE OF 'view_rowid' ON 'views_geometry_columns'\n"
+ "FOR EACH ROW BEGIN\n"
+ "SELECT RAISE(ABORT,'update on views_geometry_columns violates constraint: "
+ "view_rowid value must not contain a single quote')\n"
+ "WHERE NEW.f_geometry_column LIKE ('%%''%%');\n"
+ "SELECT RAISE(ABORT,'update on views_geometry_columns violates constraint: "
+ "view_rowid value must not contain a double quote')\n"
+ "WHERE NEW.view_rowid LIKE ('%%\"%%');\n"
+ "SELECT RAISE(ABORT,'update on views_geometry_columns violates constraint: "
+ "view_rowid value must be lower case')\n"
+ "WHERE NEW.view_rowid <> lower(NEW.view_rowid);\n" "END", prefix);
+ free (prefix);
+ ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
+ if (ret != SQLITE_OK)
+ {
+ spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
+ sqlite3_free (errMsg);
+ sqlite3_free (sql);
+ return 0;
+ }
+ sqlite3_free (sql);
+ prefix = gaiaDoubleQuotedSql (db_prefix);
+ sql =
+ sqlite3_mprintf
+ ("CREATE TRIGGER IF NOT EXISTS \"%s\".vwgc_view_rowid_insert\n"
+ "BEFORE INSERT ON 'views_geometry_columns'\n" "FOR EACH ROW BEGIN\n"
+ "SELECT RAISE(ABORT,'insert on views_geometry_columns violates constraint: "
+ "view_rowid value must not contain a single quote')\n"
+ "WHERE NEW.view_rowid LIKE ('%%''%%');\n"
+ "SELECT RAISE(ABORT,'insert on views_geometry_columns violates constraint: \n"
+ "view_rowid value must not contain a double quote')\n"
+ "WHERE NEW.view_rowid LIKE ('%%\"%%');\n"
+ "SELECT RAISE(ABORT,'insert on views_geometry_columns violates constraint: "
+ "view_rowid value must be lower case')\n"
+ "WHERE NEW.view_rowid <> lower(NEW.view_rowid);\n" "END", prefix);
+ free (prefix);
+ ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
+ if (ret != SQLITE_OK)
+ {
+ spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
+ sqlite3_free (errMsg);
+ sqlite3_free (sql);
+ return 0;
+ }
+ sqlite3_free (sql);
+ prefix = gaiaDoubleQuotedSql (db_prefix);
+ sql =
+ sqlite3_mprintf
+ ("CREATE TRIGGER IF NOT EXISTS \"%s\".vwgc_f_table_name_insert\n"
+ "BEFORE INSERT ON 'views_geometry_columns'\n" "FOR EACH ROW BEGIN\n"
+ "SELECT RAISE(ABORT,'insert on views_geometry_columns violates constraint: "
+ "f_table_name value must not contain a single quote')\n"
+ "WHERE NEW.f_table_name LIKE ('%%''%%');\n"
+ "SELECT RAISE(ABORT,'insert on views_geometry_columns violates constraint: "
+ "f_table_name value must not contain a double quote')\n"
+ "WHERE NEW.f_table_name LIKE ('%%\"%%');\n"
+ "SELECT RAISE(ABORT,'insert on views_geometry_columns violates constraint: \n"
+ "f_table_name value must be lower case')\n"
+ "WHERE NEW.f_table_name <> lower(NEW.f_table_name);\n" "END", prefix);
+ free (prefix);
+ ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
+ if (ret != SQLITE_OK)
+ {
+ spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
+ sqlite3_free (errMsg);
+ sqlite3_free (sql);
+ return 0;
+ }
+ sqlite3_free (sql);
+ prefix = gaiaDoubleQuotedSql (db_prefix);
+ sql =
+ sqlite3_mprintf
+ ("CREATE TRIGGER IF NOT EXISTS \"%s\".vwgc_f_table_name_update\n"
+ "BEFORE UPDATE OF 'f_table_name' ON 'views_geometry_columns'\n"
+ "FOR EACH ROW BEGIN\n"
+ "SELECT RAISE(ABORT,'update on views_geometry_columns violates constraint: "
+ "f_table_name value must not contain a single quote')\n"
+ "WHERE NEW.f_table_name LIKE ('%%''%%');\n"
+ "SELECT RAISE(ABORT,'update on views_geometry_columns violates constraint: "
+ "f_table_name value must not contain a double quote')\n"
+ "WHERE NEW.f_table_name LIKE ('%%\"%%');\n"
+ "SELECT RAISE(ABORT,'update on views_geometry_columns violates constraint: "
+ "f_table_name value must be lower case')\n"
+ "WHERE NEW.f_table_name <> lower(NEW.f_table_name);\n" "END", prefix);
+ free (prefix);
+ ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
+ if (ret != SQLITE_OK)
+ {
+ spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
+ sqlite3_free (errMsg);
+ sqlite3_free (sql);
+ return 0;
+ }
+ sqlite3_free (sql);
+ prefix = gaiaDoubleQuotedSql (db_prefix);
+ sql =
+ sqlite3_mprintf
+ ("CREATE TRIGGER IF NOT EXISTS \"%s\".vwgc_f_geometry_column_insert\n"
+ "BEFORE INSERT ON 'views_geometry_columns'\n" "FOR EACH ROW BEGIN\n"
+ "SELECT RAISE(ABORT,'insert on views_geometry_columns violates constraint: "
+ "f_geometry_column value must not contain a single quote')\n"
+ "WHERE NEW.f_geometry_column LIKE ('%%''%%');\n"
+ "SELECT RAISE(ABORT,'insert on views_geometry_columns violates constraint: \n"
+ "f_geometry_column value must not contain a double quote')\n"
+ "WHERE NEW.f_geometry_column LIKE ('%%\"%%');\n"
+ "SELECT RAISE(ABORT,'insert on views_geometry_columns violates constraint: "
+ "f_geometry_column value must be lower case')\n"
+ "WHERE NEW.f_geometry_column <> lower(NEW.f_geometry_column);\n" "END",
+ prefix);
+ free (prefix);
+ ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
+ if (ret != SQLITE_OK)
+ {
+ spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
+ sqlite3_free (errMsg);
+ sqlite3_free (sql);
+ return 0;
+ }
+ sqlite3_free (sql);
+ prefix = gaiaDoubleQuotedSql (db_prefix);
+ sql =
+ sqlite3_mprintf
+ ("CREATE TRIGGER IF NOT EXISTS \"%s\".vwgc_f_geometry_column_update\n"
+ "BEFORE UPDATE OF 'f_geometry_column' ON 'views_geometry_columns'\n"
+ "FOR EACH ROW BEGIN\n"
+ "SELECT RAISE(ABORT,'update on views_geometry_columns violates constraint: "
+ "f_geometry_column value must not contain a single quote')\n"
+ "WHERE NEW.f_geometry_column LIKE ('%%''%%');\n"
+ "SELECT RAISE(ABORT,'update on views_geometry_columns violates constraint: "
+ "f_geometry_column value must not contain a double quote')\n"
+ "WHERE NEW.f_geometry_column LIKE ('%%\"%%');\n"
+ "SELECT RAISE(ABORT,'update on views_geometry_columns violates constraint: "
+ "f_geometry_column value must be lower case')\n"
+ "WHERE NEW.f_geometry_column <> lower(NEW.f_geometry_column);\n" "END",
+ prefix);
+ free (prefix);
+ ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
+ if (ret != SQLITE_OK)
+ {
+ spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
+ sqlite3_free (errMsg);
+ sqlite3_free (sql);
+ return 0;
+ }
+ sqlite3_free (sql);
+ return 1;
+}
+
SPATIALITE_PRIVATE int
createTemporaryGeometryColumns (void *p_sqlite, const char *db_prefix)
{
@@ -3140,26 +3440,28 @@ createTemporaryGeometryColumns (void *p_sqlite, const char *db_prefix)
prefix);
free (prefix);
ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
- sqlite3_free (sql);
if (ret != SQLITE_OK)
{
spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
sqlite3_free (errMsg);
+ sqlite3_free (sql);
return 0;
}
+ sqlite3_free (sql);
/* creating an INDEX corresponding to the SRID FK */
prefix = gaiaDoubleQuotedSql (db_prefix);
sql = sqlite3_mprintf ("CREATE INDEX IF NOT EXISTS \"%s\".idx_srid_geocols "
"ON geometry_columns (srid)", prefix);
free (prefix);
ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
- sqlite3_free (sql);
if (ret != SQLITE_OK)
{
spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
+ sqlite3_free (sql);
sqlite3_free (errMsg);
return 0;
}
+ sqlite3_free (sql);
/* creating the GEOMETRY_COLUMNS triggers */
prefix = gaiaDoubleQuotedSql (db_prefix);
sql =
@@ -3177,13 +3479,14 @@ createTemporaryGeometryColumns (void *p_sqlite, const char *db_prefix)
"WHERE NEW.f_table_name <> lower(NEW.f_table_name);\n" "END", prefix);
free (prefix);
ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
- sqlite3_free (sql);
if (ret != SQLITE_OK)
{
spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
sqlite3_free (errMsg);
+ sqlite3_free (sql);
return 0;
}
+ sqlite3_free (sql);
prefix = gaiaDoubleQuotedSql (db_prefix);
sql =
sqlite3_mprintf
@@ -3201,13 +3504,14 @@ createTemporaryGeometryColumns (void *p_sqlite, const char *db_prefix)
"WHERE NEW.f_table_name <> lower(NEW.f_table_name);\n" "END", prefix);
free (prefix);
ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
- sqlite3_free (sql);
if (ret != SQLITE_OK)
{
spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
sqlite3_free (errMsg);
+ sqlite3_free (sql);
return 0;
}
+ sqlite3_free (sql);
prefix = gaiaDoubleQuotedSql (db_prefix);
sql =
sqlite3_mprintf
@@ -3225,13 +3529,14 @@ createTemporaryGeometryColumns (void *p_sqlite, const char *db_prefix)
prefix);
free (prefix);
ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
- sqlite3_free (sql);
if (ret != SQLITE_OK)
{
spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
sqlite3_free (errMsg);
+ sqlite3_free (sql);
return 0;
}
+ sqlite3_free (sql);
prefix = gaiaDoubleQuotedSql (db_prefix);
sql =
sqlite3_mprintf
@@ -3250,13 +3555,14 @@ createTemporaryGeometryColumns (void *p_sqlite, const char *db_prefix)
prefix);
free (prefix);
ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
- sqlite3_free (sql);
if (ret != SQLITE_OK)
{
spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
sqlite3_free (errMsg);
+ sqlite3_free (sql);
return 0;
}
+ sqlite3_free (sql);
prefix = gaiaDoubleQuotedSql (db_prefix);
sql =
sqlite3_mprintf
@@ -3272,13 +3578,14 @@ createTemporaryGeometryColumns (void *p_sqlite, const char *db_prefix)
"3000,3001,3002,3003,3004,3005,3006,3007));\n" "END", prefix);
free (prefix);
ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
- sqlite3_free (sql);
if (ret != SQLITE_OK)
{
spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
sqlite3_free (errMsg);
+ sqlite3_free (sql);
return 0;
}
+ sqlite3_free (sql);
prefix = gaiaDoubleQuotedSql (db_prefix);
sql =
sqlite3_mprintf
@@ -3295,13 +3602,14 @@ createTemporaryGeometryColumns (void *p_sqlite, const char *db_prefix)
"3000,3001,3002,3003,3004,3005,3006,3007));\n" "END", prefix);
free (prefix);
ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
- sqlite3_free (sql);
if (ret != SQLITE_OK)
{
spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
sqlite3_free (errMsg);
+ sqlite3_free (sql);
return 0;
}
+ sqlite3_free (sql);
prefix = gaiaDoubleQuotedSql (db_prefix);
sql =
sqlite3_mprintf
@@ -3311,13 +3619,14 @@ createTemporaryGeometryColumns (void *p_sqlite, const char *db_prefix)
"WHERE NOT(NEW.coord_dimension IN (2,3,4));\n" "END", prefix);
free (prefix);
ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
- sqlite3_free (sql);
if (ret != SQLITE_OK)
{
spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
sqlite3_free (errMsg);
+ sqlite3_free (sql);
return 0;
}
+ sqlite3_free (sql);
prefix = gaiaDoubleQuotedSql (db_prefix);
sql =
sqlite3_mprintf
@@ -3328,13 +3637,18 @@ createTemporaryGeometryColumns (void *p_sqlite, const char *db_prefix)
"WHERE NOT(NEW.coord_dimension IN (2,3,4));\n" "END", prefix);
free (prefix);
ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
- sqlite3_free (sql);
if (ret != SQLITE_OK)
{
spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
sqlite3_free (errMsg);
+ sqlite3_free (sql);
return 0;
}
+ sqlite3_free (sql);
+
+/* attempting to create views_geometry_columns on the same TMP-DB */
+ if (!createTemporaryViewsGeometryColumns (sqlite, db_prefix))
+ return 0;
return 1;
}
=====================================
src/spatialite/spatialite.c
=====================================
@@ -53248,7 +53248,7 @@ init_spatialite_virtualtables (void *p_db, const void *p_cache)
#endif /* end GEOS conditional */
#ifdef ENABLE_GEOPACKAGE /* only if GeoPackage support is enabled */
-/* initializing the VirtualFDO extension */
+/* initializing the VirtualGPKG extension */
virtualgpkg_extension_init (db);
#endif /* end GEOPACKAGE conditional */
@@ -53310,42 +53310,47 @@ spatialite_splash_screen (int verbose)
spatialite_i
("\t- 'VirtualShape'\t[direct Shapefile access]\n");
spatialite_i ("\t- 'VirtualDbf'\t\t[direct DBF access]\n");
+ spatialite_i ("\t- 'VirtualText'\t\t[direct CSV/TXT access]\n");
+ spatialite_i ("\t- 'VirtualGeoJSON'\t\t[direct GeoJSON access]\n");
#ifndef OMIT_FREEXL
spatialite_i ("\t- 'VirtualXL'\t\t[direct XLS access]\n");
#endif /* end FreeXL conditional */
- spatialite_i ("\t- 'VirtualText'\t\t[direct CSV/TXT access]\n");
#endif /* end ICONV conditional */
spatialite_i
- ("\t- 'VirtualNetwork'\t[Dijkstra shortest path]\n");
+ ("\t- 'VirtualNetwork'\t[Dijkstra shortest path - obsolete]\n");
spatialite_i ("\t- 'RTree'\t\t[Spatial Index - R*Tree]\n");
spatialite_i
("\t- 'MbrCache'\t\t[Spatial Index - MBR cache]\n");
+ spatialite_i
+ ("\t- 'VirtualFDO'\t\t[FDO-OGR interoperability]\n");
+ spatialite_i ("\t- 'VirtualBBox'\t\t[BoundingBox tables]\n");
spatialite_i
("\t- 'VirtualSpatialIndex'\t[R*Tree metahandler]\n");
spatialite_i
("\t- 'VirtualElementary'\t[ElemGeoms metahandler]\n");
-
-#ifndef OMIT_KNN /* only if KNN is enabled */
+
+#ifndef OMIT_GEOS /* only if GEOS is supported */
+/* initializing the VirtualRouting extension */
spatialite_i
+ ("\t- 'VirtualRouting'\t[Dijkstra shortest path - advanced]\n");
+#ifndef OMIT_KNN /* only if KNN is enabled */
+/* initializing the VirtualKNN extension */spatialite_i
("\t- 'VirtualKNN'\t[K-Nearest Neighbors metahandler]\n");
#endif /* end KNN conditional */
-
-#ifdef ENABLE_LIBXML2 /* VirtualXPath is supported */
- spatialite_i
- ("\t- 'VirtualXPath'\t[XML Path Language - XPath]\n");
-#endif /* end including LIBXML2 */
-
- spatialite_i
- ("\t- 'VirtualFDO'\t\t[FDO-OGR interoperability]\n");
+#endif /* end GEOS conditional */
#ifdef ENABLE_GEOPACKAGE /* VirtualGPKG is supported */
spatialite_i
("\t- 'VirtualGPKG'\t[OGC GeoPackage interoperability]\n");
#endif
- spatialite_i ("\t- 'VirtualBBox'\t\t[BoundingBox tables]\n");
spatialite_i ("\t- 'SpatiaLite'\t\t[Spatial SQL - OGC]\n");
}
+#ifdef ENABLE_LIBXML2 /* VirtualXPath is supported */
+ spatialite_i
+ ("\t- 'VirtualXPath'\t[XML Path Language - XPath]\n");
+#endif /* end including LIBXML2 */
+
#ifndef OMIT_PROJ /* PROJ.4 version */
if (verbose)
{
View it on GitLab: https://salsa.debian.org/debian-gis-team/spatialite/-/compare/ca90f16d1358a877b9aeaf921840fbebfa68dc0d...4457268d5a55f0f24fee464f2b0a96107f093541
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/spatialite/-/compare/ca90f16d1358a877b9aeaf921840fbebfa68dc0d...4457268d5a55f0f24fee464f2b0a96107f093541
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20200823/77f878e7/attachment-0001.html>
More information about the Pkg-grass-devel
mailing list