--- mysql-5.6.2-m5/storage/innobase/os/os0file.c~ 2011-03-14 09:40:38.000000000 -0400 +++ mysql-5.6.2-m5/storage/innobase/os/os0file.c 2011-04-18 16:10:49.000000000 -0400 @@ -1895,13 +1895,13 @@ return(FALSE); } - if (sizeof(off_t) > 4) { - *size = (ulint)(offs & 0xFFFFFFFFUL); - *size_high = (ulint)(offs >> 32); - } else { - *size = (ulint) offs; - *size_high = 0; - } +#if SIZEOF_OFF_T > 4 + *size = (ulint)(offs & 0xFFFFFFFFUL); + *size_high = (ulint)(offs >> 32); +#else + *size = (ulint) offs; + *size_high = 0; +#endif return(TRUE); #endif @@ -2210,17 +2210,16 @@ /* If off_t is > 4 bytes in size, then we assume we can pass a 64-bit address */ - if (sizeof(off_t) > 4) { - offs = (off_t)offset + (((off_t)offset_high) << 32); - - } else { - offs = (off_t)offset; +#if SIZEOF_OFF_T > 4 + offs = (off_t)offset + (((off_t)offset_high) << 32); +#else + offs = (off_t)offset; - if (offset_high > 0) { - fprintf(stderr, - "InnoDB: Error: file read at offset > 4 GB\n"); - } + if (offset_high > 0) { + fprintf(stderr, + "InnoDB: Error: file read at offset > 4 GB\n"); } +#endif os_n_file_reads++; @@ -2305,17 +2304,17 @@ /* If off_t is > 4 bytes in size, then we assume we can pass a 64-bit address */ - if (sizeof(off_t) > 4) { - offs = (off_t)offset + (((off_t)offset_high) << 32); - } else { - offs = (off_t)offset; +#if SIZEOF_OFF_T > 4 + offs = (off_t)offset + (((off_t)offset_high) << 32); +#else + offs = (off_t)offset; - if (offset_high > 0) { - fprintf(stderr, - "InnoDB: Error: file write" - " at offset > 4 GB\n"); - } + if (offset_high > 0) { + fprintf(stderr, + "InnoDB: Error: file write" + " at offset > 4 GB\n"); } +#endif os_n_file_writes++; --- mysql-5.6.2-m5/sql/filesort.cc~ 2011-03-14 09:40:39.000000000 -0400 +++ mysql-5.6.2-m5/sql/filesort.cc 2011-04-18 16:10:49.000000000 -0400 @@ -776,7 +776,11 @@ MYF(MY_WME))) goto err; /* purecov: inspected */ /* check we won't have more buffpeks than we can possibly keep in memory */ +#if SIZEOF_INT > 4 if (my_b_tell(buffpek_pointers) + sizeof(BUFFPEK) > (ulonglong)UINT_MAX) +#else + if (my_b_tell(buffpek_pointers) + sizeof(BUFFPEK) > (ulong)UINT_MAX) +#endif goto err; buffpek.file_pos= my_b_tell(tempfile); if ((ha_rows) count > param->max_rows)