1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Fix two unreachable branches introduced by the recent

sqlite3TriggersExist() optimization.

FossilOrigin-Name: 1b5475d212cf9de0bff69eee8c607b4fcd8e04bf4df72171429e7609c4153951
This commit is contained in:
drh
2022-04-07 20:45:38 +00:00
parent e603ab00ee
commit ce5dd9e8d6
3 changed files with 9 additions and 11 deletions

View File

@@ -52,9 +52,7 @@ Trigger *sqlite3TriggerList(Parse *pParse, Table *pTab){
Trigger *pList; /* List of triggers to return */
HashElem *p; /* Loop variable for TEMP triggers */
if( pParse->disableTriggers ){
return 0;
}
assert( pParse->disableTriggers==0 );
pTmpSchema = pParse->db->aDb[1].pSchema;
p = sqliteHashFirst(&pTmpSchema->trigHash);
pList = pTab->pTrigger;
@@ -733,7 +731,7 @@ static int checkColumnOverlap(IdList *pIdList, ExprList *pEList){
** Return true if any TEMP triggers exist
*/
static int tempTriggersExist(sqlite3 *db){
if( db->aDb[1].pSchema==0 ) return 0;
if( NEVER(db->aDb[1].pSchema==0) ) return 0;
if( sqliteHashFirst(&db->aDb[1].pSchema->trigHash)==0 ) return 0;
return 1;
}