View Ticket
Not logged in
Ticket Hash: 4a05517b437869a76d37cbde0615c8a002e2fe72
Title: DisableSpatialIndex() doesn't drop idx_<table>_<col> table
Status: Closed Type: Code_Defect
Severity: Important Priority: Immediate
Subsystem: Resolution: Open
Last Modified: 2017-11-19 14:14:59
Version Found In: 4.3.0a
User Comments:
anonymous added on 2017-11-19 06:37:50:
sqlite> SELECT DisableSpatialIndex('test_app_city', 'point');
1
sqlite> SELECT CreateSpatialIndex('test_app_city', 'point');
updateTableTriggers: "table "idx_test_app_city_point" already exists"
1

sandro added on 2017-11-19 12:47:46:
this is intended, and is a clearly documented feature:
"Disables an RTree Spatial Index or MBR Cache removing any related Trigger"

'disable' is neither 'remove' nor 'drop'; the name itself says all.
this SQL function is just intended to remove any related Trigger and to appropriately update the "geometry_columns" meta-table.
a separate "DROP TABLE <idx_name>" is then required in order to physically remove the RTree. this is a well established behaviour since the very beginning of the SpatiaLite history, and any change will presumably have a negative impact on already existing software.

anonymous added on 2017-11-19 14:14:59:

Well, here's the link to the post where you state the opposite: https://groups.google.com/d/msg/spatialite-users/KlcVhqZCsA0/01BWMVZKdH8J

> this is a well established behaviour

Is it documented anyhow?