On 03/30/2016 12:14 AM, Cezary H. Noweta wrote: > Hello, > > On 2016-03-26 15:37, John Found wrote: >> Why cannot drop the table test? >> >> sqlite> begin transaction; >> sqlite> create virtual table test using fts5; >> Error: vtable constructor failed: test >> sqlite> commit; > > It is not required. Non-commited-and-non-rolledback, dangling > transaction suppresses all operations on vtable ``test''. COMMIT is > required to damage database file permanently. > >> sqlite> >> sqlite> drop table test; >> Error: vtable constructor failed: test >> >> sqlite> .tables >> test test_content test_docsize >> test_config test_data test_idx >> >> $sqlite3 --version >> 3.11.1 2016-03-03 16:17:53 f047920ce16971e573bc6ec9a48b118c9de2b3a7 > > It should not be possible to damage a database by an using of clean > SQL commands only. Hopefully SQLite has a helpful statement > transaction, which can be used in this case. > > I must stipulate that in the following is an ad-hoc solution, which > may be inaccurate and is included to illustrate a problem only. > > In ``vtab.c:sqlite3VtabBeginParse()'', at the beginning insert two lines: > ====== > sqlite3MultiWrite(pParse); > sqlite3MayAbort(pParse); > ======
I think that's the right thing to do as well. See here: http://sqlite.org/src/info/d0a3853b37230c12 The fix should appear as part of the 3.13 release (not 3.12 - the version that was tagged earlier this morning). Dan.