SQLite Forum

Bug: Database schema corruption
Login
Sorry, it turned out my test directory contained a database named "2020-11-05" (current_date).


Could you try to reproduce this: 

1) Setup test.db

leon@leon-desktop:~/Downloads/sqlite-snapshot-202010201440$ ./a.out test.db
SQLite version 3.34.0 2020-10-20 14:40:53
Enter ".help" for usage hints.
sqlite> CREATE TABLE v ( '''' , H);

2 ) Exit

3 ) Start sqlite


leon@leon-desktop:~/Downloads/sqlite-snapshot-202010201440$ ./a.out 
SQLite version 3.34.0 2020-10-20 14:40:53
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> attach "test.db" as 'MM';
sqlite> CREatE temp TrIGGeR if nOt eXists  V  DeleTe on  V  when upper  ( * ) begiN seLect * ; enD ;
sqlite> CrEATe vIEw if nOt eXIsTs  v  as sELecT * ;
sqlite> cReaTE ViRtUal tAblE  aaaaaa  uSiNg  'kk'  ;
Error: no such module: kk
sqlite> select aaa from bbbbbbbbbbb;                                                            
Error: malformed database schema (V) - cannot create BEFORE trigger on view: V
sqlite> CREATE TABLE Persons (PersonID int, LastName varchar(255));
Error: malformed database schema (V) - cannot create BEFORE trigger on view: V
sqlite>