~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_lex.h

  • Committer: Stewart Smith
  • Date: 2009-12-02 06:01:21 UTC
  • mto: (1237.1.2 push)
  • mto: This revision was merged to the branch mainline in revision 1238.
  • Revision ID: stewart@flamingspork.com-20091202060121-68gyfqifqcjcmi2v
my_end() no longer requires an argument (we removed them all)

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#include "drizzled/plugin/function.h"
29
29
#include "drizzled/name_resolution_context.h"
30
30
#include "drizzled/item/subselect.h"
 
31
#include "drizzled/item/outer_ref.h"
31
32
#include "drizzled/table_list.h"
32
33
#include "drizzled/function/math/real.h"
33
34
#include "drizzled/alter_drop.h"
34
35
#include "drizzled/alter_column.h"
35
36
#include "drizzled/alter_info.h"
36
 
#include "drizzled/key_part_spec.h"
 
37
#include "drizzled/key.h"
 
38
#include "drizzled/foreign_key.h"
37
39
#include "drizzled/index_hint.h"
38
40
#include "drizzled/statement.h"
39
 
#include "drizzled/optimizer/explain_plan.h"
40
41
 
41
42
#include <bitset>
42
 
#include <string>
43
 
 
44
 
namespace drizzled
45
 
{
46
43
 
47
44
class select_result_interceptor;
48
45
 
54
51
class Lex_Column;
55
52
class Item_outer_ref;
56
53
 
57
 
} /* namespace drizzled */
58
 
 
59
54
/*
60
55
  The following hack is needed because mysql_yacc.cc does not define
61
56
  YYSTYPE before including this file
68
63
#  define LEX_YYSTYPE void *
69
64
# else
70
65
#  if defined(DRIZZLE_LEX)
71
 
#   include <drizzled/foreign_key.h>
72
66
#   include <drizzled/lex_symbol.h>
73
67
#   include <drizzled/sql_yacc.h>
74
68
#   define LEX_YYSTYPE YYSTYPE *
87
81
#define DERIVED_NONE    0
88
82
#define DERIVED_SUBQUERY        1
89
83
 
90
 
namespace drizzled
91
 
{
92
 
 
93
84
typedef List<Item> List_item;
94
85
 
95
86
enum sub_select_type
255
246
 
256
247
  static void *operator new(size_t size)
257
248
  {
258
 
    return memory::sql_alloc(size);
 
249
    return sql_alloc(size);
259
250
  }
260
 
  static void *operator new(size_t size, memory::Root *mem_root)
 
251
  static void *operator new(size_t size, MEM_ROOT *mem_root)
261
252
  { return (void*) alloc_root(mem_root, (uint32_t) size); }
262
253
  static void operator delete(void *, size_t)
263
 
  {  }
264
 
  static void operator delete(void *, memory::Root *)
 
254
  { TRASH(ptr, size); }
 
255
  static void operator delete(void *, MEM_ROOT *)
265
256
  {}
266
257
  Select_Lex_Node(): linkage(UNSPECIFIED_TYPE) {}
267
258
  virtual ~Select_Lex_Node() {}
433
424
    by TableList::next_leaf, so leaf_tables points to the left-most leaf.
434
425
  */
435
426
  TableList *leaf_tables;
436
 
  enum drizzled::optimizer::select_type type; /* type of select for EXPLAIN */
 
427
  const char *type;               /* type of select for EXPLAIN          */
437
428
 
438
429
  SQL_LIST order_list;                /* ORDER clause */
439
430
  SQL_LIST *gorder_list;
683
674
    of Query_tables_list instances which are used as backup storage.
684
675
  */
685
676
  Query_tables_list() {}
686
 
  virtual ~Query_tables_list() {}
 
677
  ~Query_tables_list() {}
687
678
 
688
679
  /* Initializes (or resets) Query_tables_list object for "real" use. */
689
680
  void reset_query_tables_list(bool init);
737
728
  DISCARD_COMMENT
738
729
};
739
730
 
740
 
} /* namespace drizzled */
741
 
 
742
731
#include "drizzled/lex_input_stream.h"
743
732
 
744
 
namespace drizzled
745
 
{
746
 
 
747
733
/* The state of the lex parsing. This is saved in the Session struct */
748
734
class LEX : public Query_tables_list
749
735
{
814
800
  SQL_LIST save_list;
815
801
  CreateField *last_field;
816
802
  Item_sum *in_sum_func;
817
 
  plugin::Function *udf;
 
803
  drizzled::plugin::Function *udf;
818
804
  uint32_t type;
819
805
  /*
820
806
    This variable is used in post-parse stage to declare that sum-functions,
827
813
  */
828
814
  nesting_map allow_sum_func;
829
815
  enum_sql_command sql_command;
830
 
  statement::Statement *statement;
 
816
  drizzled::statement::Statement *statement;
831
817
  /*
832
818
    Usually `expr` rule of yacc is quite reused but some commands better
833
819
    not support subqueries which comes standard with this rule, like
842
828
    enum ha_rkey_function ha_rkey_mode;
843
829
    enum xa_option_words xa_opt;
844
830
  };
845
 
  sql_var_t option_type;
 
831
  enum enum_var_type option_type;
846
832
 
847
833
  int nest_level;
848
834
  uint8_t describe;
852
838
  */
853
839
  uint8_t derived_tables;
854
840
 
 
841
  /* Only true when FULL symbol is found (e.g. SHOW FULL PROCESSLIST) */
 
842
  bool verbose;
 
843
  
855
844
  /* Was the IGNORE symbol found in statement */
856
845
  bool ignore;
857
846
 
940
929
  @} (End of group Semantic_Analysis)
941
930
*/
942
931
 
943
 
} /* namespace drizzled */
944
 
 
945
932
#endif /* DRIZZLE_SERVER */
946
933
#endif /* DRIZZLED_SQL_LEX_H */