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

Method invalidate

sql/sql_cache.cc:2232–2261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2230*/
2231
2232void Query_cache::invalidate(THD *thd, TABLE_LIST *tables_used,
2233 my_bool using_transactions)
2234{
2235 DBUG_ENTER("Query_cache::invalidate (table list)");
2236 if (is_disabled())
2237 DBUG_VOID_RETURN;
2238
2239 using_transactions= using_transactions && thd->in_multi_stmt_transaction_mode();
2240 for (; tables_used; tables_used= tables_used->next_local)
2241 {
2242 DBUG_ASSERT(!using_transactions || tables_used->table!=0);
2243 if (tables_used->derived)
2244 continue;
2245 if (using_transactions &&
2246 (tables_used->table->file->table_cache_type() ==
2247 HA_CACHE_TBL_TRANSACT))
2248 /*
2249 tables_used->table can't be 0 in transaction.
2250 Only 'drop' invalidate not opened table, but 'drop'
2251 force transaction finish.
2252 */
2253 thd->add_changed_table(tables_used->table);
2254 else
2255 invalidate_table(thd, tables_used);
2256 }
2257
2258 DEBUG_SYNC(thd, "wait_after_query_cache_invalidate");
2259
2260 DBUG_VOID_RETURN;
2261}
2262
2263void Query_cache::invalidate(THD *thd, CHANGED_TABLE_LIST *tables_used)
2264{

Callers 4

commit_one_phase_2Function · 0.45
mysql_rename_viewFunction · 0.45

Calls 8

Lex_ident_fsClass · 0.85
lockClass · 0.85
add_changed_tableMethod · 0.80
table_cache_typeMethod · 0.45
tableMethod · 0.45
dbMethod · 0.45

Tested by

no test coverage detected