327.1.2
by Brian Aker
Commiting next pass of Table class cleanup. |
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 |
||
327.1.5
by Brian Aker
Refactor around classes. TABLE_LIST has been factored out of table.h |
39 |
Table *tmp_table; |
327.1.2
by Brian Aker
Commiting next pass of Table class cleanup. |
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 |
||
327.1.5
by Brian Aker
Refactor around classes. TABLE_LIST has been factored out of table.h |
48 |
Table *create_duplicate_weedout_tmp_table(THD *thd, |
327.1.2
by Brian Aker
Commiting next pass of Table class cleanup. |
49 |
uint uniq_tuple_length_arg, |
50 |
SJ_TMP_TABLE *sjtbl); |
|
51 |
||
52 |
#endif /* DRIZZLED_SJ_TMP_TABLE_H */ |