~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_lex.h

  • Committer: Brian Aker
  • Date: 2009-03-14 16:51:54 UTC
  • mfrom: (934.2.2 small-cleanups)
  • Revision ID: brian@tangent.org-20090314165154-qwuzmdlz35pyl6hq
Merge Jay

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
/**
24
24
  @defgroup Semantic_Analysis Semantic Analysis
25
25
*/
26
 
 
27
 
#include <drizzled/sql_udf.h>
28
 
#include <drizzled/name_resolution_context.h>
29
 
#include <drizzled/item/subselect.h>
30
 
#include <drizzled/item/param.h>
31
 
#include <drizzled/item/outer_ref.h>
32
 
#include <drizzled/table_list.h>
33
 
#include <drizzled/function/math/real.h>
34
 
#include <drizzled/alter_drop.h>
35
 
#include <drizzled/alter_column.h>
36
 
#include <drizzled/key.h>
37
 
#include <drizzled/foreign_key.h>
38
 
#include <drizzled/item/param.h>
 
26
#include "drizzled/sql_udf.h"
 
27
#include "drizzled/name_resolution_context.h"
 
28
#include "drizzled/item/subselect.h"
 
29
#include "drizzled/item/param.h"
 
30
#include "drizzled/item/outer_ref.h"
 
31
#include "drizzled/table_list.h"
 
32
#include "drizzled/function/math/real.h"
 
33
#include "drizzled/alter_drop.h"
 
34
#include "drizzled/alter_column.h"
 
35
#include "drizzled/key.h"
 
36
#include "drizzled/foreign_key.h"
 
37
#include "drizzled/item/param.h"
 
38
#include "drizzled/index_hint.h"
39
39
 
40
40
class select_result_interceptor;
41
41
class virtual_column_info;
106
106
};
107
107
 
108
108
/*
109
 
  String names used to print a statement with index hints.
110
 
  Keep in sync with index_hint_type.
111
 
*/
112
 
extern const char * index_hint_type_name[];
113
 
typedef unsigned char index_clause_map;
114
 
 
115
 
/*
116
 
  Bits in index_clause_map : one for each possible FOR clause in
117
 
  USE/FORCE/IGNORE INDEX index hint specification
118
 
*/
119
 
#define INDEX_HINT_MASK_JOIN  (1)
120
 
#define INDEX_HINT_MASK_GROUP (1 << 1)
121
 
#define INDEX_HINT_MASK_ORDER (1 << 2)
122
 
 
123
 
#define INDEX_HINT_MASK_ALL (INDEX_HINT_MASK_JOIN | INDEX_HINT_MASK_GROUP | \
124
 
                             INDEX_HINT_MASK_ORDER)
125
 
 
126
 
/* Single element of an USE/FORCE/IGNORE INDEX list specified as a SQL hint  */
127
 
class Index_hint : public Sql_alloc
128
 
{
129
 
public:
130
 
  /* The type of the hint : USE/FORCE/IGNORE */
131
 
  enum index_hint_type type;
132
 
  /* Where the hit applies to. A bitmask of INDEX_HINT_MASK_<place> values */
133
 
  index_clause_map clause;
134
 
  /*
135
 
    The index name. Empty (str=NULL) name represents an empty list
136
 
    USE INDEX () clause
137
 
  */
138
 
  LEX_STRING key_name;
139
 
 
140
 
  Index_hint (enum index_hint_type type_arg, index_clause_map clause_arg,
141
 
              char *str, uint32_t length) :
142
 
    type(type_arg), clause(clause_arg)
143
 
  {
144
 
    key_name.str= str;
145
 
    key_name.length= length;
146
 
  }
147
 
 
148
 
  void print(Session *session, String *str);
149
 
};
150
 
 
151
 
/*
152
109
  The state of the lex parsing for selects
153
110
 
154
111
   master and slaves are pointers to select_lex.