~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sj_tmp_table.h

  • Committer: Monty Taylor
  • Date: 2008-08-02 01:03:15 UTC
  • mto: (236.1.42 codestyle)
  • mto: This revision was merged to the branch mainline in revision 261.
  • Revision ID: monty@inaugust.com-20080802010315-65h5938pymg9d99z
Moved m4 macros to top-level m4 dir, per GNU standards (and where gettext wanted it :)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef DRIZZLED_SJ_TMP_TABLE_H
2
 
#define DRIZZLED_SJ_TMP_TABLE_H
3
 
 
4
 
#include <drizzled/server_includes.h>
5
 
#include "table.h"
6
 
 
7
 
/*
8
 
  Describes use of one temporary table to weed out join duplicates.
9
 
  The temporar
10
 
 
11
 
  Used to
12
 
    - create a temp table
13
 
    - when we reach the weed-out tab, walk through rowid-ed tabs and
14
 
      and copy rowids.
15
 
      For each table we need
16
 
       - rowid offset
17
 
       - null bit address.
18
 
*/
19
 
 
20
 
class SJ_TMP_TABLE : public Sql_alloc
21
 
{
22
 
public:
23
 
  /* Array of pointers to tables that should be "used" */
24
 
  class TAB
25
 
  {
26
 
  public:
27
 
    struct st_join_table *join_tab;
28
 
    uint rowid_offset;
29
 
    ushort null_byte;
30
 
    uchar null_bit;
31
 
  };
32
 
  TAB *tabs;
33
 
  TAB *tabs_end;
34
 
 
35
 
  uint null_bits;
36
 
  uint null_bytes;
37
 
  uint rowid_len;
38
 
 
39
 
  Table *tmp_table;
40
 
 
41
 
  MI_COLUMNDEF *start_recinfo;
42
 
  MI_COLUMNDEF *recinfo;
43
 
 
44
 
  /* Pointer to next table (next->start_idx > this->end_idx) */
45
 
  SJ_TMP_TABLE *next; 
46
 
};
47
 
 
48
 
Table *create_duplicate_weedout_tmp_table(THD *thd, 
49
 
                                          uint uniq_tuple_length_arg,
50
 
                                          SJ_TMP_TABLE *sjtbl);
51
 
 
52
 
#endif /* DRIZZLED_SJ_TMP_TABLE_H */