~mysql/mysql-server/mysql-6.0

« back to all changes in this revision

Viewing changes to sql/mdl.cc

auto-merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
 
102
102
  bool is_empty() const
103
103
  {
104
 
    return (waiting_shared == 0 && active_shared  == 0 &&
 
104
    return (waiting_shared == 0 && active_shared == 0 &&
105
105
            active_intention_exclusive == 0);
106
106
  }
107
107
  bool is_lock_type_compatible(enum_mdl_type type, bool is_upgrade) const;
491
491
  @sa THD::enter_cond()/exit_cond()/killed.
492
492
 
493
493
  @note We can't use THD::enter_cond()/exit_cond()/killed directly here
494
 
        since this will make metadata subsystem dependant on THD class
 
494
        since this will make metadata subsystem dependent on THD class
495
495
        and thus prevent us from writing unit tests for it. And usage of
496
496
        wrapper functions to access THD::killed/enter_cond()/exit_cond()
497
497
        will probably introduce too much overhead.
881
881
  if (conflicting_ticket->is_shared())
882
882
  {
883
883
    THD *conflicting_thd= conflicting_ticket->get_ctx()->get_thd();
 
884
    DBUG_ASSERT(thd != conflicting_thd); /* Self-deadlock */
884
885
    woke= mysql_notify_thread_having_shared_lock(thd, conflicting_thd);
885
886
  }
886
887
  return woke;
1089
1090
 
1090
1091
  old_msg= MDL_ENTER_COND(thd, mysys_var);
1091
1092
 
1092
 
 
1093
1093
  /*
1094
1094
    Since we should have already acquired an intention exclusive
1095
1095
    global lock this call is only enforcing asserts.
1164
1164
  @param conflict   [out] Indicates that conflicting lock exists
1165
1165
 
1166
1166
  @retval TRUE  Failure either conflicting lock exists or some error
1167
 
                occured (probably OOM).
 
1167
                occurred (probably OOM).
1168
1168
  @retval FALSE Success, lock was acquired.
1169
1169
 
1170
1170
  FIXME: Compared to lock_table_name_if_not_cached()