summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2001-12-11 20:45:48 +0200
committerunknown <monty@hundin.mysql.fi>2001-12-11 20:45:48 +0200
commit72ec7dfc65734e623cd91d424a91ee82077fac8c (patch)
tree57c90c65e06cdd74de883d23793984c678538aa1 /innobase
parent270976699cdb21362b2d53751346937df1807957 (diff)
downloadmariadb-git-72ec7dfc65734e623cd91d424a91ee82077fac8c.tar.gz
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
Diffstat (limited to 'innobase')
-rw-r--r--innobase/os/os0file.c33
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