~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/drop_table.cc

  • Committer: Joe Daly
  • Date: 2010-03-08 04:23:54 UTC
  • mto: This revision was merged to the branch mainline in revision 1380.
  • Revision ID: skinny.moey@gmail.com-20100308042354-7k0jibdqaxkhac7o
scoreboardĀ implementationĀ forĀ statistics

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
 
60
60
  /* mark for close and remove all cached entries */
61
61
 
62
 
  if (not drop_temporary)
 
62
  if (! drop_temporary)
63
63
  {
64
 
    if (not (need_start_waiting= not session->wait_if_global_read_lock(false, true)))
 
64
    if (!(need_start_waiting= !wait_if_global_read_lock(session, false, true)))
65
65
      return true;
66
66
  }
67
67
 
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;
90
88
  TableList *first_table= (TableList *) session->lex->select_lex.table_list.first;
91
89
  TableList *all_tables= session->lex->query_tables;
92
90
  assert(first_table == all_tables && first_table != 0);
93
 
 
94
 
  if (not drop_temporary)
 
91
  if (! drop_temporary)
95
92
  {
96
 
    if (not session->endActiveTransaction())
 
93
    if (! session->endActiveTransaction())
97
94
    {
98
95
      return true;
99
96
    }
100
97
  }
101
 
 
102
98
  /* DDL and binlog write order protected by LOCK_open */
103
99
  bool res= mysql_rm_table(session,
104
100
                           first_table,