After attaching a SQLite db, whith tables created by Spatialite.
When running a querry, I'm getting the error Invalid Error: Failed to prepare query "PRAGMA table_info('SpatialIndex')": no such module: VirtualSpatialIndex.
Despite the querry not using the 'SpatialIndex' table.
This does not happen when opening the database directly.
The same error also happen with .tables and when querrying a table that does not exist.
To Reproduce
Create SQLite3 db
sqlite3 ducky.db <<EOF
CREATE TABLE IF NOT EXISTS duck (
id INTEGER,
datetime TIMESTAMP,
lat FLOAT,
lon FLOAT,
accuracy FLOAT
);
INSERT INTO duck (id, datetime, lat, lon, accuracy) VALUES (1, '2021-04-16 01:01:01', 10, 20, 1.5);
INSERT INTO duck (id, datetime, lat, lon, accuracy) VALUES (2, '2021-04-16 01:01:01', 11, 21, 5);
INSERT INTO duck (id, datetime, lat, lon, accuracy) VALUES (3, '2021-04-16 01:01:01', 12, 22, 3);
INSERT INTO duck (id, datetime, lat, lon, accuracy) VALUES (4, '2021-04-16 02:01:01', 21, 31, 2.8);
INSERT INTO duck (id, datetime, lat, lon, accuracy) VALUES (5, '2021-04-16 02:01:01', 22, 32, 6);
INSERT INTO duck (id, datetime, lat, lon, accuracy) VALUES (6, '2021-04-16 02:01:01', 23, 33, 7);
EOF
What happens?
After attaching a SQLite db, whith tables created by Spatialite. When running a querry, I'm getting the error
Invalid Error: Failed to prepare query "PRAGMA table_info('SpatialIndex')": no such module: VirtualSpatialIndex
. Despite the querry not using the 'SpatialIndex' table.This does not happen when opening the database directly.
The same error also happen with
.tables
and when querrying a table that does not exist.To Reproduce
Create SQLite3 db
Init Spatialite
This works
This does not work
All these commands result in
Invalid Error: Failed to prepare query "PRAGMA table_info('SpatialIndex')": no such module: VirtualSpatialIndex
OS:
Ubuntu 22.04 amd64 (WSL2)
SQLite Version:
SQLite 3.37.2, Spatialite 5.0.1
DuckDB Version:
0.10.1
DuckDB Client:
CLI, Python
Full Name:
Hugo Roussel
Affiliation:
Continental
Have you tried this on the latest
main
branch?Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?