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

Function open_n_lock_single_table

sql/sql_base.cc:5630–5656  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5628*/
5629
5630TABLE *open_n_lock_single_table(THD *thd, TABLE_LIST *table_l,
5631 thr_lock_type lock_type, uint flags,
5632 Prelocking_strategy *prelocking_strategy)
5633{
5634 TABLE_LIST *save_next_global;
5635 DBUG_ENTER("open_n_lock_single_table");
5636
5637 /* Remember old 'next' pointer. */
5638 save_next_global= table_l->next_global;
5639 /* Break list. */
5640 table_l->next_global= NULL;
5641
5642 /* Set requested lock type. */
5643 table_l->lock_type= lock_type;
5644 /* Allow to open real tables only. */
5645 table_l->required_type= TABLE_TYPE_NORMAL;
5646
5647 /* Open the table. */
5648 if (open_and_lock_tables(thd, table_l, FALSE, flags,
5649 prelocking_strategy))
5650 table_l->table= NULL; /* Just to be sure. */
5651
5652 /* Restore list. */
5653 table_l->next_global= save_next_global;
5654
5655 DBUG_RETURN(table_l->table);
5656}
5657
5658
5659/*

Callers

nothing calls this directly

Calls 1

open_and_lock_tablesFunction · 0.70

Tested by

no test coverage detected