~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session.h

  • Committer: Brian Aker
  • Date: 2008-12-05 03:17:16 UTC
  • mfrom: (641.3.11 devel)
  • Revision ID: brian@tangent.org-20081205031716-r65xkzugjylmvv1h
Monty merge (a couple of alterations for malloc()).

Show diffs side-by-side

added added

removed removed

Lines of Context:
2108
2108
{
2109
2109
  DYNAMIC_ARRAY file_ptrs;
2110
2110
  ulong max_elements;
2111
 
  uint64_t max_in_memory_size;
 
2111
  size_t max_in_memory_size;
2112
2112
  IO_CACHE file;
2113
2113
  TREE tree;
2114
2114
  unsigned char *record_pointers;
2118
2118
public:
2119
2119
  ulong elements;
2120
2120
  Unique(qsort_cmp2 comp_func, void *comp_func_fixed_arg,
2121
 
         uint32_t size_arg, uint64_t max_in_memory_size_arg);
 
2121
         uint32_t size_arg, size_t max_in_memory_size_arg);
2122
2122
  ~Unique();
2123
2123
  ulong elements_in_tree() { return tree.elements_in_tree; }
2124
2124
  inline bool unique_add(void *ptr)
2130
2130
 
2131
2131
  bool get(Table *table);
2132
2132
  static double get_use_cost(uint32_t *buffer, uint32_t nkeys, uint32_t key_size, 
2133
 
                             uint64_t max_in_memory_size);
 
2133
                             size_t max_in_memory_size);
2134
2134
  inline static int get_cost_calc_buff_size(ulong nkeys, uint32_t key_size, 
2135
 
                                            uint64_t max_in_memory_size)
 
2135
                                            size_t max_in_memory_size)
2136
2136
  {
2137
 
    register uint64_t max_elems_in_tree=
 
2137
    register size_t max_elems_in_tree=
2138
2138
      (1 + max_in_memory_size / ALIGN_SIZE(sizeof(TREE_ELEMENT)+key_size));
2139
2139
    return (int) (sizeof(uint)*(1 + nkeys/max_elems_in_tree));
2140
2140
  }