@@ -257,14 +257,14 @@ static void init_page_size(const byte* buf)
257257 + FSP_SPACE_FLAGS);
258258
259259if (fil_space_t::full_crc32 (flags)) {
260- const ulong ssize = FSP_FLAGS_FCRC32_GET_PAGE_SSIZE (flags);
260+ const uint32_t ssize = FSP_FLAGS_FCRC32_GET_PAGE_SSIZE (flags);
261261srv_page_size_shift = UNIV_ZIP_SIZE_SHIFT_MIN - 1 + ssize;
262262srv_page_size = 512U << ssize;
263263physical_page_size = srv_page_size;
264264return ;
265265}
266266
267- const ulong ssize = FSP_FLAGS_GET_PAGE_SSIZE (flags);
267+ const uint32_t ssize = FSP_FLAGS_GET_PAGE_SSIZE (flags);
268268
269269srv_page_size_shift = ssize
270270? UNIV_ZIP_SIZE_SHIFT_MIN - 1 + ssize
@@ -428,12 +428,7 @@ static bool is_page_all_zeroes(
428428with crypt_scheme encrypted
429429@param[in] flags tablespace flags
430430@retval true if page is corrupted otherwise false. */
431- static
432- bool
433- is_page_corrupted (
434- byte* buf,
435- bool is_encrypted,
436- ulint flags)
431+ static bool is_page_corrupted (byte *buf, bool is_encrypted, uint32_t flags)
437432{
438433
439434/* enable if page is corrupted. */
@@ -589,7 +584,7 @@ Rewrite the checksum for the page.
589584@retval false : skip the rewrite as checksum stored match with
590585calculated or page is doublwrite buffer.
591586*/
592- static bool update_checksum (byte* page, ulint flags)
587+ static bool update_checksum (byte* page, uint32_t flags)
593588{
594589ib_uint32_t checksum = 0 ;
595590byte stored1[4 ];/* get FIL_PAGE_SPACE_OR_CHKSUM field checksum */
@@ -697,7 +692,7 @@ write_file(
697692const char * filename,
698693FILE* file,
699694byte* buf,
700- ulint flags,
695+ uint32_t flags,
701696fpos_t * pos)
702697{
703698bool do_update;
@@ -1365,7 +1360,7 @@ static int verify_checksum(
13651360byte* buf,
13661361bool is_encrypted,
13671362unsigned long long * mismatch_count,
1368- ulint flags)
1363+ uint32_t flags)
13691364{
13701365int exit_status = 0 ;
13711366if (is_page_corrupted (buf, is_encrypted, flags)) {
@@ -1406,7 +1401,7 @@ rewrite_checksum(
14061401byte* buf,
14071402fpos_t * pos,
14081403bool is_encrypted,
1409- ulint flags)
1404+ uint32_t flags)
14101405{
14111406bool is_compressed = fil_space_t::is_compressed (flags);
14121407
@@ -1443,7 +1438,7 @@ int main(
14431438/* size of file (has to be 64 bits) */
14441439unsigned long long int size = 0 ;
14451440/* number of pages in file */
1446- ulint pages;
1441+ uint32_t pages;
14471442
14481443off_t offset = 0 ;
14491444/* count the no. of page corrupted. */
@@ -1575,7 +1570,7 @@ int main(
15751570from fsp_flags and encryption metadata from page 0 */
15761571init_page_size (buf);
15771572
1578- ulint flags = mach_read_from_4 (FSP_HEADER_OFFSET + FSP_SPACE_FLAGS + buf);
1573+ uint32_t flags = mach_read_from_4 (FSP_HEADER_OFFSET + FSP_SPACE_FLAGS + buf);
15791574
15801575if (physical_page_size == UNIV_ZIP_SIZE_MIN) {
15811576partial_page_read = false ;
@@ -1643,19 +1638,16 @@ int main(
16431638parse_page (buf, xdes, fil_page_type, is_encrypted);
16441639}
16451640
1646- pages = (ulint ) (size / physical_page_size);
1641+ pages = (uint32_t ) (size / physical_page_size);
16471642
16481643if (just_count) {
1649- if (read_from_stdin) {
1650- fprintf (stderr, " Number of pages:" ULINTPF " \n " , pages);
1651- } else {
1652- printf (" Number of pages:" ULINTPF " \n " , pages);
1653- }
1644+ fprintf (read_from_stdin ? stderr : stdout,
1645+ " Number of pages:%u\n " , pages);
16541646continue ;
16551647} else if (verbose && !read_from_stdin) {
16561648if (is_log_enabled) {
16571649fprintf (log_file, " file %s = %llu bytes "
1658- " (" ULINTPF " pages)\n " , filename, size, pages);
1650+ " (%u pages)\n " , filename, size, pages);
16591651if (do_one_page) {
16601652fprintf (log_file, " Innochecksum: "
16611653" checking page::%llu;\n " ,
@@ -1850,7 +1842,7 @@ int main(
18501842fprintf (log_file, " page::%llu "
18511843" okay: %.3f%% done\n " ,
18521844(cur_page_num - 1 ),
1853- (float ) cur_page_num / pages * 100 );
1845+ (double ) cur_page_num / pages * 100 );
18541846lastt = now;
18551847}
18561848}
0 commit comments