/ Check-in [5f779ff6]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a parsing issue associated with a corrupt sqlite_master table.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | corrupt-schema
Files: files | file ages | folders
SHA3-256: 5f779ff6b48ec97efacd49b1715b7e5272694fa839be349c90667812bbffe22b
User & Date: mistachkin 2018-03-16 19:10:05
Context
2018-03-16
20:15
Better error message text when the schema is corrupted by a CREATE TABLE AS entry. Closed-Leaf check-in: e13993cf user: drh tags: corrupt-schema
19:10
Fix a parsing issue associated with a corrupt sqlite_master table. check-in: 5f779ff6 user: mistachkin tags: corrupt-schema
07:48
Fix a problem in test script thread001.test causing a spurious "-1 files were left open" error when run separately. check-in: 1774f1c3 user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to src/parse.y.

165
166
167
168
169
170
171

172
173




174
175
176
177
178
179
180
temp(A) ::= TEMP.  {A = 1;}
%endif  SQLITE_OMIT_TEMPDB
temp(A) ::= .      {A = 0;}
create_table_args ::= LP columnlist conslist_opt(X) RP(E) table_options(F). {
  sqlite3EndTable(pParse,&X,&E,F,0);
}
create_table_args ::= AS select(S). {

  sqlite3EndTable(pParse,0,0,0,S);
  sqlite3SelectDelete(pParse->db, S);




}
%type table_options {int}
table_options(A) ::= .    {A = 0;}
table_options(A) ::= WITHOUT nm(X). {
  if( X.n==5 && sqlite3_strnicmp(X.z,"rowid",5)==0 ){
    A = TF_WithoutRowid | TF_NoVisibleRowid;
  }else{







>
|
|
>
>
>
>







165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
temp(A) ::= TEMP.  {A = 1;}
%endif  SQLITE_OMIT_TEMPDB
temp(A) ::= .      {A = 0;}
create_table_args ::= LP columnlist conslist_opt(X) RP(E) table_options(F). {
  sqlite3EndTable(pParse,&X,&E,F,0);
}
create_table_args ::= AS select(S). {
  if( pParse->db->init.busy==0 ){
    sqlite3EndTable(pParse,0,0,0,S);
    sqlite3SelectDelete(pParse->db, S);
  }else{
    sqlite3SelectDelete(pParse->db, S);
    sqlite3ErrorMsg(pParse, "corrupt schema");
  }
}
%type table_options {int}
table_options(A) ::= .    {A = 0;}
table_options(A) ::= WITHOUT nm(X). {
  if( X.n==5 && sqlite3_strnicmp(X.z,"rowid",5)==0 ){
    A = TF_WithoutRowid | TF_NoVisibleRowid;
  }else{