Loading include/my_bitmap.h +1 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,7 @@ extern void bitmap_lock_xor(MY_BITMAP *map, const MY_BITMAP *map2); extern void bitmap_lock_invert(MY_BITMAP *map); #endif /* Fast, not thread safe, bitmap functions */ #define bitmap_buffer_size(bits) 4*(((bits)+31)/32); #define no_bytes_in_map(map) (((map)->n_bits + 7)/8) #define no_words_in_map(map) (((map)->n_bits + 31)/32) #define bytes_word_aligned(bytes) (4*((bytes + 3)/4)) Loading sql/handler.cc +1 −1 Original line number Diff line number Diff line Loading @@ -1304,7 +1304,7 @@ int handler::ha_initialise() int handler::ha_allocate_read_write_set(ulong no_fields) { uint bitmap_size= 4*(((no_fields+1)+31)/32); uint bitmap_size= bitmap_buffer_size(no_fields+1); uint32 *read_buf, *write_buf; #ifndef DEBUG_OFF my_bool r; Loading sql/opt_range.cc +4 −5 Original line number Diff line number Diff line Loading @@ -1652,11 +1652,10 @@ class TRP_GROUP_MIN_MAX : public TABLE_READ_PLAN 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; Loading Loading @@ -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, Loading Loading @@ -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)) Loading sql/sql_insert.cc +2 −2 Original line number Diff line number Diff line Loading @@ -700,7 +700,7 @@ static bool check_view_insertability(THD * thd, TABLE_LIST *view) *trans_end= trans_start + num; Field_translator *trans; Field **field_ptr= table->field; uint used_fields_buff_size= (table->s->fields + 7) / 8; uint used_fields_buff_size= bitmap_buffer_size(table->s->fields); uint32 *used_fields_buff= (uint32*)thd->alloc(used_fields_buff_size); MY_BITMAP used_fields; DBUG_ENTER("check_key_in_view"); Loading @@ -710,7 +710,7 @@ static bool check_view_insertability(THD * thd, TABLE_LIST *view) DBUG_ASSERT(view->table != 0 && view->field_translation != 0); bitmap_init(&used_fields, used_fields_buff, used_fields_buff_size * 8, 0); bitmap_init(&used_fields, used_fields_buff, table->s->fields, 0); bitmap_clear_all(&used_fields); view->contain_auto_increment= 0; Loading sql/sql_parse.cc +1 −0 Original line number Diff line number Diff line Loading @@ -1176,6 +1176,7 @@ pthread_handler_t handle_one_connection(void *arg) or this thread has been schedule to handle the next query */ thd= current_thd; thd->thread_stack= (char*) &thd; } while (!(test_flags & TEST_NO_THREADS)); /* The following is only executed if we are not using --one-thread */ return(0); /* purecov: deadcode */ Loading Loading
include/my_bitmap.h +1 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,7 @@ extern void bitmap_lock_xor(MY_BITMAP *map, const MY_BITMAP *map2); extern void bitmap_lock_invert(MY_BITMAP *map); #endif /* Fast, not thread safe, bitmap functions */ #define bitmap_buffer_size(bits) 4*(((bits)+31)/32); #define no_bytes_in_map(map) (((map)->n_bits + 7)/8) #define no_words_in_map(map) (((map)->n_bits + 31)/32) #define bytes_word_aligned(bytes) (4*((bytes + 3)/4)) Loading
sql/handler.cc +1 −1 Original line number Diff line number Diff line Loading @@ -1304,7 +1304,7 @@ int handler::ha_initialise() int handler::ha_allocate_read_write_set(ulong no_fields) { uint bitmap_size= 4*(((no_fields+1)+31)/32); uint bitmap_size= bitmap_buffer_size(no_fields+1); uint32 *read_buf, *write_buf; #ifndef DEBUG_OFF my_bool r; Loading
sql/opt_range.cc +4 −5 Original line number Diff line number Diff line Loading @@ -1652,11 +1652,10 @@ class TRP_GROUP_MIN_MAX : public TABLE_READ_PLAN 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; Loading Loading @@ -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, Loading Loading @@ -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)) Loading
sql/sql_insert.cc +2 −2 Original line number Diff line number Diff line Loading @@ -700,7 +700,7 @@ static bool check_view_insertability(THD * thd, TABLE_LIST *view) *trans_end= trans_start + num; Field_translator *trans; Field **field_ptr= table->field; uint used_fields_buff_size= (table->s->fields + 7) / 8; uint used_fields_buff_size= bitmap_buffer_size(table->s->fields); uint32 *used_fields_buff= (uint32*)thd->alloc(used_fields_buff_size); MY_BITMAP used_fields; DBUG_ENTER("check_key_in_view"); Loading @@ -710,7 +710,7 @@ static bool check_view_insertability(THD * thd, TABLE_LIST *view) DBUG_ASSERT(view->table != 0 && view->field_translation != 0); bitmap_init(&used_fields, used_fields_buff, used_fields_buff_size * 8, 0); bitmap_init(&used_fields, used_fields_buff, table->s->fields, 0); bitmap_clear_all(&used_fields); view->contain_auto_increment= 0; Loading
sql/sql_parse.cc +1 −0 Original line number Diff line number Diff line Loading @@ -1176,6 +1176,7 @@ pthread_handler_t handle_one_connection(void *arg) or this thread has been schedule to handle the next query */ thd= current_thd; thd->thread_stack= (char*) &thd; } while (!(test_flags & TEST_NO_THREADS)); /* The following is only executed if we are not using --one-thread */ return(0); /* purecov: deadcode */ Loading