1237.13.5
by Padraig O'Sullivan
Split some classes from the range optimizer out in to their own header and implementation files. |
1 |
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
|
2 |
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
|
|
3 |
*
|
|
4 |
* Copyright (C) 2008-2009 Sun Microsystems
|
|
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 |
||
20 |
#ifndef DRIZZLED_OPTIMIZER_QUICK_RANGE_H
|
|
21 |
#define DRIZZLED_OPTIMIZER_QUICK_RANGE_H
|
|
22 |
||
1253.1.4
by Monty Taylor
Moved sql_alloc into memory. |
23 |
#include "drizzled/memory/sql_alloc.h" |
1241.9.23
by Monty Taylor
Removed sql_table.h from server_includes.h. |
24 |
#include "drizzled/base.h" |
1241.9.20
by Monty Taylor
Removed global sql_list.h include. |
25 |
|
1237.13.5
by Padraig O'Sullivan
Split some classes from the range optimizer out in to their own header and implementation files. |
26 |
namespace drizzled |
27 |
{
|
|
28 |
||
29 |
namespace optimizer |
|
30 |
{
|
|
31 |
||
1280.1.10
by Monty Taylor
Put everything in drizzled into drizzled namespace. |
32 |
class QuickRange : public memory::SqlAlloc |
1237.13.5
by Padraig O'Sullivan
Split some classes from the range optimizer out in to their own header and implementation files. |
33 |
{
|
34 |
public: |
|
35 |
unsigned char *min_key; |
|
36 |
unsigned char *max_key; |
|
37 |
uint16_t min_length; |
|
38 |
uint16_t max_length; |
|
39 |
uint16_t flag; |
|
40 |
key_part_map min_keypart_map; /**< bitmap of used keyparts in min_key */ |
|
41 |
key_part_map max_keypart_map; /**< bitmap of used keyparts in max_key */ |
|
42 |
||
43 |
QuickRange(); /**< Constructor for a "full range" */ |
|
44 |
QuickRange(const unsigned char *min_key_arg, |
|
45 |
uint32_t min_length_arg, |
|
46 |
key_part_map min_keypart_map_arg, |
|
1240.3.1
by Brian Aker
Merge Padraig. |
47 |
const unsigned char *max_key_arg, |
1237.13.5
by Padraig O'Sullivan
Split some classes from the range optimizer out in to their own header and implementation files. |
48 |
uint32_t max_length_arg, |
49 |
key_part_map max_keypart_map_arg, |
|
50 |
uint32_t flag_arg) |
|
1240.3.1
by Brian Aker
Merge Padraig. |
51 |
:
|
1253.1.6
by Monty Taylor
Moved mem_root functions into drizzled::memory:: namespace. |
52 |
min_key((unsigned char*) memory::sql_memdup(min_key_arg,min_length_arg+1)), |
53 |
max_key((unsigned char*) memory::sql_memdup(max_key_arg,max_length_arg+1)), |
|
1237.13.5
by Padraig O'Sullivan
Split some classes from the range optimizer out in to their own header and implementation files. |
54 |
min_length((uint16_t) min_length_arg), |
55 |
max_length((uint16_t) max_length_arg), |
|
56 |
flag((uint16_t) flag_arg), |
|
57 |
min_keypart_map(min_keypart_map_arg), |
|
58 |
max_keypart_map(max_keypart_map_arg) |
|
59 |
{}
|
|
60 |
};
|
|
61 |
||
62 |
} /* namespace optimizer */ |
|
63 |
||
64 |
} /* namespace drizzled */ |
|
65 |
||
66 |
#endif /* DRIZZLED_OPTIMIZER_QUICK_RANGE_H */ |