~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_select.h

  • Committer: Brian Aker
  • Date: 2008-08-15 21:14:46 UTC
  • mto: This revision was merged to the branch mainline in revision 346.
  • Revision ID: brian@tangent.org-20080815211446-aqtozo1hoe8mb2az
Commiting next pass of Table class cleanup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
366
366
} ROLLUP;
367
367
 
368
368
 
369
 
/*
370
 
  Describes use of one temporary table to weed out join duplicates.
371
 
  The temporar
372
 
 
373
 
  Used to
374
 
    - create a temp table
375
 
    - when we reach the weed-out tab, walk through rowid-ed tabs and
376
 
      and copy rowids.
377
 
      For each table we need
378
 
       - rowid offset
379
 
       - null bit address.
380
 
*/
381
 
 
382
 
class SJ_TMP_TABLE : public Sql_alloc
383
 
{
384
 
public:
385
 
  /* Array of pointers to tables that should be "used" */
386
 
  class TAB
387
 
  {
388
 
  public:
389
 
    JOIN_TAB *join_tab;
390
 
    uint rowid_offset;
391
 
    ushort null_byte;
392
 
    uchar null_bit;
393
 
  };
394
 
  TAB *tabs;
395
 
  TAB *tabs_end;
396
 
 
397
 
  uint null_bits;
398
 
  uint null_bytes;
399
 
  uint rowid_len;
400
 
 
401
 
  TABLE *tmp_table;
402
 
 
403
 
  MI_COLUMNDEF *start_recinfo;
404
 
  MI_COLUMNDEF *recinfo;
405
 
 
406
 
  /* Pointer to next table (next->start_idx > this->end_idx) */
407
 
  SJ_TMP_TABLE *next; 
408
 
};
409
 
 
410
 
 
411
369
class JOIN :public Sql_alloc
412
370
{
413
371
  JOIN(const JOIN &rhs);                        /**< not implemented */
703
661
                       uint elements, List<Item> &fields);
704
662
void copy_fields(TMP_TABLE_PARAM *param);
705
663
void copy_funcs(Item **func_ptr);
706
 
bool create_myisam_from_heap(THD *thd, TABLE *table,
707
 
                             MI_COLUMNDEF *start_recinfo,
708
 
                             MI_COLUMNDEF **recinfo, 
709
 
                             int error, bool ignore_last_dupp_key_error);
710
664
uint find_shortest_key(TABLE *table, const key_map *usable_keys);
711
665
Field* create_tmp_field_from_field(THD *thd, Field* org_field,
712
666
                                   const char *name, TABLE *table,