A SQLite DB file cannot be attached if it contains tables created without a row id.
To Reproduce
$ sqlite3 sqlite.db
SQLite version 3.40.0 2022-11-12 17:17:01
Enter ".help" for usage hints.
sqlite> create table tablename (id integer primary key) without rowid;
sqlite> insert into tablename values (1);
sqlite> .quit
$ ./build/release/duckdb -unsigned
v0.7.1-dev126 d34bcaf40b
Enter ".help" for usage hints.
D LOAD 'build/release/extension/sqlite_scanner/sqlite_scanner.duckdb_extension';
D CALL sqlite_attach('sqlite.db');
Error: Invalid Error: Failed to prepare query "SELECT MAX(ROWID) FROM "tablename"": no such column: ROWID
OS:
Linux
SQLite Version:
3.40.0
DuckDB Version:
v0.7.1-dev126 d34bcaf40b
DuckDB Client:
CLI
Full Name:
Sebastian Jaenicke
Affiliation:
-
Have you tried this on the latest master branch?
[X] I agree
Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?
What happens?
A SQLite DB file cannot be attached if it contains tables created without a row id.
To Reproduce
OS:
Linux
SQLite Version:
3.40.0
DuckDB Version:
v0.7.1-dev126 d34bcaf40b
DuckDB Client:
CLI
Full Name:
Sebastian Jaenicke
Affiliation:
-
Have you tried this on the latest
master
branch?Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?