~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.cc

  • Committer: Monty Taylor
  • Date: 2008-09-23 14:19:48 UTC
  • mto: This revision was merged to the branch mainline in revision 419.
  • Revision ID: monty@inaugust.com-20080923141948-ktph2kg13addaxq1
Actually removed VOID() this time.

Show diffs side-by-side

added added

removed removed

Lines of Context:
520
520
  thd->enable_slow_log= true;
521
521
  thd->lex->sql_command= SQLCOM_END; /* to avoid confusing VIEW detectors */
522
522
  thd->set_time();
523
 
  VOID(pthread_mutex_lock(&LOCK_thread_count));
 
523
  pthread_mutex_lock(&LOCK_thread_count);
524
524
  thd->query_id= global_query_id;
525
525
 
526
526
  switch( command ) {
535
535
 
536
536
  thread_running++;
537
537
  /* TODO: set thd->lex->sql_command to SQLCOM_END here */
538
 
  VOID(pthread_mutex_unlock(&LOCK_thread_count));
 
538
  pthread_mutex_unlock(&LOCK_thread_count);
539
539
 
540
540
  thd->server_status&=
541
541
           ~(SERVER_QUERY_NO_INDEX_USED | SERVER_QUERY_NO_GOOD_INDEX_USED);
696
696
        length--;
697
697
      }
698
698
 
699
 
      VOID(pthread_mutex_lock(&LOCK_thread_count));
 
699
      pthread_mutex_lock(&LOCK_thread_count);
700
700
      thd->query_length= length;
701
701
      thd->query= beginning_of_next_stmt;
702
702
      /*
706
706
      thd->query_id= next_query_id();
707
707
      thd->set_time(); /* Reset the query start time. */
708
708
      /* TODO: set thd->lex->sql_command to SQLCOM_END here */
709
 
      VOID(pthread_mutex_unlock(&LOCK_thread_count));
 
709
      pthread_mutex_unlock(&LOCK_thread_count);
710
710
 
711
711
      mysql_parse(thd, beginning_of_next_stmt, length, &end_of_stmt);
712
712
    }
898
898
  log_slow_statement(thd);
899
899
 
900
900
  thd_proc_info(thd, "cleaning up");
901
 
  VOID(pthread_mutex_lock(&LOCK_thread_count)); // For process list
 
901
  pthread_mutex_lock(&LOCK_thread_count); // For process list
902
902
  thd_proc_info(thd, 0);
903
903
  thd->command=COM_SLEEP;
904
904
  thd->query=0;
905
905
  thd->query_length=0;
906
906
  thread_running--;
907
 
  VOID(pthread_mutex_unlock(&LOCK_thread_count));
 
907
  pthread_mutex_unlock(&LOCK_thread_count);
908
908
  thd->packet.shrink(thd->variables.net_buffer_length); // Reclaim some memory
909
909
  free_root(thd->mem_root,MYF(MY_KEEP_PREALLOC));
910
910
  return(error);
3791
3791
{
3792
3792
  THD *tmp;
3793
3793
  uint error=ER_NO_SUCH_THREAD;
3794
 
  VOID(pthread_mutex_lock(&LOCK_thread_count)); // For unlink from list
 
3794
  pthread_mutex_lock(&LOCK_thread_count); // For unlink from list
3795
3795
  I_List_iterator<THD> it(threads);
3796
3796
  while ((tmp=it++))
3797
3797
  {
3803
3803
      break;
3804
3804
    }
3805
3805
  }
3806
 
  VOID(pthread_mutex_unlock(&LOCK_thread_count));
 
3806
  pthread_mutex_unlock(&LOCK_thread_count);
3807
3807
  if (tmp)
3808
3808
  {
3809
3809
    tmp->awake(only_kill_query ? THD::KILL_QUERY : THD::KILL_CONNECTION);