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

Method nocheck_register_item_tree_change

sql/sql_class.cc:1288–1310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1286*/
1287
1288void THD::nocheck_register_item_tree_change(Item **place, Item *old_value,
1289 MEM_ROOT *runtime_memroot)
1290{
1291 Item_change_record *change;
1292 /*
1293 Now we use one node per change, which adds some memory overhead,
1294 but still is rather fast as we use alloc_root for allocations.
1295 A list of item tree changes of an average query should be short.
1296 */
1297 void *change_mem= alloc_root(runtime_memroot, sizeof(*change));
1298 if (change_mem == 0)
1299 {
1300 /*
1301 OOM, thd->fatal_error() is called by the error handler of the
1302 memroot. Just return.
1303 */
1304 return;
1305 }
1306 change= new (change_mem) Item_change_record;
1307 change->place= place;
1308 change->old_value= old_value;
1309 change_list.push_front(change);
1310}
1311
1312
1313void THD::change_item_tree_place(Item **old_ref, Item **new_ref)

Callers

nothing calls this directly

Calls 2

alloc_rootFunction · 0.85
push_frontMethod · 0.45

Tested by

no test coverage detected