MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / reg_requests

Function reg_requests

mysys/mf_keycache.c:1286–1294  ·  view source on GitHub ↗

Register requests for a block. SYNOPSIS reg_requests() keycache Pointer to a key cache data structure. block Pointer to the block to register a request on. count Number of requests. Always 1. NOTE The first request unlinks the block from the LRU ring. This means that it is protected against eveiction. RETURN void */

Source from the content-addressed store, hash-verified

1284 void
1285*/
1286static void reg_requests(KEY_CACHE *keycache, BLOCK_LINK *block, int count)
1287{
1288 DBUG_ASSERT(block->status & BLOCK_IN_USE);
1289 DBUG_ASSERT(block->hash_link);
1290
1291 if (!block->requests)
1292 unlink_block(keycache, block);
1293 block->requests+=count;
1294}
1295
1296
1297/*

Callers 2

find_key_blockFunction · 0.85
flush_key_blocks_intFunction · 0.85

Calls 1

unlink_blockFunction · 0.85

Tested by

no test coverage detected