681
681
static int lock_table_name(Session *session, TableList *table_list, bool check_in_use)
684
683
bool found_locked_table= false;
686
684
TableIdentifier identifier(table_list->db, table_list->table_name);
687
685
const TableIdentifier::Key &key(identifier.getKey());
691
689
/* Only insert the table if we haven't insert it already */
698
698
if (table->reginfo.lock_type < TL_WRITE)
700
700
if (table->in_use == session)