~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/execute.cc

  • Committer: Brian Aker
  • Date: 2010-12-26 22:31:33 UTC
  • mto: This revision was merged to the branch mainline in revision 2036.
  • Revision ID: brian@tangent.org-20101226223133-6470gt27jtgm9k7z
FurtherĀ encapsulationĀ forĀ DECIMAL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#include <config.h>
 
21
#include "config.h"
22
22
 
23
 
#include <drizzled/session.h>
24
 
#include <drizzled/user_var_entry.h>
25
 
#include <drizzled/plugin/client/concurrent.h>
26
 
#include <drizzled/catalog/local.h>
27
 
#include <drizzled/execute.h>
 
23
#include "drizzled/session.h"
 
24
#include "drizzled/user_var_entry.h"
 
25
#include "drizzled/plugin/client/concurrent.h"
 
26
#include "drizzled/execute.h"
28
27
 
29
28
namespace drizzled
30
29
{
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