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, 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_QUICK_RANGE_H
21
#define DRIZZLED_OPTIMIZER_QUICK_RANGE_H
23
#include "drizzled/memory/sql_alloc.h"
24
#include "drizzled/base.h"
32
class QuickRange : public memory::SqlAlloc
35
unsigned char *min_key;
36
unsigned char *max_key;
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 */
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,
47
const unsigned char *max_key_arg,
48
uint32_t max_length_arg,
49
key_part_map max_keypart_map_arg,
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)),
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)
62
} /* namespace optimizer */
64
} /* namespace drizzled */
66
#endif /* DRIZZLED_OPTIMIZER_QUICK_RANGE_H */