diff --git a/sql/parse_file.cc b/sql/parse_file.cc index 5bc16e55ec0..3ccbfba5aff 100644 --- a/sql/parse_file.cc +++ b/sql/parse_file.cc @@ -381,7 +381,7 @@ sql_parse_prepare(const LEX_STRING *file_name, MEM_ROOT *mem_root, DBUG_RETURN(0); } - if (!(parser->buff= (char*) alloc_root(mem_root, stat_info.st_size+1))) + if (!(parser->buff= (char*) alloc_root(mem_root, (size_t)(stat_info.st_size+1)))) { DBUG_RETURN(0); } @@ -392,7 +392,7 @@ sql_parse_prepare(const LEX_STRING *file_name, MEM_ROOT *mem_root, } if ((len= my_read(file, (uchar *)parser->buff, - stat_info.st_size, MYF(MY_WME))) == + (size_t) stat_info.st_size, MYF(MY_WME))) == MY_FILE_ERROR) { my_close(file, MYF(MY_WME)); diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 3ee038e8aff..79ec2bd58d1 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -9540,7 +9540,7 @@ double JOIN_TAB::scan_time() else { found_records= records=table->file->stats.records; - read_time= found_records ? found_records: 10;// TODO:fix this stub + read_time= found_records ? (double)found_records: 10.0;// TODO:fix this stub res= read_time; } return res;