~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/key.h

  • Committer: Brian Aker
  • Date: 2010-11-08 18:24:58 UTC
  • mto: (1921.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 1916.
  • Revision ID: brian@tangent.org-20101108182458-twv4hyix43ojno80
Merge in changes such that lock is now broken out into its own directory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#define DRIZZLED_KEY_H
23
23
 
24
24
#include <string>
 
25
#include <boost/dynamic_bitset.hpp>
25
26
 
26
27
#include "drizzled/memory/sql_alloc.h"
27
28
#include "drizzled/key_part_spec.h"
36
37
namespace memory { class Root; }
37
38
 
38
39
class Item;
39
 
class MyBitmap;
40
40
 
41
41
class Key :public memory::SqlAlloc {
42
42
public:
69
69
};
70
70
 
71
71
 
72
 
int find_ref_key(KEY *key, uint32_t key_count, unsigned char *record, Field *field,
 
72
int find_ref_key(KeyInfo *key, uint32_t key_count, unsigned char *record, Field *field,
73
73
                 uint32_t *key_length, uint32_t *keypart);
74
74
/**
75
75
  Copy part of a record that forms a key or key prefix to a buffer.
86
86
  @param key_length  specifies length of all keyparts that will be copied
87
87
*/
88
88
 
89
 
void key_copy(unsigned char *to_key, unsigned char *from_record, KEY *key_info, uint32_t key_length);
 
89
void key_copy(unsigned char *to_key, unsigned char *from_record, KeyInfo *key_info, uint32_t key_length);
90
90
void key_copy(std::basic_string<unsigned char> &to_key,
91
 
              unsigned char *from_record, KEY *key_info, uint32_t key_length);
92
 
void key_restore(unsigned char *to_record, unsigned char *from_key, KEY *key_info,
 
91
              unsigned char *from_record, KeyInfo *key_info, uint32_t key_length);
 
92
void key_restore(unsigned char *to_record, unsigned char *from_key, KeyInfo *key_info,
93
93
                 uint16_t key_length);
94
 
void key_zero_nulls(unsigned char *tuple, KEY *key_info);
 
94
void key_zero_nulls(unsigned char *tuple, KeyInfo *key_info);
95
95
bool key_cmp_if_same(Table *form,const unsigned char *key,uint32_t index,uint32_t key_length);
96
96
void key_unpack(String *to,Table *form,uint32_t index);
97
 
bool is_key_used(Table *table, uint32_t idx, const MyBitmap *fields);
98
 
int key_cmp(KEY_PART_INFO *key_part, const unsigned char *key, uint32_t key_length);
99
 
extern "C" int key_rec_cmp(void *key_info, unsigned char *a, unsigned char *b);
 
97
bool is_key_used(Table *table, uint32_t idx, const boost::dynamic_bitset<>& fields);
 
98
int key_cmp(KeyPartInfo *key_part, const unsigned char *key, uint32_t key_length);
100
99
 
101
100
} /* namespace drizzled */
102
101