Regression with sqlite 3.25, table renaming and triggers referencing rtree

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Regression with sqlite 3.25, table renaming and triggers referencing rtree

Even Rouault
Hi,

I just found an issue when a renaming a table when one of its trigger references a column of a rtree

echo '
CREATE TABLE "mytable" ( "fid" INTEGER PRIMARY KEY, "geom" BLOB);
CREATE VIRTUAL TABLE "rtree_mytable_geom" USING rtree(id, minx, maxx, miny, maxy);
CREATE TRIGGER "rtree_mytable_geom_update2" AFTER UPDATE OF "geom" ON "mytable" WHEN OLD."fid" = NEW."fid" AND NEW."geom" IS NULL BEGIN DELETE FROM "rtree_mytable_geom" WHERE id = OLD."fid"; END;
ALTER TABLE mytable RENAME TO mytable_renamed;
' | $HOME/install-sqlite-3.25.0/bin/sqlite3

Error: near line 5: error in trigger rtree_mytable_geom_update2 after rename: no such column: id

This used to work fine with previous versions.

Even

--
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users