Trying to import to an attached database fails. This is because the code does this:
<verbatim>
sqlite3_mprintf("SELECT * FROM '%q'", zTable);
sqlite3_snprintf(... "INSERT INTO '%q' VALUES(?", zTable);
</verbatim>
If you put single quotes around a table name then database names within are not parsed.
<verbatim>
sqlite> attach '/tmp/foo' as foo;
sqlite> create table foo.bar(x);
sqlite> select * from foo.bar;
sqlite> select * from 'foo.bar';
SQLError: no such table: foo.bar
</verbatim>
The code should not be using single quotes or SQLite should be changed to parse database names when single quotes are used.
|