MCPcopy Create free account
hub / github.com/MariaDB/server / abort

Method abort

sql/sql_cache.cc:1131–1162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1129
1130
1131void
1132Query_cache::abort(THD *thd, Query_cache_tls *query_cache_tls)
1133{
1134 DBUG_ENTER("query_cache_abort");
1135
1136 /* See the comment on double-check locking usage above. */
1137 if (is_disabled() || query_cache_tls->first_query_block == NULL)
1138 DBUG_VOID_RETURN;
1139
1140 if (try_lock(thd, Query_cache::WAIT))
1141 DBUG_VOID_RETURN;
1142
1143 /*
1144 While we were waiting another thread might have changed the status
1145 of the writer. Make sure the writer still exists before continue.
1146 */
1147 Query_cache_block *query_block= query_cache_tls->first_query_block;
1148 if (query_block)
1149 {
1150 THD_STAGE_INFO(thd, stage_storing_result_in_query_cache);
1151 DUMP(this);
1152 BLOCK_LOCK_WR(query_block);
1153 // The following call will remove the lock on query_block
1154 free_query(query_block);
1155 query_cache_tls->first_query_block= NULL;
1156 DBUG_EXECUTE("check_querycache", check_integrity(1););
1157 }
1158
1159 unlock();
1160
1161 DBUG_VOID_RETURN;
1162}
1163
1164
1165void Query_cache::end_of_result(THD *thd)

Callers

nothing calls this directly

Calls 1

check_integrityFunction · 0.85

Tested by

no test coverage detected