1
0
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:
drh
2024-03-25 19:31:03 +00:00
parent eb5bd4db91
commit 1872f8d844
3 changed files with 12 additions and 13 deletions

View File

@@ -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;