#At file:///export/home/didrik/repo/next-mr-opt-backporting-bug52538/ based on revid:guilhem@stripped
3208 Tor Didriksen 2010-06-21
Followup to Bug #52538 Valgrind bug
Instances of Bitmap<64> are now initialized when constructed,
so there is no need to do clear_all()
@ sql/opt_range.cc
No need to do used_key_parts_map.clear_all()
@ sql/sql_base.cc
Remove unused function.
@ sql/sql_base.h
Remove unused function.
modified:
sql/opt_range.cc
sql/sql_base.cc
sql/sql_base.h
=== modified file 'sql/opt_range.cc'
--- a/sql/opt_range.cc 2010-06-18 09:32:12 +0000
+++ b/sql/opt_range.cc 2010-06-21 10:34:40 +0000
@@ -9763,7 +9763,6 @@ get_best_group_min_max(PARAM *param, SEL
uint best_param_idx= 0;
const uint pk= param->table->s->primary_key;
- uint max_key_part;
SEL_ARG *cur_index_tree= NULL;
ha_rows cur_quick_prefix_records= 0;
uint cur_param_idx=MAX_KEY;
@@ -9783,6 +9782,7 @@ get_best_group_min_max(PARAM *param, SEL
double cur_read_cost;
ha_rows cur_records;
key_map used_key_parts_map;
+ uint max_key_part= 0;
uint cur_key_infix_len= 0;
uchar cur_key_infix[MAX_KEY_LENGTH];
uint cur_used_key_parts;
@@ -9817,8 +9817,6 @@ get_best_group_min_max(PARAM *param, SEL
}
}
- max_key_part= 0;
- used_key_parts_map.clear_all();
/*
Check (GA1) for GROUP BY queries.
*/
=== modified file 'sql/sql_base.cc'
--- a/sql/sql_base.cc 2010-05-25 15:24:05 +0000
+++ b/sql/sql_base.cc 2010-06-21 10:34:40 +0000
@@ -7791,46 +7791,6 @@ bool setup_tables_and_check_access(THD *
/*
- Create a key_map from a list of index names
-
- SYNOPSIS
- get_key_map_from_key_list()
- map key_map to fill in
- table Table
- index_list List of index names
-
- RETURN
- 0 ok; In this case *map will includes the choosed index
- 1 error
-*/
-
-bool get_key_map_from_key_list(key_map *map, TABLE *table,
- List<String> *index_list)
-{
- List_iterator_fast<String> it(*index_list);
- String *name;
- uint pos;
-
- map->clear_all();
- while ((name=it++))
- {
- if (table->s->keynames.type_names == 0 ||
- (pos= find_type(&table->s->keynames, name->ptr(),
- name->length(), 1)) <=
- 0)
- {
- my_error(ER_KEY_DOES_NOT_EXITS, MYF(0), name->c_ptr(),
- table->pos_in_table_list->alias);
- map->set_all();
- return 1;
- }
- map->set_bit(pos-1);
- }
- return 0;
-}
-
-
-/*
Drops in all fields instead of current '*' field
SYNOPSIS
=== modified file 'sql/sql_base.h'
--- a/sql/sql_base.h 2010-05-13 09:36:49 +0000
+++ b/sql/sql_base.h 2010-06-21 10:34:40 +0000
@@ -113,8 +113,6 @@ bool table_is_used(TABLE *table, bool wa
TABLE *drop_locked_tables(THD *thd,const char *db, const char *table_name);
void abort_locked_tables(THD *thd,const char *db, const char *table_name);
-bool get_key_map_from_key_list(key_map *map, TABLE *table,
- List<String> *index_list);
TABLE *open_temporary_table(THD *thd, const char *path, const char *db,
const char *table_name, bool link_in_list);
TABLE *find_locked_table(TABLE *list, const char *db, const char *table_name);
Attachment: [text/bzr-bundle] bzr/tor.didriksen@sun.com-20100621103440-y6l1btdcvzbcvhek.bundle