~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/insert_select.cc

  • Committer: LinuxJedi
  • Date: 2010-08-28 09:23:52 UTC
  • mto: (1738.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1739.
  • Revision ID: linuxjedi@linuxjedi-laptop-20100828092352-oe3zbtdy05kq9dtq
Make exit happen in main thread rather than signal handler thread thus avoiding a segfault due to a double kill of the signal handler thread

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
}