diff options
author | monty@mashka.mysql.fi <> | 2002-07-25 22:46:28 +0300 |
---|---|---|
committer | monty@mashka.mysql.fi <> | 2002-07-25 22:46:28 +0300 |
commit | bc035c71f1d94649253e4dac5fb8e5c981c7d834 (patch) | |
tree | f38c137c73206e3d059517b2bcab6a4a43c957f9 /innobase/fil | |
parent | b126501bf3888b09fad83dbd2894709c45f009fc (diff) | |
parent | 3c9f1a9ae47e4fcbede526430b0171e8ba17d948 (diff) | |
download | mariadb-git-bc035c71f1d94649253e4dac5fb8e5c981c7d834.tar.gz |
Merge with 3.23.51
Fixed wrong usage of sprintf() in ha_innodb.cc
Diffstat (limited to 'innobase/fil')
-rw-r--r-- | innobase/fil/fil0fil.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/innobase/fil/fil0fil.c b/innobase/fil/fil0fil.c index 35f3792f041..da4aee5db76 100644 --- a/innobase/fil/fil0fil.c +++ b/innobase/fil/fil0fil.c @@ -573,17 +573,20 @@ fil_read_flushed_lsn_and_arch_log_no( ulint* max_arch_log_no) /* in/out: */ { byte* buf; + byte* buf2; dulint flushed_lsn; ulint arch_log_no; - buf = ut_malloc(UNIV_PAGE_SIZE); - + buf2 = ut_malloc(2 * UNIV_PAGE_SIZE); + /* Align the memory for a possibel read from a raw device */ + buf = ut_align(buf2, UNIV_PAGE_SIZE); + os_file_read(data_file, buf, 0, 0, UNIV_PAGE_SIZE); flushed_lsn = mach_read_from_8(buf + FIL_PAGE_FILE_FLUSH_LSN); arch_log_no = mach_read_from_4(buf + FIL_PAGE_ARCH_LOG_NO); - ut_free(buf); + ut_free(buf2); if (!one_read_already) { *min_flushed_lsn = flushed_lsn; |