~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/drop_table.cc

  • Committer: Brian Aker
  • Date: 2010-11-23 02:01:23 UTC
  • mfrom: (1938.4.13 trunk)
  • mto: This revision was merged to the branch mainline in revision 1947.
  • Revision ID: brian@tangent.org-20101123020123-dillrqm8atzpkka7
Merge in lock encapsulation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
  }
67
67
 
68
68
  /*
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
 
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
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);
99
99
    }
100
100
  }
101
101
 
102
 
  /* DDL and binlog write order protected by LOCK_open */
 
102
  /* DDL and binlog write order protected by table::Cache::singleton().mutex() */
103
103
  bool res= mysql_rm_table(session,
104
104
                           first_table,
105
105
                           drop_if_exists,