~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/my_hash.h

  • Committer: Andrew Hutchings
  • Date: 2011-03-29 20:45:43 UTC
  • mfrom: (2257 drizzle)
  • mto: (2257.1.3 build)
  • mto: This revision was merged to the branch mainline in revision 2258.
  • Revision ID: andrew@linuxjedi.co.uk-20110329204543-ssex0nuo8knncgwx
Merge with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
namespace drizzled {
27
27
 
28
 
typedef struct charset_info_st CHARSET_INFO;
29
 
 
30
28
/*
31
29
  Overhead to store an element in hash
32
30
  Can be used to approximate memory consumption for a hash
47
45
  unsigned char *data;
48
46
} ;
49
47
 
 
48
struct charset_info_st;
 
49
 
50
50
struct HASH
51
51
{
52
52
  // typedef std::vector<HASH_LINK> array_t;
60
60
  array_t array;
61
61
  hash_get_key get_key;
62
62
  hash_free_key free;
63
 
  const CHARSET_INFO *charset;
 
63
  const charset_info_st *charset;
64
64
};
65
65
 
66
66
/* A search iterator state */
67
67
typedef uint32_t HASH_SEARCH_STATE;
68
68
 
69
69
bool
70
 
_hash_init(HASH *hash,uint32_t growth_size, const CHARSET_INFO * const charset,
 
70
_hash_init(HASH *hash,uint32_t growth_size, const charset_info_st * const charset,
71
71
           uint32_t size, size_t key_offset, size_t key_length,
72
72
           hash_get_key get_key,
73
73
           hash_free_key free_element, uint32_t flags);