summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
authorTor Didriksen <tor.didriksen@oracle.com>2013-11-01 16:52:21 +0100
committerTor Didriksen <tor.didriksen@oracle.com>2013-11-01 16:52:21 +0100
commitb299c74d1e1a26190073fb86fa99106930afe01c (patch)
treeee6764079cc5aa43ec1e940c698a0ced51ce0976 /sql/sql_class.h
parent62f124491c9539062609515b77179b820750fca7 (diff)
parenta990d5c715a9edc59f886ac6e890222331a58719 (diff)
downloadmariadb-git-b299c74d1e1a26190073fb86fa99106930afe01c.tar.gz
merge 5.1 => 5.5
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r--sql/sql_class.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index e3a84bf6fc8..7211eca4939 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -3454,11 +3454,13 @@ public:
bool get(TABLE *table);
static double get_use_cost(uint *buffer, uint nkeys, uint key_size,
ulonglong max_in_memory_size);
+
+ // Returns the number of bytes needed in imerge_cost_buf.
inline static int get_cost_calc_buff_size(ulong nkeys, uint key_size,
ulonglong max_in_memory_size)
{
register ulonglong max_elems_in_tree=
- (1 + max_in_memory_size / ALIGN_SIZE(sizeof(TREE_ELEMENT)+key_size));
+ (max_in_memory_size / ALIGN_SIZE(sizeof(TREE_ELEMENT)+key_size));
return (int) (sizeof(uint)*(1 + nkeys/max_elems_in_tree));
}