~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/lex_string.h

  • Committer: Brian Aker
  • Date: 2010-11-11 04:16:59 UTC
  • mto: (1932.2.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 1930.
  • Revision ID: brian@tangent.org-20101111041659-5xb7ymjrasq1520p
Adding in support for EXECUTE to have WITH NO RETURN.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
  size_t length;
37
37
} LEX_STRING;
38
38
 
 
39
struct execute_string_t : public drizzle_lex_string
 
40
{
 
41
  bool is_variable;
 
42
 
 
43
  bool isVariable() const
 
44
  {
 
45
    return is_variable;
 
46
  }
 
47
 
 
48
  void setVariable(bool arg)
 
49
  {
 
50
    is_variable= arg;
 
51
  }
 
52
 
 
53
  execute_string_t& operator=(const drizzle_lex_string& ptr)
 
54
  {
 
55
    is_variable= false;
 
56
    str= ptr.str;
 
57
    length= ptr.length;
 
58
 
 
59
    return *this;
 
60
  }
 
61
 
 
62
};
 
63
 
39
64
 
40
65
#define STRING_WITH_LEN(X) (X), (static_cast<size_t>((sizeof(X) - 1)))
41
66
#define C_STRING_WITH_LEN(X) (const_cast<char *>((X))), (static_cast<size_t>((sizeof(X) - 1)))