~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/execute.cc

  • Committer: Lee Bieber
  • Date: 2010-12-23 23:11:00 UTC
  • mfrom: (2024.1.1 clean)
  • Revision ID: kalebral@gmail.com-20101223231100-0rqirgz7ugkl10yp
Merge Brian - session list cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#include "drizzled/session.h"
24
24
#include "drizzled/user_var_entry.h"
25
25
#include "drizzled/plugin/client/concurrent.h"
26
 
#include "drizzled/catalog/local.h"
27
26
#include "drizzled/execute.h"
28
27
 
29
28
namespace drizzled
53
52
  {
54
53
    plugin::client::Concurrent *client= new plugin::client::Concurrent;
55
54
    client->pushSQL(execution_string);
56
 
    Session::shared_ptr new_session= Session::make_shared(client, catalog::local());
 
55
    Session::shared_ptr new_session(new Session(client));
57
56
 
58
57
    // We set the current schema.  @todo do the same with catalog
59
58
    util::string::const_shared_ptr schema(_session.schema());
85
84
  if (wait && thread && thread->joinable())
86
85
  {
87
86
    // We want to make sure that we can be killed
88
 
    if (_session.getThread())
89
 
    {
90
 
      boost::this_thread::restore_interruption dl(_session.getThreadInterupt());
91
 
 
92
 
      try {
93
 
        thread->join();
94
 
      }
95
 
      catch(boost::thread_interrupted const&)
96
 
      {
97
 
        // Just surpress and return the error
98
 
        my_error(drizzled::ER_QUERY_INTERRUPTED, MYF(0));
99
 
        return;
100
 
      }
101
 
    }
102
 
    else
103
 
    {
 
87
    boost::this_thread::restore_interruption dl(_session.getThreadInterupt());
 
88
    try {
104
89
      thread->join();
105
90
    }
 
91
    catch(boost::thread_interrupted const&)
 
92
    {
 
93
      // Just surpress and return the error
 
94
      my_error(drizzled::ER_QUERY_INTERRUPTED, MYF(0));
 
95
 
 
96
      return;
 
97
    }
106
98
  }
107
99
}
108
100