~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 20:00:00 UTC
  • mfrom: (1320.1.15 build)
  • Revision ID: brian@gaz-20100304200000-vk1jaxgf665smmv8
Merge Monty/Brian

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
 
  for( vector<Session*>::iterator it= getSessionList().begin(); it != getSessionList().end(); ++it )
 
1403
  for (SessionList::iterator it= getSessionList().begin(); it != getSessionList().end(); ++it )
1403
1404
  {
1404
1405
    if ((*it)->thread_id == id)
1405
1406
    {
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);