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 |
*
|
|
4 |
* Copyright (C) 2008 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 |
||
1
by brian
clean slate |
20 |
#ifndef _SQL_BITMAP_H_
|
21 |
#define _SQL_BITMAP_H_
|
|
22 |
||
492.1.7
by Monty Taylor
Moved test() to its own file. |
23 |
#include <drizzled/util/test.h> |
993.1.4
by Padraig O'Sullivan
Initial work on replacement of Bitmap<> from the code. Removed the Bitmap<> |
24 |
#include <drizzled/key_map.h> |
1
by brian
clean slate |
25 |
|
982.1.8
by Padraig O'Sullivan
Added new functions for adding a bitset in a thread-safe way. I created a |
26 |
#include <bitset> |
27 |
||
993.1.8
by Padraig O'Sullivan
Removed my_bitmap.[cc,h] files from the mysys directory. Also removed them |
28 |
#define BIT_NONE (~(uint32_t) 0)
|
29 |
||
553.1.2
by Monty Taylor
Moved some bitmap defines into bitmap. |
30 |
typedef uint64_t table_map; /* Used for table bits in join */ |
31 |
typedef uint32_t nesting_map; /* Used for flags of nesting constructs */ |
|
32 |
||
33 |
/*
|
|
34 |
Used to identify NESTED_JOIN structures within a join (applicable only to
|
|
35 |
structures that have not been simplified away and embed more the one
|
|
36 |
element)
|
|
37 |
*/
|
|
38 |
typedef uint64_t nested_join_map; /* Needed by sql_select.h and table.h */ |
|
39 |
||
993.1.8
by Padraig O'Sullivan
Removed my_bitmap.[cc,h] files from the mysys directory. Also removed them |
40 |
/* useful constants */
|
553.1.2
by Monty Taylor
Moved some bitmap defines into bitmap. |
41 |
extern const key_map key_map_empty; |
42 |
extern key_map key_map_full; /* Should be threaded as const */ |
|
43 |
||
982.1.8
by Padraig O'Sullivan
Added new functions for adding a bitset in a thread-safe way. I created a |
44 |
/*
|
982.1.12
by Padraig O'Sullivan
Removed the global mutex used to simplify the names of temporary tables. |
45 |
* Finds the first bit that is not set and sets
|
46 |
* it.
|
|
47 |
*
|
|
48 |
* @param the bitmap to work with
|
|
982.1.8
by Padraig O'Sullivan
Added new functions for adding a bitset in a thread-safe way. I created a |
49 |
*/
|
982.1.12
by Padraig O'Sullivan
Removed the global mutex used to simplify the names of temporary tables. |
50 |
uint32_t setNextBit(std::bitset<MAX_FIELDS> &bitmap); |
982.1.8
by Padraig O'Sullivan
Added new functions for adding a bitset in a thread-safe way. I created a |
51 |
|
52 |
/*
|
|
53 |
* Returns the position of the first bit in the
|
|
54 |
* given bitmap which is not set. If every bit is set
|
|
993.1.8
by Padraig O'Sullivan
Removed my_bitmap.[cc,h] files from the mysys directory. Also removed them |
55 |
* in the bitmap, return BIT_NONE.
|
982.1.8
by Padraig O'Sullivan
Added new functions for adding a bitset in a thread-safe way. I created a |
56 |
*
|
57 |
* @param the bitmap to work with
|
|
58 |
*/
|
|
59 |
uint32_t getFirstBitPos(const std::bitset<MAX_FIELDS> &bitmap); |
|
60 |
||
61 |
/*
|
|
62 |
* Returns true if there is any overlapping bits between
|
|
63 |
* the 2 given bitmaps.
|
|
64 |
*
|
|
65 |
* @param the first bitmap to work with
|
|
66 |
* @param the second bitmap to work with
|
|
67 |
*/
|
|
993.1.3
by Padraig O'Sullivan
Changed the isBitmappOverlapping method to take references to std::bitset as |
68 |
bool isBitmapOverlapping(const std::bitset<MAX_FIELDS> &map1, const std::bitset<MAX_FIELDS> &map2); |
982.1.8
by Padraig O'Sullivan
Added new functions for adding a bitset in a thread-safe way. I created a |
69 |
|
1
by brian
clean slate |
70 |
#endif /* _SQL_BITMAP_H_ */ |