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

Method push_back

sql/sql_profile.h:92–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90 ulong elements; /* The count of items in the Queue */
91
92 void push_back(T *payload)
93 {
94 struct queue_item *new_item;
95
96 new_item= (struct queue_item *) my_malloc(sizeof(struct queue_item), MYF(0));
97
98 new_item->payload= payload;
99
100 if (first == NULL)
101 first= new_item;
102 if (last != NULL)
103 {
104 DBUG_ASSERT(last->next == NULL);
105 last->next= new_item;
106 }
107 new_item->previous= last;
108 new_item->next= NULL;
109 last= new_item;
110
111 elements++;
112 }
113
114 T *pop()
115 {

Callers

nothing calls this directly

Calls 1

my_mallocFunction · 0.85

Tested by

no test coverage detected