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

Function queue_remove

mysys/queues.c:251–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249 /* Returns pointer to removed element */
250
251uchar *queue_remove(register QUEUE *queue, uint idx)
252{
253 uchar *element;
254 DBUG_ASSERT(idx < queue->max_elements);
255 element= queue->root[++idx]; /* Intern index starts from 1 */
256 queue->root[idx]= queue->root[queue->elements--];
257 _downheap(queue, idx);
258 return element;
259}
260
261 /* Fix when element on top has been replaced */
262

Callers 6

popMethod · 0.85
perform_ins_delFunction · 0.85
benchmark_testFunction · 0.85
thr_end_alarmFunction · 0.85
process_alarm_part2Function · 0.85
thr_alarm_killFunction · 0.85

Calls 1

_downheapFunction · 0.85

Tested by

no test coverage detected