Caller closes the connection immediately after this failure helper. */
| 97 | } |
| 98 | /* Caller closes the connection immediately after this failure helper. */ |
| 99 | static bool gd_reject(cbm_store_t *s,cbm_store_graph_digest_status_t want) { |
| 100 | cbm_store_read_scope_t *scope=NULL; cbm_store_graph_digest_t out; |
| 101 | memset(&out,0xa5,sizeof(out)); |
| 102 | int opened=cbm_store_read_scope_open(s,NULL,NULL,&scope); |
| 103 | int rc=opened==CBM_STORE_OK?cbm_store_graph_digest(scope,(const unsigned char *)"p",1,&gd_room,&out):-1; |
| 104 | bool zero=gd_zero(&out); |
| 105 | int latch=scope?cbm_store_read_scope_check(scope):0; |
| 106 | int closed=cbm_store_read_scope_close(scope); |
| 107 | return opened==CBM_STORE_OK && rc==(int)want && zero && latch==CBM_STORE_ERR && closed==CBM_STORE_ERR; |
| 108 | } |
| 109 | static int gd_stmt_count(sqlite3 *db) { |
| 110 | int n=0;for(sqlite3_stmt *s=sqlite3_next_stmt(db,NULL);s;s=sqlite3_next_stmt(db,s))n++; |
| 111 | return n; |
no test coverage detected