mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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
This commit is contained in:
@ -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))
|
||||
|
Reference in New Issue
Block a user