~ubuntu-branches/ubuntu/vivid/drizzle/vivid-proposed

« back to all changes in this revision

Viewing changes to drizzled/statement/execute.cc

  • Committer: Package Import Robot
  • Author(s): Tobias Frost
  • Date: 2013-08-22 20:18:31 UTC
  • mto: (20.1.1 sid)
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: package-import@ubuntu.com-20130822201831-gn3ozsh7o7wmc5tk
Tags: upstream-7.2.3
ImportĀ upstreamĀ versionĀ 7.2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
namespace drizzled {
34
34
 
35
 
void parse(drizzled::Session&, const char *inBuf, uint32_t length);
 
35
void parse(drizzled::Session&, str_ref);
36
36
 
37
37
namespace statement {
38
38
 
48
48
  to_execute(to_execute_arg)
49
49
{
50
50
}
51
 
  
 
51
 
52
52
 
53
53
bool statement::Execute::parseVariable()
54
54
{
59
59
    if (var && var->length && var->value && var->type == STRING_RESULT)
60
60
    {
61
61
      lex_string_t tmp_for_var;
62
 
      tmp_for_var.assign(var->value, var->length); 
 
62
      tmp_for_var.assign(var->value, var->length);
63
63
      to_execute.set(tmp_for_var);
64
64
 
65
65
      return true;
130
130
      boost::scoped_ptr<plugin::NullClient> null_client(new plugin::NullClient);
131
131
 
132
132
      session().setClient(null_client.get());
133
 
      
 
133
 
134
134
      bool error_occured= false;
135
135
      bool is_savepoint= false;
136
136
      {
150
150
      }
151
151
 
152
152
      // @note this is copied from code in NULL client, all of this belongs
153
 
      // in the pluggable parser pieces.  
 
153
      // in the pluggable parser pieces.
154
154
      if (not error_occured)
155
155
      {
156
156
        typedef boost::tokenizer<boost::escaped_list_separator<char> > Tokenizer;
173
173
          std::string final_sql;
174
174
          if (is_savepoint)
175
175
          {
176
 
            final_sql= error_occured ? 
177
 
              "ROLLBACK TO SAVEPOINT execute_internal_savepoint" : 
 
176
            final_sql= error_occured ?
 
177
              "ROLLBACK TO SAVEPOINT execute_internal_savepoint" :
178
178
              "RELEASE SAVEPOINT execute_internal_savepoint";
179
179
          }
180
180
          else
204
204
    }
205
205
    else
206
206
    {
207
 
      parse(session(), to_execute.data(), to_execute.size());
 
207
      parse(session(), to_execute);
208
208
    }
209
209
  }
210
210