Skip to content

Commit

Permalink
GPKG: fix incorrect rtree_<t>_<c>_update3 trigger statement, as found…
Browse files Browse the repository at this point in the history
… in opengeospatial/geopackage#414

git-svn-id: https://svn.osgeo.org/gdal/trunk@41765 f0d54148-0727-0410-94bb-9a71ac55c965
  • Loading branch information
rouault committed Mar 13, 2018
1 parent 922ff15 commit 9a8e2d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gdal/ogr/ogrsf_frmts/gpkg/ogrgeopackagetablelayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2820,7 +2820,7 @@ bool OGRGeoPackageTableLayer::CreateSpatialIndex(const char* pszTableName)
Actions : Remove record from rtree for old <i>
Insert record into rtree for new <i> */
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 "
Expand All @@ -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,
Expand Down

0 comments on commit 9a8e2d9

Please sign in to comment.