You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sqlite: enableDefensive() is lost after close()/open() #66403
import{Database}from'node:sqlite';constdb=newDatabase(':memory:',{defensive: false});db.enableDefensive(true);db.close();db.open();db.exec('PRAGMA writable_schema=ON');db.exec("UPDATE sqlite_schema SET sql='x'");// succeeds; defensive is off againconsole.log('UPDATE succeeded');
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
With defensive mode on, SQLite ignores PRAGMA writable_schema=ON (SQLITE_DBCONFIG_DEFENSIVE), so the UPDATE should fail with table sqlite_master may not be modified, as it does without the reopen.
Activity
sqlite: persist enableDefensive() across reopen
sqlite: persist enableDefensive() across reopen