With an on-disk SQLite table, this rename sometimes doesn't take effect by the time we select from test2.test. This doesn't happen with an in-memory SQLite:
$ cat qall.sql
CREATE SCHEMA test1;
CREATE SCHEMA test2;
CREATE TABLE test1.test (col_1 INTEGER, col_2 VARCHAR);
ALTER TABLE test1.test RENAME TO test2.test;
SELECT * FROM test2.test;
With a write statement between the rename and the select, this starts working again:
~/seafowl-repro $ node ../seafowl/examples/clients/node/seafowl-client.js -f qall.sql
code: 200
~/seafowl-repro $ cat qall.sql
CREATE SCHEMA test1;
CREATE SCHEMA test2;
CREATE TABLE test1.test (col_1 INTEGER, col_2 VARCHAR);
ALTER TABLE test1.test RENAME TO test2.test;
CREATE TABLE test1.dummy(col_1 INTEGER); -- << if i run this write statement, the next line shows the new schema correctly
--SELECT * FROM information_schema.tables;
SELECT * FROM test2.test;
With an on-disk SQLite table, this rename sometimes doesn't take effect by the time we select from
test2.test
. This doesn't happen with an in-memory SQLite:Causing this to fail:
With a write statement between the rename and the select, this starts working again:
We also noticed the SQLite DB is open twice:
We might be able to solve it by only using one SQLite connection (it doesn't matter for SQLite anyway):