diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-01-15 19:13:32 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-01-15 19:13:32 +0100 |
commit | d3935adf7a4ea943583e9e51fe8fa8a2c14521dd (patch) | |
tree | 4125365a32fa25dde9e79ccfb4dcd10269071607 /sql/uniques.cc | |
parent | 85ea99dcaf8fd91fa566a78062dbfa416c2309fe (diff) | |
parent | 14ba37f76f87cc48cae62eb6bdf3cda294dff78d (diff) | |
download | mariadb-git-d3935adf7a4ea943583e9e51fe8fa8a2c14521dd.tar.gz |
mysql-5.5.29 merge
Diffstat (limited to 'sql/uniques.cc')
-rw-r--r-- | sql/uniques.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/uniques.cc b/sql/uniques.cc index ae50a1d3970..69de2844f5b 100644 --- a/sql/uniques.cc +++ b/sql/uniques.cc @@ -77,7 +77,10 @@ int unique_intersect_write_to_ptrs(uchar* key, element_count count, Unique *uniq Unique::Unique(qsort_cmp2 comp_func, void * comp_func_fixed_arg, uint size_arg, ulonglong max_in_memory_size_arg, uint min_dupl_count_arg) - :max_in_memory_size(max_in_memory_size_arg), size(size_arg), elements(0) + :max_in_memory_size(max_in_memory_size_arg), + record_pointers(NULL), + size(size_arg), + elements(0) { min_dupl_count= min_dupl_count_arg; full_size= size; @@ -625,6 +628,7 @@ bool Unique::get(TABLE *table) if (my_b_tell(&file) == 0) { /* Whole tree is in memory; Don't use disk if you don't need to */ + DBUG_ASSERT(table->sort.record_pointers == NULL); if ((record_pointers=table->sort.record_pointers= (uchar*) my_malloc(size * tree.elements_in_tree, MYF(0)))) { @@ -650,6 +654,7 @@ bool Unique::get(TABLE *table) bool error=1; /* Open cached file if it isn't open */ + DBUG_ASSERT(table->sort.io_cache == NULL); outfile=table->sort.io_cache=(IO_CACHE*) my_malloc(sizeof(IO_CACHE), MYF(MY_ZEROFILL)); |