summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
authorunknown <monty@mysql.com/nosik.monty.fi>2006-11-28 00:47:21 +0200
committerunknown <monty@mysql.com/nosik.monty.fi>2006-11-28 00:47:21 +0200
commit129a48b0b94e95e1a5750b496469a2089d14dc8b (patch)
tree6f911f150de38ce4738b30731deaf7bab1ad02d1 /sql/sql_class.h
parent52fc261bcab0becc9d23f8d1e511760413a6d85d (diff)
downloadmariadb-git-129a48b0b94e95e1a5750b496469a2089d14dc8b.tar.gz
Increased heap max length to > 4G for 64 bit machines
Initialize key_part->type on open. This caused key_copy() to fail for bit_fields. (key_copy is used in HANDLER and opt_range) include/heap.h: Increased heap max length to > 4G for 64 bit machines mysql-test/r/show_check.result: Updated results after heap size change mysql-test/r/type_bit.result: Added test for bug in bit field handling (in handler and opt_range.cc) mysql-test/t/type_bit.test: Added test for bug in bit field handling (in handler and opt_range.cc) sql/ha_heap.cc: Increased heap max length to > 4G for 64 bit machines sql/item_sum.cc: Increased heap max length to > 4G for 64 bit machines sql/mysqld.cc: Increased heap max length to > 4G for 64 bit machines sql/set_var.cc: Increased heap max length to > 4G for 64 bit machines sql/sql_class.h: Increased heap max length to > 4G for 64 bit machines sql/sql_select.cc: Increased heap max length to > 4G for 64 bit machines sql/table.cc: Initialize key_part->type ; This was used for bit fields but only set in temporary tables sql/uniques.cc: Increased heap max length to > 4G for 64 bit machines
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r--sql/sql_class.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 2467385b679..e3ae682edae 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -495,6 +495,8 @@ struct system_variables
{
ulonglong myisam_max_extra_sort_file_size;
ulonglong myisam_max_sort_file_size;
+ ulonglong max_heap_table_size;
+ ulonglong tmp_table_size;
ha_rows select_limit;
ha_rows max_join_size;
ulong auto_increment_increment, auto_increment_offset;
@@ -503,7 +505,6 @@ struct system_variables
ulong long_query_time;
ulong max_allowed_packet;
ulong max_error_count;
- ulong max_heap_table_size;
ulong max_length_for_sort_data;
ulong max_sort_length;
ulong max_tmp_tables;
@@ -527,7 +528,6 @@ struct system_variables
ulong div_precincrement;
ulong sortbuff_size;
ulong table_type;
- ulong tmp_table_size;
ulong tx_isolation;
ulong completion_type;
/* Determines which non-standard SQL behaviour should be enabled */
@@ -2068,7 +2068,8 @@ class user_var_entry
class Unique :public Sql_alloc
{
DYNAMIC_ARRAY file_ptrs;
- ulong max_elements, max_in_memory_size;
+ ulong max_elements;
+ ulonglong max_in_memory_size;
IO_CACHE file;
TREE tree;
byte *record_pointers;
@@ -2078,7 +2079,7 @@ class Unique :public Sql_alloc
public:
ulong elements;
Unique(qsort_cmp2 comp_func, void *comp_func_fixed_arg,
- uint size_arg, ulong max_in_memory_size_arg);
+ uint size_arg, ulonglong max_in_memory_size_arg);
~Unique();
ulong elements_in_tree() { return tree.elements_in_tree; }
inline bool unique_add(void *ptr)
@@ -2092,13 +2093,13 @@ public:
bool get(TABLE *table);
static double get_use_cost(uint *buffer, uint nkeys, uint key_size,
- ulong max_in_memory_size);
+ ulonglong max_in_memory_size);
inline static int get_cost_calc_buff_size(ulong nkeys, uint key_size,
- ulong max_in_memory_size)
+ ulonglong max_in_memory_size)
{
- register ulong max_elems_in_tree=
+ register ulonglong 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);
+ return (int) (sizeof(uint)*(1 + nkeys/max_elems_in_tree));
}
void reset();