diff options
author | unknown <monty@mysql.com> | 2003-12-20 03:41:04 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2003-12-20 03:41:04 +0200 |
commit | 65c44414c21c21ce7b57bd672873558ec2ed3031 (patch) | |
tree | 7b73c477120c02f912fc4e2d5105e727385d6bc6 /innobase/buf | |
parent | aa2eb815d6453502889fafb8106bbe33c0632e73 (diff) | |
download | mariadb-git-65c44414c21c21ce7b57bd672873558ec2ed3031.tar.gz |
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
A after merge fix for last merge
innobase/btr/btr0btr.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/btr/btr0sea.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/buf/buf0buf.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/buf/buf0flu.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/buf/buf0lru.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/buf/buf0rea.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/com/com0shm.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/data/data0data.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/data/data0type.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/dict/dict0crea.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/dict/dict0dict.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/fil/fil0fil.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/fsp/fsp0fsp.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/fut/fut0lst.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/ha/ha0ha.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/ibuf/ibuf0ibuf.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/include/univ.i:
Disabled ut_sprintf/ut_fprintf. Not needed as all number arguments to printf are now casted
innobase/lock/lock0lock.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/log/log0log.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/log/log0recv.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/mem/mem0dbg.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/mem/mem0pool.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/mtr/mtr0log.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/mtr/mtr0mtr.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/os/os0file.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/os/os0sync.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/page/page0cur.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/page/page0page.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/read/read0read.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/rem/rem0cmp.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/rem/rem0rec.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/row/row0mysql.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
Heikki, please check the change of % to %%
innobase/row/row0sel.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/row/row0undo.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/srv/srv0srv.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/srv/srv0start.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/sync/sync0arr.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/sync/sync0rw.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/sync/sync0sync.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/trx/trx0purge.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/trx/trx0rec.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/trx/trx0roll.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/trx/trx0sys.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/trx/trx0trx.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/trx/trx0undo.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/usr/usr0sess.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/ut/ut0mem.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/ut/ut0ut.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
sql/sql_delete.cc:
After merge fix
Diffstat (limited to 'innobase/buf')
-rw-r--r-- | innobase/buf/buf0buf.c | 125 | ||||
-rw-r--r-- | innobase/buf/buf0flu.c | 12 | ||||
-rw-r--r-- | innobase/buf/buf0lru.c | 44 | ||||
-rw-r--r-- | innobase/buf/buf0rea.c | 24 |
4 files changed, 111 insertions, 94 deletions
diff --git a/innobase/buf/buf0buf.c b/innobase/buf/buf0buf.c index 946020acd11..cbf12c9e55d 100644 --- a/innobase/buf/buf0buf.c +++ b/innobase/buf/buf0buf.c @@ -321,13 +321,13 @@ buf_page_is_corrupted( " InnoDB: Error: page %lu log sequence number %lu %lu\n" "InnoDB: is in the future! Current system log sequence number %lu %lu.\n" "InnoDB: Your database may be corrupt.\n", - mach_read_from_4(read_buf + FIL_PAGE_OFFSET), - ut_dulint_get_high( + (ulong) mach_read_from_4(read_buf + FIL_PAGE_OFFSET), + (ulong) ut_dulint_get_high( mach_read_from_8(read_buf + FIL_PAGE_LSN)), - ut_dulint_get_low( + (ulong) ut_dulint_get_low( mach_read_from_8(read_buf + FIL_PAGE_LSN)), - ut_dulint_get_high(current_lsn), - ut_dulint_get_low(current_lsn)); + (ulong) ut_dulint_get_high(current_lsn), + (ulong) ut_dulint_get_low(current_lsn)); } } #endif @@ -381,7 +381,7 @@ buf_page_print( ut_print_timestamp(stderr); fprintf(stderr, " InnoDB: Page dump in ascii and hex (%lu bytes):\n%s", - (ulint)UNIV_PAGE_SIZE, buf); + (ulong) UNIV_PAGE_SIZE, buf); fprintf(stderr, "InnoDB: End of page dump\n"); mem_free(buf); @@ -393,20 +393,20 @@ buf_page_print( fprintf(stderr, " InnoDB: Page checksum %lu, prior-to-4.0.14-form checksum %lu\n" "InnoDB: stored checksum %lu, prior-to-4.0.14-form stored checksum %lu\n", - checksum, old_checksum, - mach_read_from_4(read_buf + FIL_PAGE_SPACE_OR_CHKSUM), - mach_read_from_4(read_buf + UNIV_PAGE_SIZE + (ulong) checksum, (ulong) old_checksum, + (ulong) mach_read_from_4(read_buf + FIL_PAGE_SPACE_OR_CHKSUM), + (ulong) mach_read_from_4(read_buf + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM)); fprintf(stderr, "InnoDB: Page lsn %lu %lu, low 4 bytes of lsn at page end %lu\n" "InnoDB: Page number (if stored to page already) %lu,\n" "InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) %lu\n", - mach_read_from_4(read_buf + FIL_PAGE_LSN), - mach_read_from_4(read_buf + FIL_PAGE_LSN + 4), - mach_read_from_4(read_buf + UNIV_PAGE_SIZE + (ulong) mach_read_from_4(read_buf + FIL_PAGE_LSN), + (ulong) mach_read_from_4(read_buf + FIL_PAGE_LSN + 4), + (ulong) mach_read_from_4(read_buf + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM + 4), - mach_read_from_4(read_buf + FIL_PAGE_OFFSET), - mach_read_from_4(read_buf + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID)); + (ulong) mach_read_from_4(read_buf + FIL_PAGE_OFFSET), + (ulong) mach_read_from_4(read_buf + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID)); if (mach_read_from_2(read_buf + TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_TYPE) == TRX_UNDO_INSERT) { @@ -422,8 +422,8 @@ buf_page_print( if (fil_page_get_type(read_buf) == FIL_PAGE_INDEX) { fprintf(stderr, "InnoDB: Page may be an index page where index id is %lu %lu\n", - ut_dulint_get_high(btr_page_get_index_id(read_buf)), - ut_dulint_get_low(btr_page_get_index_id(read_buf))); + (ulong) ut_dulint_get_high(btr_page_get_index_id(read_buf)), + (ulong) ut_dulint_get_low(btr_page_get_index_id(read_buf))); /* If the code is in ibbackup, dict_sys may be uninitialized, i.e., NULL */ @@ -513,7 +513,7 @@ buf_pool_init( fprintf(stderr, "InnoDB: AWE: Error: you must specify in my.cnf .._awe_mem_mb larger\n" "InnoDB: than .._buffer_pool_size. Now the former is %lu pages,\n" -"InnoDB: the latter %lu pages.\n", curr_size, n_frames); +"InnoDB: the latter %lu pages.\n", (ulong) curr_size, (ulong) n_frames); return(NULL); } @@ -543,7 +543,7 @@ buf_pool_init( fprintf(stderr, "InnoDB: AWE: Error: physical memory must be allocated in full megabytes.\n" "InnoDB: Trying to allocate %lu database pages.\n", - curr_size); + (ulong) curr_size); return(NULL); } @@ -780,7 +780,7 @@ buf_awe_map_page_to_frame( fprintf(stderr, "InnoDB: AWE: Fatal error: cannot find a page to unmap\n" "InnoDB: awe_LRU_free_mapped list length %lu\n", - UT_LIST_GET_LEN(buf_pool->awe_LRU_free_mapped)); + (ulong) UT_LIST_GET_LEN(buf_pool->awe_LRU_free_mapped)); ut_a(0); } @@ -1546,8 +1546,9 @@ buf_page_init( if (buf_page_hash_get(space, offset)) { fprintf(stderr, -"InnoDB: Error: page %lu %lu already found from the hash table\n", space, - offset); +"InnoDB: Error: page %lu %lu already found from the hash table\n", + (ulong) space, + (ulong) offset); buf_print(); buf_LRU_print(); buf_validate(); @@ -1730,8 +1731,9 @@ buf_page_create( /* If we get here, the page was not in buf_pool: init it there */ if (buf_debug_prints) { - printf("Creating space %lu page %lu to buffer\n", space, - offset); + printf("Creating space %lu page %lu to buffer\n", + (ulong) space, + (ulong) offset); } block = free_block; @@ -1809,7 +1811,7 @@ buf_page_io_complete( fprintf(stderr, "InnoDB: Error: page n:o stored in the page read in is %lu, should be %lu!\n", - read_page_no, block->offset); + (ulong) read_page_no, (ulong) block->offset); } #ifdef notdefined if (block->offset != 0 && read_page_no == 0) { @@ -1832,7 +1834,7 @@ buf_page_io_complete( if (buf_page_is_corrupted(block->frame)) { fprintf(stderr, "InnoDB: Database page corruption on disk or a failed\n" - "InnoDB: file read of page %lu.\n", block->offset); + "InnoDB: file read of page %lu.\n", (ulong) block->offset); fprintf(stderr, "InnoDB: You may have to recover from a backup.\n"); @@ -1841,7 +1843,7 @@ buf_page_io_complete( fprintf(stderr, "InnoDB: Database page corruption on disk or a failed\n" - "InnoDB: file read of page %lu.\n", block->offset); + "InnoDB: file read of page %lu.\n", (ulong) block->offset); fprintf(stderr, "InnoDB: You may have to recover from a backup.\n"); fprintf(stderr, @@ -1922,8 +1924,8 @@ buf_page_io_complete( mutex_exit(&(buf_pool->mutex)); if (buf_debug_prints) { - printf("page space %lu page no %lu", block->space, - block->offset); + printf("page space %lu page no %lu", (ulong) block->space, + (ulong) block->offset); id = btr_page_get_index_id(block->frame); index = NULL; @@ -2038,14 +2040,16 @@ buf_validate(void) } if (n_lru + n_free > buf_pool->curr_size) { - printf("n LRU %lu, n free %lu\n", n_lru, n_free); + printf("n LRU %lu, n free %lu\n", (ulong) n_lru, + (ulong) n_free); ut_error; } ut_a(UT_LIST_GET_LEN(buf_pool->LRU) == n_lru); if (UT_LIST_GET_LEN(buf_pool->free) != n_free) { printf("Free list len %lu, free blocks %lu\n", - UT_LIST_GET_LEN(buf_pool->free), n_free); + (ulong) UT_LIST_GET_LEN(buf_pool->free), + (ulong) n_free); ut_error; } ut_a(UT_LIST_GET_LEN(buf_pool->flush_list) == n_flush); @@ -2088,22 +2092,23 @@ buf_print(void) mutex_enter(&(buf_pool->mutex)); - printf("buf_pool size %lu \n", size); - printf("database pages %lu \n", UT_LIST_GET_LEN(buf_pool->LRU)); - printf("free pages %lu \n", UT_LIST_GET_LEN(buf_pool->free)); + printf("buf_pool size %lu \n", (ulong) size); + printf("database pages %lu \n", (ulong) UT_LIST_GET_LEN(buf_pool->LRU)); + printf("free pages %lu \n", (ulong) UT_LIST_GET_LEN(buf_pool->free)); printf("modified database pages %lu \n", - UT_LIST_GET_LEN(buf_pool->flush_list)); + (ulong) UT_LIST_GET_LEN(buf_pool->flush_list)); - printf("n pending reads %lu \n", buf_pool->n_pend_reads); + printf("n pending reads %lu \n", (ulong) buf_pool->n_pend_reads); printf("n pending flush LRU %lu list %lu single page %lu\n", - buf_pool->n_flush[BUF_FLUSH_LRU], - buf_pool->n_flush[BUF_FLUSH_LIST], - buf_pool->n_flush[BUF_FLUSH_SINGLE_PAGE]); + (ulong) buf_pool->n_flush[BUF_FLUSH_LRU], + (ulong) buf_pool->n_flush[BUF_FLUSH_LIST], + (ulong) buf_pool->n_flush[BUF_FLUSH_SINGLE_PAGE]); printf("pages read %lu, created %lu, written %lu\n", - buf_pool->n_pages_read, buf_pool->n_pages_created, - buf_pool->n_pages_written); + (ulong) buf_pool->n_pages_read, + (ulong) buf_pool->n_pages_created, + (ulong) buf_pool->n_pages_written); /* Count the number of blocks belonging to each index in the buffer */ @@ -2147,7 +2152,8 @@ buf_print(void) index = dict_index_get_if_in_cache(index_ids[i]); printf("Block count for index %lu in buffer is about %lu", - ut_dulint_get_low(index_ids[i]), counts[i]); + (ulong) ut_dulint_get_low(index_ids[i]), + (ulong) counts[i]); if (index) { printf(" index name %s table %s", index->name, @@ -2224,39 +2230,39 @@ buf_print_io( mutex_enter(&(buf_pool->mutex)); buf += sprintf(buf, - "Buffer pool size %lu\n", size); + "Buffer pool size %lu\n", (ulong) size); buf += sprintf(buf, - "Free buffers %lu\n", UT_LIST_GET_LEN(buf_pool->free)); + "Free buffers %lu\n", (ulong) UT_LIST_GET_LEN(buf_pool->free)); buf += sprintf(buf, - "Database pages %lu\n", UT_LIST_GET_LEN(buf_pool->LRU)); + "Database pages %lu\n", (ulong) UT_LIST_GET_LEN(buf_pool->LRU)); /* buf += sprintf(buf, - "Lock heap buffers %lu\n", buf_pool->n_lock_heap_pages); + "Lock heap buffers %lu\n", (ulong) buf_pool->n_lock_heap_pages); buf += sprintf(buf, - "Hash index buffers %lu\n", buf_pool->n_adaptive_hash_pages); + "Hash index buffers %lu\n", (ulong) buf_pool->n_adaptive_hash_pages); */ buf += sprintf(buf, "Modified db pages %lu\n", - UT_LIST_GET_LEN(buf_pool->flush_list)); + (ulong) UT_LIST_GET_LEN(buf_pool->flush_list)); if (srv_use_awe) { buf += sprintf(buf, "AWE: Buffer pool memory frames %lu\n", - buf_pool->n_frames); + (ulong) buf_pool->n_frames); buf += sprintf(buf, "AWE: Database pages and free buffers mapped in frames %lu\n", - UT_LIST_GET_LEN(buf_pool->awe_LRU_free_mapped)); + (ulong) UT_LIST_GET_LEN(buf_pool->awe_LRU_free_mapped)); } - buf += sprintf(buf, "Pending reads %lu \n", buf_pool->n_pend_reads); + buf += sprintf(buf, "Pending reads %lu \n", (ulong) buf_pool->n_pend_reads); buf += sprintf(buf, "Pending writes: LRU %lu, flush list %lu, single page %lu\n", - buf_pool->n_flush[BUF_FLUSH_LRU] - + buf_pool->init_flush[BUF_FLUSH_LRU], - buf_pool->n_flush[BUF_FLUSH_LIST] - + buf_pool->init_flush[BUF_FLUSH_LIST], - buf_pool->n_flush[BUF_FLUSH_SINGLE_PAGE]); + (ulong) (buf_pool->n_flush[BUF_FLUSH_LRU] + + buf_pool->init_flush[BUF_FLUSH_LRU]), + (ulong) (buf_pool->n_flush[BUF_FLUSH_LIST] + + buf_pool->init_flush[BUF_FLUSH_LIST]), + (ulong) buf_pool->n_flush[BUF_FLUSH_SINGLE_PAGE]); current_time = time(NULL); time_elapsed = 0.001 + difftime(current_time, @@ -2264,8 +2270,9 @@ buf_print_io( buf_pool->last_printout_time = current_time; buf += sprintf(buf, "Pages read %lu, created %lu, written %lu\n", - buf_pool->n_pages_read, buf_pool->n_pages_created, - buf_pool->n_pages_written); + (ulong) buf_pool->n_pages_read, + (ulong) buf_pool->n_pages_created, + (ulong) buf_pool->n_pages_written); buf += sprintf(buf, "%.2f reads/s, %.2f creates/s, %.2f writes/s\n", (buf_pool->n_pages_read - buf_pool->n_pages_read_old) / time_elapsed, @@ -2283,10 +2290,10 @@ buf_print_io( if (buf_pool->n_page_gets > buf_pool->n_page_gets_old) { buf += sprintf(buf, "Buffer pool hit rate %lu / 1000\n", - 1000 + (ulong) (1000 - ((1000 * (buf_pool->n_pages_read - buf_pool->n_pages_read_old)) - / (buf_pool->n_page_gets - buf_pool->n_page_gets_old))); + / (buf_pool->n_page_gets - buf_pool->n_page_gets_old)))); } else { buf += sprintf(buf, "No buffer pool page gets since the last printout\n"); diff --git a/innobase/buf/buf0flu.c b/innobase/buf/buf0flu.c index 27a1829942d..cdea764971e 100644 --- a/innobase/buf/buf0flu.c +++ b/innobase/buf/buf0flu.c @@ -246,7 +246,7 @@ buf_flush_buffered_writes(void) "InnoDB: to be written to data file. We intentionally crash server\n" "InnoDB: to prevent corrupt data from ending up in data\n" "InnoDB: files.\n", - block->offset, block->space); + (ulong) block->offset, (ulong) block->space); ut_a(0); } @@ -504,7 +504,8 @@ buf_flush_try_page( if (buf_debug_prints) { printf("Flushing page space %lu, page no %lu \n", - block->space, block->offset); + (ulong) block->space, + (ulong) block->offset); } buf_flush_write_block_low(block); @@ -592,7 +593,8 @@ buf_flush_try_page( if (buf_debug_prints) { printf( "Flushing single page space %lu, page no %lu \n", - block->space, block->offset); + (ulong) block->space, + (ulong) block->offset); } buf_flush_write_block_low(block); @@ -823,10 +825,10 @@ buf_flush_batch( if (buf_debug_prints && page_count > 0) { if (flush_type == BUF_FLUSH_LRU) { printf("Flushed %lu pages in LRU flush\n", - page_count); + (ulong) page_count); } else if (flush_type == BUF_FLUSH_LIST) { printf("Flushed %lu pages in flush list flush\n", - page_count); + (ulong) page_count); } else { ut_error; } diff --git a/innobase/buf/buf0lru.c b/innobase/buf/buf0lru.c index 55a5ecbeba5..23f399503c8 100644 --- a/innobase/buf/buf0lru.c +++ b/innobase/buf/buf0lru.c @@ -100,7 +100,8 @@ scan_again: if (buf_debug_prints) { printf( "Dropping space %lu page %lu\n", - block->space, block->offset); + (ulong) block->space, + (ulong) block->offset); } if (block->is_hashed) { @@ -209,7 +210,8 @@ buf_LRU_search_and_free_block( if (buf_debug_prints) { printf( "Putting space %lu page %lu to free list\n", - block->space, block->offset); + (ulong) block->space, + (ulong) block->offset); } buf_LRU_block_remove_hashed_page(block); @@ -329,7 +331,7 @@ loop: "InnoDB: the buffer pool bigger?\n" "InnoDB: Starting the InnoDB Monitor to print diagnostics, including\n" "InnoDB: lock heap and hash index sizes.\n", - buf_pool->curr_size / (1024 * 1024 / UNIV_PAGE_SIZE)); + (ulong) (buf_pool->curr_size / (1024 * 1024 / UNIV_PAGE_SIZE))); srv_print_innodb_monitor = TRUE; @@ -396,7 +398,7 @@ loop: "InnoDB: Warning: difficult to find free blocks from\n" "InnoDB: the buffer pool (%lu search iterations)! Consider\n" "InnoDB: increasing the buffer pool size.\n", - n_iterations); + (ulong) n_iterations); fprintf(stderr, "InnoDB: It is also possible that in your Unix version\n" "InnoDB: fsync is very slow, or completely frozen inside\n" @@ -406,11 +408,13 @@ loop: fprintf(stderr, "InnoDB: Pending flushes (fsync) log: %lu; buffer pool: %lu\n", - fil_n_pending_log_flushes, - fil_n_pending_tablespace_flushes); + (ulong) fil_n_pending_log_flushes, + (ulong) fil_n_pending_tablespace_flushes); fprintf(stderr, "InnoDB: %lu OS file reads, %lu OS file writes, %lu OS fsyncs\n", - os_n_file_reads, os_n_file_writes, os_n_fsyncs); + (ulong) os_n_file_reads, + (ulong) os_n_file_writes, + (ulong) os_n_fsyncs); fprintf(stderr, "InnoDB: Starting InnoDB Monitor to print further\n" @@ -820,15 +824,15 @@ buf_LRU_block_remove_hashed_page( if (block != buf_page_hash_get(block->space, block->offset)) { fprintf(stderr, "InnoDB: Error: page %lu %lu not found from the hash table\n", - block->space, - block->offset); + (ulong) block->space, + (ulong) block->offset); if (buf_page_hash_get(block->space, block->offset)) { fprintf(stderr, "InnoDB: From hash table we find block %lx of %lu %lu which is not %lx\n", - (ulint)buf_page_hash_get(block->space, block->offset), - buf_page_hash_get(block->space, block->offset)->space, - buf_page_hash_get(block->space, block->offset)->offset, - (ulint)block); + (ulong) buf_page_hash_get(block->space, block->offset), + (ulong) buf_page_hash_get(block->space, block->offset)->space, + (ulong) buf_page_hash_get(block->space, block->offset)->offset, + (ulong) block); } buf_print(); @@ -949,7 +953,7 @@ buf_LRU_print(void) ut_ad(buf_pool); mutex_enter(&(buf_pool->mutex)); - printf("Pool ulint clock %lu\n", buf_pool->ulint_clock); + printf("Pool ulint clock %lu\n", (ulong) buf_pool->ulint_clock); block = UT_LIST_GET_FIRST(buf_pool->LRU); @@ -957,18 +961,18 @@ buf_LRU_print(void) while (block != NULL) { - printf("BLOCK %lu ", block->offset); + printf("BLOCK %lu ", (ulong) block->offset); if (block->old) { printf("old "); } if (block->buf_fix_count) { - printf("buffix count %lu ", block->buf_fix_count); + printf("buffix count %lu ", (ulong) block->buf_fix_count); } if (block->io_fix) { - printf("io_fix %lu ", block->io_fix); + printf("io_fix %lu ", (ulong) block->io_fix); } if (ut_dulint_cmp(block->oldest_modification, @@ -976,12 +980,12 @@ buf_LRU_print(void) printf("modif. "); } - printf("LRU pos %lu ", block->LRU_position); + printf("LRU pos %lu ", (ulong) block->LRU_position); frame = buf_block_get_frame(block); - printf("type %lu ", fil_page_get_type(frame)); - printf("index id %lu ", ut_dulint_get_low( + printf("type %lu ", (ulong) fil_page_get_type(frame)); + printf("index id %lu ", (ulong) ut_dulint_get_low( btr_page_get_index_id(frame))); block = UT_LIST_GET_NEXT(LRU, block); diff --git a/innobase/buf/buf0rea.c b/innobase/buf/buf0rea.c index 0fa6912ba1d..5ba27b8fee8 100644 --- a/innobase/buf/buf0rea.c +++ b/innobase/buf/buf0rea.c @@ -85,7 +85,8 @@ buf_read_page_low( + TRX_SYS_DOUBLEWRITE_BLOCK_SIZE))) { ut_print_timestamp(stderr); fprintf(stderr, -" InnoDB: Warning: trying to read doublewrite buffer page %lu\n", offset); +" InnoDB: Warning: trying to read doublewrite buffer page %lu\n", + (ulong) offset); return(0); } @@ -126,7 +127,8 @@ buf_read_page_low( if (buf_debug_prints) { printf("Posting read request for page %lu, sync %lu\n", - offset, sync); + (ulong) offset, + (ulong) sync); } ut_a(block->state == BUF_BLOCK_FILE_PAGE); @@ -268,7 +270,7 @@ buf_read_ahead_random( " InnoDB: Warning: in random readahead trying to access tablespace\n" "InnoDB: %lu page no. %lu,\n" "InnoDB: but the tablespace does not exist or is just being dropped.\n", - space, i); + (ulong) space, (ulong) i); } } } @@ -282,7 +284,8 @@ buf_read_ahead_random( if (buf_debug_prints && (count > 0)) { printf("Random read-ahead space %lu offset %lu pages %lu\n", - space, offset, count); + (ulong) space, (ulong) offset, + (ulong) count); } return(count); @@ -322,7 +325,7 @@ buf_read_page( fprintf(stderr, " InnoDB: error: trying to access tablespace %lu page no. %lu,\n" "InnoDB: but the tablespace does not exist or is just being dropped.\n", - space, offset); + (ulong) space, (ulong) offset); } /* Flush pages from the end of the LRU list if necessary */ @@ -549,7 +552,7 @@ buf_read_ahead_linear( " InnoDB: Warning: in linear readahead trying to access tablespace\n" "InnoDB: %lu page no. %lu,\n" "InnoDB: but the tablespace does not exist or is just being dropped.\n", - space, i); + (ulong) space, (ulong) i); } } } @@ -566,7 +569,7 @@ buf_read_ahead_linear( if (buf_debug_prints && (count > 0)) { printf( "LINEAR read-ahead space %lu offset %lu pages %lu\n", - space, offset, count); + (ulong) space, (ulong) offset, (ulong) count); } return(count); @@ -627,7 +630,7 @@ buf_read_ibuf_merge_pages( buf_flush_free_margin(); if (buf_debug_prints) { - printf("Ibuf merge read-ahead pages %lu\n", n_stored); + printf("Ibuf merge read-ahead pages %lu\n", (ulong) n_stored); } } @@ -669,7 +672,7 @@ buf_read_recv_pages( fprintf(stderr, "InnoDB: Error: InnoDB has waited for 50 seconds for pending\n" "InnoDB: reads to the buffer pool to be finished.\n" -"InnoDB: Number of pending reads %lu\n", buf_pool->n_pend_reads); +"InnoDB: Number of pending reads %lu\n", (ulong) buf_pool->n_pend_reads); os_aio_print_debug = TRUE; } @@ -693,6 +696,7 @@ buf_read_recv_pages( buf_flush_free_margin(); if (buf_debug_prints) { - printf("Recovery applies read-ahead pages %lu\n", n_stored); + printf("Recovery applies read-ahead pages %lu\n", + (ulong) n_stored); } } |