diff options
Diffstat (limited to 'sql/filesort.cc')
-rw-r--r-- | sql/filesort.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sql/filesort.cc b/sql/filesort.cc index b6a5d844eac..a8e8431267c 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -457,7 +457,7 @@ static ha_rows find_all_keys(SORTPARAM *param, SQL_SELECT *select, ref_pos= ref_buff; quick_select=select && select->quick; record=0; - flag= ((!indexfile && file->ha_table_flags() & HA_REC_NOT_IN_SEQ) + flag= ((!indexfile && (file->ha_table_flags() & HA_REC_NOT_IN_SEQ)) || quick_select); if (indexfile || flag) ref_pos= &file->ref[0]; @@ -1148,7 +1148,7 @@ int merge_buffers(SORTPARAM *param, IO_CACHE *from_file, offset= rec_length-res_length; maxcount= (ulong) (param->keys/((uint) (Tb-Fb) +1)); to_start_filepos= my_b_tell(to_file); - strpos= (uchar*) sort_buffer; + strpos= sort_buffer; org_max_rows=max_rows= param->max_rows; /* The following will fire if there is not enough space in sort_buffer */ @@ -1169,10 +1169,10 @@ int merge_buffers(SORTPARAM *param, IO_CACHE *from_file, DBUG_RETURN(1); /* purecov: inspected */ for (buffpek= Fb ; buffpek <= Tb ; buffpek++) { - buffpek->base= strpos; + buffpek->base= (uchar*) strpos; buffpek->max_keys= maxcount; strpos+= (uint) (error= (int) read_to_buffer(from_file, buffpek, - rec_length)); + rec_length)); if (error == -1) goto err; /* purecov: inspected */ buffpek->max_keys= buffpek->mem_count; // If less data in buffers than expected @@ -1261,7 +1261,7 @@ int merge_buffers(SORTPARAM *param, IO_CACHE *from_file, } } buffpek= (BUFFPEK*) queue_top(&queue); - buffpek->base= sort_buffer; + buffpek->base= (uchar*) sort_buffer; buffpek->max_keys= param->keys; /* @@ -1296,7 +1296,7 @@ int merge_buffers(SORTPARAM *param, IO_CACHE *from_file, else { register uchar *end; - strpos= buffpek->key+offset; + strpos= (uchar*) buffpek->key+offset; for (end= strpos+buffpek->mem_count*rec_length ; strpos != end ; strpos+= rec_length) |