From 72ec7dfc65734e623cd91d424a91ee82077fac8c Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 11 Dec 2001 20:45:48 +0200 Subject: Fix for MyISAM records > 16M Docs/manual.texi: ChangeLog innobase/os/os0file.c: Removed compiler warnings myisam/mi_check.c: Fix for records > 16M myisam/mi_dynrec.c: Fix for records > 16M myisam/myisamdef.h: Fix for records > 16M sql/sql_select.cc: Cleanup sql/sql_yacc.yy: F --- innobase/os/os0file.c | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) (limited to 'innobase') diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c index 9fecf2c04fd..a7cd31af2ee 100644 --- a/innobase/os/os0file.c +++ b/innobase/os/os0file.c @@ -457,14 +457,13 @@ os_file_get_size( offs = lseek(file, 0, SEEK_END); - if (sizeof(off_t) > 4) { - *size = (ulint)(offs & 0xFFFFFFFF); - *size_high = (ulint)(offs >> 32); - } else { - *size = (ulint) offs; - *size_high = 0; - } - +#if SIZEOF_OFF_T > 4 + *size = (ulint)(offs & 0xFFFFFFFF); + *size_high = (ulint)(offs >> 32); +#else + *size = (ulint) offs; + *size_high = 0; +#endif return(TRUE); #endif } @@ -614,18 +613,16 @@ os_file_pread( /* 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++; #ifdef HAVE_PREAD -- cgit v1.2.1