mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
valgrind warning. initialize found_rows earlier, before any "goto err".
This commit is contained in:
parent
3d4dbe4d94
commit
0c64cd83eb
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
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);
|
||||
DEBUG_SYNC(thd, "filesort_start");
|
||||
|
||||
|
@ -686,7 +688,8 @@ static ha_rows find_all_keys(Sort_param *param, SQL_SELECT *select,
|
|||
ref_pos= ref_buff;
|
||||
quick_select=select && select->quick;
|
||||
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);
|
||||
if (flag)
|
||||
ref_pos= &file->ref[0];
|
||||
|
|
Loading…
Reference in a new issue