1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

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
This commit is contained in:
unknown
2006-11-28 00:47:21 +02:00
parent 52fc261bca
commit 129a48b0b9
12 changed files with 53 additions and 25 deletions

View File

@@ -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();