~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item_subselect.h

  • Committer: Lee
  • Date: 2008-10-03 23:31:06 UTC
  • mfrom: (413.2.3 drizzle)
  • mto: This revision was merged to the branch mainline in revision 459.
  • Revision ID: lbieber@lbieber-desktop-20081003233106-tgvzu0fh25gb3xeg
breaking out enum field classes

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
/* subselect Item */
21
21
 
 
22
#ifdef USE_PRAGMA_INTERFACE
 
23
#pragma interface                       /* gcc class implementation */
 
24
#endif
22
25
 
23
26
class st_select_lex;
24
27
class st_select_lex_unit;
50
53
  /* cache of used external tables */
51
54
  table_map used_tables_cache;
52
55
  /* allowed number of columns (1 for single value subqueries) */
53
 
  uint32_t max_columns;
 
56
  uint max_columns;
54
57
  /* where subquery is placed */
55
58
  enum_parsing_place parsing_place;
56
59
  /* work with 'substitution' */
130
133
  */
131
134
  virtual void reset_value_registration() {}
132
135
  enum_parsing_place place() { return parsing_place; }
133
 
  bool walk(Item_processor processor, bool walk_subquery, unsigned char *arg);
 
136
  bool walk(Item_processor processor, bool walk_subquery, uchar *arg);
134
137
 
135
138
  /**
136
139
    Get the SELECT_LEX structure associated with this Item.
164
167
 
165
168
  void reset();
166
169
  trans_res select_transformer(JOIN *join);
167
 
  void store(uint32_t i, Item* item);
 
170
  void store(uint i, Item* item);
168
171
  double val_real();
169
172
  int64_t val_int ();
170
173
  String *val_str (String *);
174
177
  enum_field_types field_type() const;
175
178
  void fix_length_and_dec();
176
179
 
177
 
  uint32_t cols();
178
 
  Item* element_index(uint32_t i) { return reinterpret_cast<Item*>(row[i]); }
179
 
  Item** addr(uint32_t i) { return (Item**)row + i; }
180
 
  bool check_cols(uint32_t c);
 
180
  uint cols();
 
181
  Item* element_index(uint i) { return my_reinterpret_cast(Item*)(row[i]); }
 
182
  Item** addr(uint i) { return (Item**)row + i; }
 
183
  bool check_cols(uint c);
181
184
  bool null_inside();
182
185
  void bring_value();
183
186
 
354
357
  bool fix_fields(THD *thd, Item **ref);
355
358
  bool setup_engine();
356
359
  bool init_left_expr_cache();
357
 
  bool is_expensive_processor(unsigned char *arg);
 
360
  bool is_expensive_processor(uchar *arg);
358
361
 
359
362
  friend class Item_ref_null_helper;
360
363
  friend class Item_is_not_null_test;
438
441
          caller should call exec() again for the new engine.
439
442
  */
440
443
  virtual int exec()= 0;
441
 
  virtual uint32_t cols()= 0; /* return number of columns in select */
 
444
  virtual uint cols()= 0; /* return number of columns in select */
442
445
  virtual uint8_t uncacheable()= 0; /* query is uncacheable */
443
446
  enum Item_result type() { return res_type; }
444
447
  enum_field_types field_type() { return res_field_type; }
475
478
  int prepare();
476
479
  void fix_length_and_dec(Item_cache** row);
477
480
  int exec();
478
 
  uint32_t cols();
 
481
  uint cols();
479
482
  uint8_t uncacheable();
480
483
  void exclude();
481
484
  table_map upper_select_const_tables();
503
506
  int prepare();
504
507
  void fix_length_and_dec(Item_cache** row);
505
508
  int exec();
506
 
  uint32_t cols();
 
509
  uint cols();
507
510
  uint8_t uncacheable();
508
511
  void exclude();
509
512
  table_map upper_select_const_tables();
560
563
  int prepare();
561
564
  void fix_length_and_dec(Item_cache** row);
562
565
  int exec();
563
 
  uint32_t cols() { return 1; }
 
566
  uint cols() { return 1; }
564
567
  uint8_t uncacheable() { return UNCACHEABLE_DEPENDENT; }
565
568
  void exclude();
566
569
  table_map upper_select_const_tables() { return 0; }
677
680
  int prepare() { return 0; }
678
681
  int exec();
679
682
  virtual void print (String *str, enum_query_type query_type);
680
 
  uint32_t cols()
 
683
  uint cols()
681
684
  {
682
685
    return materialize_engine->cols();
683
686
  }