1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-02 14:22:51 +03:00

Numerous small fixes to index_merge read time estimates code

This commit is contained in:
sergefp@mysql.com
2003-12-20 00:53:14 +03:00
parent 50f29b0e9e
commit a8456e6801
7 changed files with 190 additions and 110 deletions

View File

@ -1233,8 +1233,16 @@ public:
}
bool get(TABLE *table);
static double get_use_cost(MEM_ROOT *alloc, uint nkeys, uint key_size,
static double get_use_cost(uint *buffer, uint nkeys, uint key_size,
ulong max_in_memory_size);
inline static int get_cost_calc_buff_size(ulong nkeys, uint key_size,
ulong max_in_memory_size)
{
register ulong max_elems_in_tree=
(1 + max_in_memory_size / ALIGN_SIZE(sizeof(TREE_ELEMENT)+key_size));
return sizeof(uint)*(1 + nkeys/max_elems_in_tree);
}
friend int unique_write_to_file(gptr key, element_count count, Unique *unique);
friend int unique_write_to_ptrs(gptr key, element_count count, Unique *unique);
};