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

Method in_table_list

sql/sql_cache.cc:5273–5340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5271}
5272
5273my_bool Query_cache::in_table_list(Query_cache_block_table * root,
5274 Query_cache_block_table * point,
5275 const char *name)
5276{
5277 my_bool result = 0;
5278 Query_cache_block_table *table = point;
5279 dump_node(root, name, "parameter root");
5280 //back
5281 do
5282 {
5283 dump_node(table, name, "list element << ");
5284 if (table->prev->next != table)
5285 {
5286 DBUG_PRINT("error",
5287 ("table %p(%p) in list '%s' %p(%p) is incorrect linked, prev table %p(%p) referred as next to %p(%p) (check from %p(%p))",
5288 table, table->block(), name,
5289 root, root->block(),
5290 table->prev, table->prev->block(),
5291 table->prev->next,
5292 table->prev->next->block(),
5293 point, point->block()));
5294 //back trace
5295 for (; table != point; table = table->next)
5296 DBUG_PRINT("error", ("back trace %p(%p)",
5297 table, table->block()));
5298 result = 1;
5299 goto err1;
5300 }
5301 table = table->prev;
5302 } while (table != root && table != point);
5303 if (table != root)
5304 {
5305 DBUG_PRINT("error",
5306 ("table %p(%p) (%p(%p)<-->%p(%p)) not owned by list '%s' %p(%p)",
5307 table, table->block(),
5308 table->prev, table->prev->block(),
5309 table->next, table->next->block(),
5310 name, root, root->block()));
5311 return 1;
5312 }
5313err1:
5314 // forward
5315 table = point;
5316 do
5317 {
5318 dump_node(table, name, "list element >> ");
5319 if (table->next->prev != table)
5320 {
5321 DBUG_PRINT("error",
5322 ("table %p(%p) in list '%s' %p(%p) is incorrect linked, next table %p(%p) referred as prev to %p(%p) (check from %p(%p))",
5323 table, table->block(),
5324 name, root, root->block(),
5325 table->next, table->next->block(),
5326 table->next->prev,
5327 table->next->prev->block(),
5328 point, point->block()));
5329 //back trace
5330 for (; table != point; table = table->prev)

Callers

nothing calls this directly

Calls 2

dump_nodeFunction · 0.85
blockMethod · 0.45

Tested by

no test coverage detected