| Ticket Hash: | 2fe86e5011cb022f2d3e63481e1c2d7e68634c96 | |||
| Title: | spatialite_cleanup_ex and spatialite_cleanup remove unrelated sqlite extension modules | |||
| Status: | Open | Type: | Code_Defect | |
| Severity: | Critical | Priority: | ||
| Subsystem: | Resolution: | |||
| Last Modified: | 2026-09-01 09:12:00 | |||
| Version Found In: | ||||
| User Comments: | ||||
|
anonymous added on 2026-09-01 09:12:00:
spatialite_cleanup_ex calls sqlite3_reset_auto_extension. The effect is that if we added other extension modules, those will get silently removed as well. The effect is that the SQL functions provided by those other extension modules will be lost. I believe the call sqlite3_reset_auto_extension should simply be removed: spatialite_init_ex does not call sqlite3_auto_extension. So spatialite_cleanup_ex should unload extensions at all (not even spatialite). There is a similar problem in spatialite_cleanup: that should use sqlite3_cancel_auto_extension instead of sqlite3_reset_auto_extension. sqlite3_cancel_auto_extension is the opposite of sqlite3_auto_extension:
| ||||