Commit 0c64cd83 authored by Sergei Golubchik's avatar Sergei Golubchik

valgrind warning. initialize found_rows earlier, before any "goto err".

parent 3d4dbe4d
...@@ -166,6 +166,8 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length, ...@@ -166,6 +166,8 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length,
TABLE_LIST *tab= table->pos_in_table_list; TABLE_LIST *tab= table->pos_in_table_list;
Item_subselect *subselect= tab ? tab->containing_subselect() : 0; Item_subselect *subselect= tab ? tab->containing_subselect() : 0;
*found_rows= HA_POS_ERROR;
MYSQL_FILESORT_START(table->s->db.str, table->s->table_name.str); MYSQL_FILESORT_START(table->s->db.str, table->s->table_name.str);
DEBUG_SYNC(thd, "filesort_start"); DEBUG_SYNC(thd, "filesort_start");
...@@ -686,7 +688,8 @@ static ha_rows find_all_keys(Sort_param *param, SQL_SELECT *select, ...@@ -686,7 +688,8 @@ static ha_rows find_all_keys(Sort_param *param, SQL_SELECT *select,
ref_pos= ref_buff; ref_pos= ref_buff;
quick_select=select && select->quick; quick_select=select && select->quick;
record=0; record=0;
*found_rows= pq ? 0 : HA_POS_ERROR; // don't count unless pq is used if (pq) // don't count unless pq is used
*found_rows= 0;
flag= ((file->ha_table_flags() & HA_REC_NOT_IN_SEQ) || quick_select); flag= ((file->ha_table_flags() & HA_REC_NOT_IN_SEQ) || quick_select);
if (flag) if (flag)
ref_pos= &file->ref[0]; ref_pos= &file->ref[0];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment