~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/drop_table.cc

  • Committer: Brian Aker
  • Date: 2010-09-15 20:24:31 UTC
  • mto: (1766.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1767.
  • Revision ID: brian@tangent.org-20100915202431-wbrrl4vg6rzjvdiu
Adding opt for optional schedulers and making them --plugin-add only.

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
 
62
62
  if (not drop_temporary)
63
63
  {
64
 
    if (not (need_start_waiting= not session->wait_if_global_read_lock(false, true)))
 
64
    if (not (need_start_waiting= !wait_if_global_read_lock(session, false, true)))
65
65
      return true;
66
66
  }
67
67
 
68
68
  /*
69
 
    Acquire table::Cache::singleton().mutex() after wait_if_global_read_lock(). If we would hold
70
 
    table::Cache::singleton().mutex() during wait_if_global_read_lock(), other threads could not
 
69
    Acquire LOCK_open after wait_if_global_read_lock(). If we would hold
 
70
    LOCK_open during wait_if_global_read_lock(), other threads could not
71
71
    close their tables. This would make a pretty deadlock.
72
72
  */
73
73
  error= mysql_rm_table_part2(session, tables, if_exists, drop_temporary);
74
74
 
75
75
  if (need_start_waiting)
76
 
  {
77
 
    session->startWaitingGlobalReadLock();
78
 
  }
 
76
    start_waiting_global_read_lock(session);
79
77
 
80
78
  if (error)
81
79
    return true;
99
97
    }
100
98
  }
101
99
 
102
 
  /* DDL and binlog write order protected by table::Cache::singleton().mutex() */
 
100
  /* DDL and binlog write order protected by LOCK_open */
103
101
  bool res= mysql_rm_table(session,
104
102
                           first_table,
105
103
                           drop_if_exists,