~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/insert_select.cc

  • Committer: Andrew Hutchings
  • Date: 2010-11-09 13:38:01 UTC
  • mto: (1919.1.2 trunk)
  • mto: This revision was merged to the branch mainline in revision 1920.
  • Revision ID: andrew@linuxjedi.co.uk-20101109133801-byjzsao76346395x
Add FLUSH GLOBAL STATUS; command
Clears the global status variables for the server

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
 
50
50
  unit->set_limit(select_lex);
51
51
 
52
 
  if (! (need_start_waiting= not session->wait_if_global_read_lock(false, true)))
 
52
  if (! (need_start_waiting= ! wait_if_global_read_lock(session, 0, 1)))
53
53
  {
54
54
    return true;
55
55
  }
56
56
 
57
57
  if (! (res= session->openTablesLock(all_tables)))
58
58
  {
59
 
    DRIZZLE_INSERT_SELECT_START(session->getQueryString()->c_str());
 
59
    DRIZZLE_INSERT_SELECT_START(session->query.c_str());
60
60
    /* Skip first table, which is the table we are inserting in */
61
61
    TableList *second_table= first_table->next_local;
62
62
    select_lex->table_list.first= (unsigned char*) second_table;
100
100
     Release the protection against the global read lock and wake
101
101
     everyone, who might want to set a global read lock.
102
102
   */
103
 
  session->startWaitingGlobalReadLock();
 
103
  start_waiting_global_read_lock(session);
104
104
 
105
105
  return res;
106
106
}