390.1.2
by Monty Taylor
Fixed copyright headers in drizzled/ |
1 |
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
|
2 |
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
|
|
3 |
*
|
|
1010
by Brian Aker
Replacing Sun employee copyright headers (aka... anything done by a Sun |
4 |
* Copyright (C) 2008 Sun Microsystems
|
390.1.2
by Monty Taylor
Fixed copyright headers in drizzled/ |
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or modify
|
|
7 |
* it under the terms of the GNU General Public License as published by
|
|
8 |
* the Free Software Foundation; version 2 of the License.
|
|
9 |
*
|
|
10 |
* This program is distributed in the hope that it will be useful,
|
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13 |
* GNU General Public License for more details.
|
|
14 |
*
|
|
15 |
* You should have received a copy of the GNU General Public License
|
|
16 |
* along with this program; if not, write to the Free Software
|
|
17 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
18 |
*/
|
|
19 |
||
327.1.2
by Brian Aker
Commiting next pass of Table class cleanup. |
20 |
#ifndef DRIZZLED_SJ_TMP_TABLE_H
|
21 |
#define DRIZZLED_SJ_TMP_TABLE_H
|
|
22 |
||
23 |
#include <drizzled/server_includes.h> |
|
24 |
#include "table.h" |
|
25 |
||
26 |
/*
|
|
27 |
Describes use of one temporary table to weed out join duplicates.
|
|
28 |
The temporar
|
|
29 |
||
30 |
Used to
|
|
31 |
- create a temp table
|
|
32 |
- when we reach the weed-out tab, walk through rowid-ed tabs and
|
|
33 |
and copy rowids.
|
|
34 |
For each table we need
|
|
35 |
- rowid offset
|
|
36 |
- null bit address.
|
|
37 |
*/
|
|
38 |
||
39 |
class SJ_TMP_TABLE : public Sql_alloc |
|
40 |
{
|
|
41 |
public: |
|
42 |
/* Array of pointers to tables that should be "used" */
|
|
43 |
class TAB |
|
44 |
{
|
|
45 |
public: |
|
46 |
struct st_join_table *join_tab; |
|
438.1.13
by Brian Aker
uint cleanup. |
47 |
uint32_t rowid_offset; |
48 |
uint16_t null_byte; |
|
49 |
unsigned char null_bit; |
|
327.1.2
by Brian Aker
Commiting next pass of Table class cleanup. |
50 |
};
|
51 |
TAB *tabs; |
|
52 |
TAB *tabs_end; |
|
53 |
||
438.1.13
by Brian Aker
uint cleanup. |
54 |
uint32_t null_bits; |
55 |
uint32_t null_bytes; |
|
56 |
uint32_t rowid_len; |
|
327.1.2
by Brian Aker
Commiting next pass of Table class cleanup. |
57 |
|
327.1.5
by Brian Aker
Refactor around classes. TABLE_LIST has been factored out of table.h |
58 |
Table *tmp_table; |
327.1.2
by Brian Aker
Commiting next pass of Table class cleanup. |
59 |
|
60 |
MI_COLUMNDEF *start_recinfo; |
|
61 |
MI_COLUMNDEF *recinfo; |
|
62 |
||
63 |
/* Pointer to next table (next->start_idx > this->end_idx) */
|
|
660.1.3
by Eric Herman
removed trailing whitespace with simple script: |
64 |
SJ_TMP_TABLE *next; |
327.1.2
by Brian Aker
Commiting next pass of Table class cleanup. |
65 |
};
|
66 |
||
660.1.3
by Eric Herman
removed trailing whitespace with simple script: |
67 |
Table *create_duplicate_weedout_tmp_table(Session *session, |
438.1.13
by Brian Aker
uint cleanup. |
68 |
uint32_t uniq_tuple_length_arg, |
327.1.2
by Brian Aker
Commiting next pass of Table class cleanup. |
69 |
SJ_TMP_TABLE *sjtbl); |
70 |
||
71 |
#endif /* DRIZZLED_SJ_TMP_TABLE_H */ |