1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2008-2009 Sun Microsystems
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; either version 2 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
* Defines the JoinTable class which is the primary class
25
* used in the nested loops join implementation.
28
#ifndef DRIZZLED_TABLE_REFERENCE_H
29
#define DRIZZLED_TABLE_REFERENCE_H
33
typedef struct st_table_ref
36
uint32_t key_parts; /**< num of key parts */
37
uint32_t key_length; /**< length of key_buff */
38
int32_t key; /**< key no (index) */
39
unsigned char *key_buff; /**< value to look for with key */
40
unsigned char *key_buff2; /**< key_buff+key_length */
41
StoredKey **key_copy; /**< No idea what this does... */
42
Item **items; /**< val()'s for each keypart */
44
Array of pointers to trigger variables. Some/all of the pointers may be
45
NULL. The ref access can be used iff
47
for each used key part i, (!cond_guards[i] || *cond_guards[i])
49
This array is used by subquery code. The subquery code may inject
50
triggered conditions, i.e. conditions that can be 'switched off'. A ref
51
access created from such condition is not valid when at least one of the
52
underlying conditions is switched off (see subquery code for more details)
56
(null_rejecting & (1<<i)) means the condition is '=' and no matching
57
rows will be produced if items[i] IS NULL (see add_not_null_conds())
59
key_part_map null_rejecting;
60
table_map depend_map; /**< Table depends on these tables. */
61
/** null byte position in the key_buf. Used for REF_OR_NULL optimization */
62
unsigned char *null_ref_key;
64
true <=> disable the "cache" as doing lookup with the same key value may
65
produce different results (because of Index Condition Pushdown)
70
#endif /* DRIZZLED_TABLE_REFERENCE_H */