Remove from queue and stmt_cache->hash this entry so that subsequent finds of * the same sql will not find it but rather create a new stmt (to avoid having * stmt vdbe used by two sql at the same time). */
| 168 | * the same sql will not find it but rather create a new stmt (to avoid having |
| 169 | * stmt vdbe used by two sql at the same time). */ |
| 170 | static int stmt_cache_remove_entry(stmt_cache_t *stmt_cache, |
| 171 | stmt_cache_entry_t *entry, int noComplain) |
| 172 | { |
| 173 | assert(entry); |
| 174 | |
| 175 | void *list = GET_STMT_LIST(stmt_cache, entry->stmt); |
| 176 | |
| 177 | listc_maybe_rfl(list, entry); |
| 178 | int rc = hash_del(stmt_cache->hash, entry->sql); |
| 179 | if (!noComplain && rc) { |
| 180 | logmsg(LOGMSG_ERROR, "%s:%d failed to delete entry (rc: %d)\n", |
| 181 | __func__, __LINE__, rc); |
| 182 | return rc; |
| 183 | } |
| 184 | return 0; |
| 185 | } |
| 186 | |
| 187 | /* This will call stmt_cache_requeue_old_entry() after it has allocated memory for |
| 188 | * the new entry. On error will return non zero and caller will need to |
no test coverage detected