1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2009 Sun Microsystems, Inc.
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.
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.
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
20
#ifndef DRIZZLED_OPTIMIZER_KEY_USE_H
21
#define DRIZZLED_OPTIMIZER_KEY_USE_H
42
null_rejecting(false),
46
KeyUse(Table *in_table,
48
table_map in_used_tables,
52
key_part_map in_keypart_map,
53
ha_rows in_ref_table_rows,
54
bool in_null_rejecting,
59
used_tables(in_used_tables),
62
optimize(in_optimize),
63
keypart_map(in_keypart_map),
64
ref_table_rows(in_ref_table_rows),
65
null_rejecting(in_null_rejecting),
66
cond_guard(in_cond_guard)
79
table_map getUsedTables()
84
uint32_t getKey() const
89
uint32_t getKeypart() const
94
uint32_t getOptimizeFlags() const
99
key_part_map getKeypartMap()
104
ha_rows getTableRows() const
106
return ref_table_rows;
109
void setTableRows(ha_rows input)
111
ref_table_rows= input;
114
bool isNullRejected() const
116
return null_rejecting;
119
bool *getConditionalGuard()
126
Table *table; /**< Pointer to the table this key belongs to */
128
Item *val; /**< or value if no field */
130
table_map used_tables;
136
uint32_t optimize; /**< 0, or KEY_OPTIMIZE_* */
138
key_part_map keypart_map;
140
ha_rows ref_table_rows;
143
* If true, the comparison this value was created from will not be
144
* satisfied if val has NULL 'value'.
149
* !NULL - This KeyUse was created from an equality that was wrapped into
150
* an Item_func_trig_cond. This means the equality (and validity of
151
* this KeyUse element) can be turned on and off. The on/off state
152
* is indicted by the pointed value:
153
* *cond_guard == true <=> equality condition is on
154
* *cond_guard == false <=> equality condition is off
156
* NULL - Otherwise (the source equality can't be turned off)
161
} /* end namespace optimizer */
163
} /* end namespace drizzled */
165
#endif /* DRIZZLED_OPTIMIZER_KEY_USE_H */