diff options
author | monty@hundin.mysql.fi <> | 2001-12-11 20:45:48 +0200 |
---|---|---|
committer | monty@hundin.mysql.fi <> | 2001-12-11 20:45:48 +0200 |
commit | 9ca9fc228300926953b91327e705e943a6caf2a2 (patch) | |
tree | 57c90c65e06cdd74de883d23793984c678538aa1 /innobase/os | |
parent | 7569535272b1cb5aa4510fd70c01cd63b02bda1d (diff) | |
download | mariadb-git-9ca9fc228300926953b91327e705e943a6caf2a2.tar.gz |
Fix for MyISAM records > 16M
Diffstat (limited to 'innobase/os')
-rw-r--r-- | innobase/os/os0file.c | 33 |
1 files changed, 15 insertions, 18 deletions
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 |