~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.cc

  • Committer: Brian Aker
  • Date: 2010-03-04 08:35:47 UTC
  • mfrom: (1317.1.12)
  • mto: This revision was merged to the branch mainline in revision 1322.
  • Revision ID: brian@gaz-20100304083547-ca04rzc7ajwa3j7f
Merge for build of Monty.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
 
45
45
#include "drizzled/plugin/logging.h"
46
46
#include "drizzled/plugin/query_rewrite.h"
 
47
#include "drizzled/plugin/authorization.h"
47
48
#include "drizzled/optimizer/explain_plan.h"
48
49
#include "drizzled/pthread_globals.h"
49
50
 
1396
1397
kill_one_thread(Session *, ulong id, bool only_kill_query)
1397
1398
{
1398
1399
  Session *tmp= NULL;
1399
 
  uint32_t error=ER_NO_SUCH_THREAD;
 
1400
  uint32_t error= ER_NO_SUCH_THREAD;
1400
1401
  pthread_mutex_lock(&LOCK_thread_count); // For unlink from list
1401
1402
  
1402
1403
  for( vector<Session*>::iterator it= getSessionList().begin(); it != getSessionList().end(); ++it )
1411
1412
  pthread_mutex_unlock(&LOCK_thread_count);
1412
1413
  if (tmp)
1413
1414
  {
1414
 
    tmp->awake(only_kill_query ? Session::KILL_QUERY : Session::KILL_CONNECTION);
1415
 
    error=0;
 
1415
 
 
1416
    if (tmp->isViewable())
 
1417
    {
 
1418
      tmp->awake(only_kill_query ? Session::KILL_QUERY : Session::KILL_CONNECTION);
 
1419
      error= 0;
 
1420
    }
 
1421
 
1416
1422
    pthread_mutex_unlock(&tmp->LOCK_delete);
1417
1423
  }
1418
1424
  return(error);