From 9a8e2d935db3adecc379bdcf144e9923707384d1 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 13 Mar 2018 09:21:48 +0000 Subject: [PATCH] GPKG: fix incorrect rtree___update3 trigger statement, as found in https://github.com/opengeospatial/geopackage/issues/414 git-svn-id: https://svn.osgeo.org/gdal/trunk@41765 f0d54148-0727-0410-94bb-9a71ac55c965 --- gdal/ogr/ogrsf_frmts/gpkg/ogrgeopackagetablelayer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdal/ogr/ogrsf_frmts/gpkg/ogrgeopackagetablelayer.cpp b/gdal/ogr/ogrsf_frmts/gpkg/ogrgeopackagetablelayer.cpp index e54a3468397a..f880b0fb2916 100644 --- a/gdal/ogr/ogrsf_frmts/gpkg/ogrgeopackagetablelayer.cpp +++ b/gdal/ogr/ogrsf_frmts/gpkg/ogrgeopackagetablelayer.cpp @@ -2820,7 +2820,7 @@ bool OGRGeoPackageTableLayer::CreateSpatialIndex(const char* pszTableName) Actions : Remove record from rtree for old Insert record into rtree for new */ pszSQL = sqlite3_mprintf( - "CREATE TRIGGER \"%w_update3\" AFTER UPDATE OF \"%w\" ON \"%w\" " + "CREATE TRIGGER \"%w_update3\" AFTER UPDATE ON \"%w\" " "WHEN OLD.\"%w\" != NEW.\"%w\" AND " "(NEW.\"%w\" NOTNULL AND NOT ST_IsEmpty(NEW.\"%w\")) " "BEGIN " @@ -2831,7 +2831,7 @@ bool OGRGeoPackageTableLayer::CreateSpatialIndex(const char* pszTableName) "ST_MinY(NEW.\"%w\"), ST_MaxY(NEW.\"%w\")" "); " "END", - m_osRTreeName.c_str(), pszC, pszT, + m_osRTreeName.c_str(), pszT, pszI, pszI, pszC, pszC, m_osRTreeName.c_str(), pszI,