Fossil SCM
Make db_stats() conditional on the appropriate global option.
Commit
2a0c020313c29b7c61ce21d926f97aa161f5828e8085ce82b5119d5f4fcef87f
Parent
82d177fa1427710…
1 file changed
+2
-2
M
src/db.c
+2
-2
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -489,11 +489,11 @@ | ||
| 489 | 489 | /* |
| 490 | 490 | ** Reset or finalize a statement. |
| 491 | 491 | */ |
| 492 | 492 | int db_reset(Stmt *pStmt){ |
| 493 | 493 | int rc; |
| 494 | - db_stats(pStmt); | |
| 494 | + if( g.fSqlStats ){ db_stats(pStmt); } | |
| 495 | 495 | rc = sqlite3_reset(pStmt->pStmt); |
| 496 | 496 | db_check_result(rc, pStmt); |
| 497 | 497 | return rc; |
| 498 | 498 | } |
| 499 | 499 | int db_finalize(Stmt *pStmt){ |
| @@ -506,11 +506,11 @@ | ||
| 506 | 506 | }else if( db.pAllStmt==pStmt ){ |
| 507 | 507 | db.pAllStmt = pStmt->pNext; |
| 508 | 508 | } |
| 509 | 509 | pStmt->pNext = 0; |
| 510 | 510 | pStmt->pPrev = 0; |
| 511 | - db_stats(pStmt); | |
| 511 | + if( g.fSqlStats ){ db_stats(pStmt); } | |
| 512 | 512 | blob_reset(&pStmt->sql); |
| 513 | 513 | rc = sqlite3_finalize(pStmt->pStmt); |
| 514 | 514 | db_check_result(rc, pStmt); |
| 515 | 515 | pStmt->pStmt = 0; |
| 516 | 516 | return rc; |
| 517 | 517 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -489,11 +489,11 @@ | |
| 489 | /* |
| 490 | ** Reset or finalize a statement. |
| 491 | */ |
| 492 | int db_reset(Stmt *pStmt){ |
| 493 | int rc; |
| 494 | db_stats(pStmt); |
| 495 | rc = sqlite3_reset(pStmt->pStmt); |
| 496 | db_check_result(rc, pStmt); |
| 497 | return rc; |
| 498 | } |
| 499 | int db_finalize(Stmt *pStmt){ |
| @@ -506,11 +506,11 @@ | |
| 506 | }else if( db.pAllStmt==pStmt ){ |
| 507 | db.pAllStmt = pStmt->pNext; |
| 508 | } |
| 509 | pStmt->pNext = 0; |
| 510 | pStmt->pPrev = 0; |
| 511 | db_stats(pStmt); |
| 512 | blob_reset(&pStmt->sql); |
| 513 | rc = sqlite3_finalize(pStmt->pStmt); |
| 514 | db_check_result(rc, pStmt); |
| 515 | pStmt->pStmt = 0; |
| 516 | return rc; |
| 517 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -489,11 +489,11 @@ | |
| 489 | /* |
| 490 | ** Reset or finalize a statement. |
| 491 | */ |
| 492 | int db_reset(Stmt *pStmt){ |
| 493 | int rc; |
| 494 | if( g.fSqlStats ){ db_stats(pStmt); } |
| 495 | rc = sqlite3_reset(pStmt->pStmt); |
| 496 | db_check_result(rc, pStmt); |
| 497 | return rc; |
| 498 | } |
| 499 | int db_finalize(Stmt *pStmt){ |
| @@ -506,11 +506,11 @@ | |
| 506 | }else if( db.pAllStmt==pStmt ){ |
| 507 | db.pAllStmt = pStmt->pNext; |
| 508 | } |
| 509 | pStmt->pNext = 0; |
| 510 | pStmt->pPrev = 0; |
| 511 | if( g.fSqlStats ){ db_stats(pStmt); } |
| 512 | blob_reset(&pStmt->sql); |
| 513 | rc = sqlite3_finalize(pStmt->pStmt); |
| 514 | db_check_result(rc, pStmt); |
| 515 | pStmt->pStmt = 0; |
| 516 | return rc; |
| 517 |