diff options
author | unknown <heikki@hundin.mysql.fi> | 2002-09-20 05:11:08 +0300 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2002-09-20 05:11:08 +0300 |
commit | b8cfcf768ef493218b3917caf179c90c00632452 (patch) | |
tree | 83fa0b9921ca4d827b9a72cf561764aaaa2e4296 /innobase/os | |
parent | ebf518bc45b19cc0118422773c99d16b84420518 (diff) | |
download | mariadb-git-b8cfcf768ef493218b3917caf179c90c00632452.tar.gz |
Many files:
Modifications for query cache + trxs, fix of q.c.+ foreign keys
os0file.c:
Use unbuffered i/o in Windows
innobase/dict/dict0mem.c:
Modifications for query cache + trxs, fix of q.c.+ foreign keys
innobase/os/os0file.c:
Use unbuffered i/o in Windows
innobase/lock/lock0lock.c:
Modifications for query cache + trxs, fix of q.c.+ foreign keys
innobase/row/row0ins.c:
Modifications for query cache + trxs, fix of q.c.+ foreign keys
innobase/row/row0mysql.c:
Modifications for query cache + trxs, fix of q.c.+ foreign keys
innobase/row/row0sel.c:
Modifications for query cache + trxs, fix of q.c.+ foreign keys
innobase/srv/srv0srv.c:
Modifications for query cache + trxs, fix of q.c.+ foreign keys
sql/ha_innodb.h:
Modifications for query cache + trxs, fix of q.c.+ foreign keys
sql/ha_innodb.cc:
Modifications for query cache + trxs, fix of q.c.+ foreign keys
Diffstat (limited to 'innobase/os')
-rw-r--r-- | innobase/os/os0file.c | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c index 1da66fdc512..b2881581fc7 100644 --- a/innobase/os/os0file.c +++ b/innobase/os/os0file.c @@ -669,13 +669,14 @@ os_file_get_size( return(FALSE); } -#if SIZEOF_OFF_T > 4 - *size = (ulint)(offs & 0xFFFFFFFF); - *size_high = (ulint)(offs >> 32); -#else - *size = (ulint) offs; - *size_high = 0; -#endif + if (sizeof(off_t) > 4) { + *size = (ulint)(offs & 0xFFFFFFFF); + *size_high = (ulint)(offs >> 32); + } else { + *size = (ulint) offs; + *size_high = 0; + } + return(TRUE); #endif } @@ -838,16 +839,18 @@ 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 |