diff options
author | unknown <monty@mysql.com> | 2005-11-24 06:15:35 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2005-11-24 06:15:35 +0200 |
commit | 0db7a010e4696a289c38e11eba9d6c6528e45d5c (patch) | |
tree | 679304b4beec8c60c002eae5bc3e5a5438cb6df3 /sql/opt_range.cc | |
parent | 81b2bbac056f21b0783f21a5830c07aba4850d85 (diff) | |
download | mariadb-git-0db7a010e4696a289c38e11eba9d6c6528e45d5c.tar.gz |
Added bitmap_buffer_size()
Removed valgrind warnings when using not aligned bitmap buffer size
Added setting of thread_stack
include/my_bitmap.h:
Added bitmap_buffer_size()
sql/handler.cc:
use bitmap_buffer_size()
sql/opt_range.cc:
use bitmap_buffer_size()
sql/sql_insert.cc:
Use bitmap_buffer_size()
sql/sql_parse.cc:
Added setting of thread_stack when taking thread from thread cache
sql/sql_plugin.cc:
Set thread_stack
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r-- | sql/opt_range.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 21a3f87e0fd..766eb0d01f9 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -1652,11 +1652,10 @@ public: static int fill_used_fields_bitmap(PARAM *param) { TABLE *table= param->table; - param->fields_bitmap_size= (table->s->fields/8 + 1); + param->fields_bitmap_size= bitmap_buffer_size(table->s->fields+1); uint32 *tmp; uint pk; - if (!(tmp= (uint32*)alloc_root(param->mem_root, - bytes_word_aligned(param->fields_bitmap_size))) || + if (!(tmp= (uint32*) alloc_root(param->mem_root,param->fields_bitmap_size)) || bitmap_init(¶m->needed_fields, tmp, param->fields_bitmap_size*8, FALSE)) return 1; @@ -2415,7 +2414,7 @@ ROR_SCAN_INFO *make_ror_scan(const PARAM *param, int idx, SEL_ARG *sel_arg) ror_scan->records= param->table->quick_rows[keynr]; if (!(bitmap_buf= (uint32*)alloc_root(param->mem_root, - bytes_word_aligned(param->fields_bitmap_size)))) + param->fields_bitmap_size))) DBUG_RETURN(NULL); if (bitmap_init(&ror_scan->covered_fields, bitmap_buf, @@ -2535,7 +2534,7 @@ ROR_INTERSECT_INFO* ror_intersect_init(const PARAM *param) return NULL; info->param= param; if (!(buf= (uint32*)alloc_root(param->mem_root, - bytes_word_aligned(param->fields_bitmap_size)))) + param->fields_bitmap_size))) return NULL; if (bitmap_init(&info->covered_fields, buf, param->fields_bitmap_size*8, FALSE)) |