diff options
author | unknown <tulin@dl145c.mysql.com> | 2005-09-12 14:22:06 +0200 |
---|---|---|
committer | unknown <tulin@dl145c.mysql.com> | 2005-09-12 14:22:06 +0200 |
commit | 54e99aa58e826f15da7b8f8c071d02960c37a210 (patch) | |
tree | afba2d45e117fc50e4bf3d7191e8a92db5432faa /extra | |
parent | bf0562f20d33c57d2b21e8214b5fe69d94ccc061 (diff) | |
parent | 4efcca023b47e9d8fff148da2c65254ddbee6c9b (diff) | |
download | mariadb-git-54e99aa58e826f15da7b8f8c071d02960c37a210.tar.gz |
Merge
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/ps_6bdb.result:
Auto merged
mysql-test/r/ps_7ndb.result:
Auto merged
mysys/default.c:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
storage/heap/hp_hash.c:
Auto merged
storage/ndb/include/util/Parser.hpp:
Auto merged
storage/ndb/src/common/portlib/NdbThread.c:
Auto merged
storage/ndb/src/mgmapi/mgmapi.cpp:
Auto merged
storage/ndb/test/include/NDBT_Test.hpp:
Auto merged
storage/ndb/test/ndbapi/Makefile.am:
Auto merged
storage/ndb/test/ndbapi/bank/Bank.cpp:
Auto merged
storage/ndb/test/ndbapi/bank/Bank.hpp:
Auto merged
storage/ndb/test/src/NDBT_Test.cpp:
Auto merged
storage/ndb/test/src/UtilTransactions.cpp:
Auto merged
mysql-test/mysql-test-run.pl:
SCCS merged
Diffstat (limited to 'extra')
-rw-r--r-- | extra/Makefile.am | 2 | ||||
-rw-r--r-- | extra/innochecksum.c | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/extra/Makefile.am b/extra/Makefile.am index 9fac05d0160..457fddce673 100644 --- a/extra/Makefile.am +++ b/extra/Makefile.am @@ -38,7 +38,7 @@ $(top_builddir)/include/mysqld_ername.h: $(top_builddir)/include/mysqld_error.h $(top_builddir)/include/sql_state.h: $(top_builddir)/include/mysqld_error.h bin_PROGRAMS = replace comp_err perror resolveip my_print_defaults \ - resolve_stack_dump mysql_waitpid # innochecksum + resolve_stack_dump mysql_waitpid innochecksum noinst_PROGRAMS = charset2html # Don't update the files from bitkeeper diff --git a/extra/innochecksum.c b/extra/innochecksum.c index bce4214847d..bbeb96224c9 100644 --- a/extra/innochecksum.c +++ b/extra/innochecksum.c @@ -140,10 +140,11 @@ int main(int argc, char **argv) { int now; // current time int lastt; // last time ulint oldcsum, oldcsumfield, csum, csumfield, logseq, logseqfield; // ulints for checksum storage - struct stat64 st; // for stat, if you couldn't guess + struct stat st; // for stat, if you couldn't guess unsigned long long int size; // size of file (has to be 64 bits) ulint pages; // number of pages in file ulint start_page = 0, end_page = 0, use_end_page = 0; // for starting and ending at certain pages + off_t offset = 0; int just_count = 0; // if true, just print page count int verbose = 0; int debug = 0; @@ -202,7 +203,7 @@ int main(int argc, char **argv) { } // stat the file to get size and page count - if (stat64(argv[optind], &st)) { + if (stat(argv[optind], &st)) { perror("error statting file"); return 1; } @@ -217,7 +218,7 @@ int main(int argc, char **argv) { } // open the file for reading - f = fopen64(argv[optind], "r"); + f = fopen(argv[optind], "r"); if (!f) { perror("error opening file"); return 1; @@ -230,7 +231,10 @@ int main(int argc, char **argv) { perror("unable to obtain file descriptor number"); return 1; } - if (lseek64(fd, start_page * UNIV_PAGE_SIZE, SEEK_SET) != (start_page * UNIV_PAGE_SIZE)) { + + offset = (off_t)start_page * (off_t)UNIV_PAGE_SIZE; + + if (lseek(fd, offset, SEEK_SET) != offset) { perror("unable to seek to necessary offset"); return 1; } |