MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / stmt_cache_delete_last_entry

Function stmt_cache_delete_last_entry

db/sql_stmt_cache.c:154–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154static int stmt_cache_delete_last_entry(stmt_cache_t *stmt_cache, void *list)
155{
156 int rc;
157 stmt_cache_entry_t *entry = listc_rbl(list);
158 rc = hash_del(stmt_cache->hash, entry);
159 if (rc) {
160 logmsg(LOGMSG_ERROR, "%s:%d failed to delete entry (rc: %d)\n",
161 __func__, __LINE__, rc);
162 }
163 stmt_cache_finalize_entry(entry);
164 return rc;
165}
166
167/* Remove from queue and stmt_cache->hash this entry so that subsequent finds of
168 * the same sql will not find it but rather create a new stmt (to avoid having

Callers 1

stmt_cache_add_new_entryFunction · 0.85

Calls 4

listc_rblFunction · 0.85
hash_delFunction · 0.85
logmsgFunction · 0.50

Tested by

no test coverage detected