mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Simplifications to the sqlite3_declare_vtab() implementation. Changes
some conditionals into assert() statements, for coverage. FossilOrigin-Name: ff7b898a6f9cb9aecb51bd6b63e253b4b7486ac9367f59c3c0491d78cfb39993
This commit is contained in:
@@ -855,11 +855,10 @@ int sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){
|
||||
initBusy = db->init.busy;
|
||||
db->init.busy = 0;
|
||||
sParse.nQueryLoop = 1;
|
||||
if( SQLITE_OK==sqlite3RunParser(&sParse, zCreateTable)
|
||||
&& ALWAYS(sParse.pNewTable!=0)
|
||||
&& ALWAYS(!db->mallocFailed)
|
||||
&& IsOrdinaryTable(sParse.pNewTable)
|
||||
){
|
||||
if( SQLITE_OK==sqlite3RunParser(&sParse, zCreateTable) ){
|
||||
assert( sParse.pNewTable!=0 );
|
||||
assert( !db->mallocFailed );
|
||||
assert( IsOrdinaryTable(sParse.pNewTable) );
|
||||
assert( sParse.zErrMsg==0 );
|
||||
if( !pTab->aCol ){
|
||||
Table *pNew = sParse.pNewTable;
|
||||
|
Reference in New Issue
Block a user