~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/lex_string.h

  • Committer: patrick crews
  • Date: 2011-06-08 03:02:27 UTC
  • mto: This revision was merged to the branch mainline in revision 2329.
  • Revision ID: gleebix@gmail.com-20110608030227-updkyv2652zvfajc
Initial voodoo worked to give us a crashme mode.  Need docs still

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems
 
4
 *  Copyright (C) 2008 Sun Microsystems, Inc.
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#ifndef DRIZZLED_LEX_STRING_H
21
 
#define DRIZZLED_LEX_STRING_H
 
20
#pragma once
22
21
 
23
22
#include <stddef.h>
24
23
 
30
29
*/
31
30
 
32
31
/* This definition must match the one given in mysql/plugin.h */
33
 
typedef struct drizzle_lex_string
 
32
typedef struct lex_string_t
34
33
{
35
34
  char *str;
36
35
  size_t length;
37
36
} LEX_STRING;
38
37
 
39
 
struct execute_string_t : public drizzle_lex_string
 
38
inline const LEX_STRING &null_lex_string()
 
39
{
 
40
  static LEX_STRING tmp= { NULL, 0 };
 
41
  return tmp;
 
42
}
 
43
 
 
44
#define NULL_LEX_STRING null_lex_string()
 
45
 
 
46
struct execute_string_t : public lex_string_t
40
47
{
41
48
private:
42
49
  bool is_variable;
47
54
    return is_variable;
48
55
  }
49
56
 
50
 
  void set(const drizzle_lex_string& ptr, bool is_variable_arg= false)
 
57
  void set(const lex_string_t& ptr, bool is_variable_arg= false)
51
58
  {
52
59
    is_variable= is_variable_arg;
53
60
    str= ptr.str;
62
69
 
63
70
} /* namespace drizzled */
64
71
 
65
 
#endif /* DRIZZLED_LEX_STRING_H */