~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.cc

  • Committer: Monty Taylor
  • Date: 2009-03-14 22:30:22 UTC
  • mto: This revision was merged to the branch mainline in revision 938.
  • Revision ID: mordred@inaugust.com-20090314223022-kg7yk30kocx48pd5
Replaced the I_List holding sessions with a std::vector.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2911
2911
static unsigned int
2912
2912
kill_one_thread(Session *, ulong id, bool only_kill_query)
2913
2913
{
2914
 
  Session *tmp;
 
2914
  Session *tmp= NULL;
2915
2915
  uint32_t error=ER_NO_SUCH_THREAD;
2916
2916
  pthread_mutex_lock(&LOCK_thread_count); // For unlink from list
2917
 
  I_List_iterator<Session> it(session_list);
2918
 
  while ((tmp=it++))
 
2917
  vector<Session *>::iterator it= session_list.begin();
 
2918
  while (it != session_list.end())
2919
2919
  {
 
2920
    tmp= *it;
2920
2921
    if (tmp->thread_id == id)
2921
2922
    {
2922
2923
      pthread_mutex_lock(&tmp->LOCK_delete);    // Lock from delete
2923
2924
      break;
2924
2925
    }
 
2926
    it++;
2925
2927
  }
2926
2928
  pthread_mutex_unlock(&LOCK_thread_count);
2927
2929
  if (tmp)