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/os | |
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/os')
-rw-r--r-- | innobase/os/os0file.c | 47 | ||||
-rw-r--r-- | innobase/os/os0sync.c | 6 |
2 files changed, 29 insertions, 24 deletions
diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c index fe5b4f9c096..a87ab974b83 100644 --- a/innobase/os/os0file.c +++ b/innobase/os/os0file.c @@ -216,7 +216,7 @@ os_file_get_last_error( ut_print_timestamp(stderr); fprintf(stderr, - " InnoDB: Operating system error number %lu in a file operation.\n", err); + " InnoDB: Operating system error number %lu in a file operation.\n", (ulong) err); if (err == ERROR_PATH_NOT_FOUND) { fprintf(stderr, @@ -1499,7 +1499,7 @@ os_file_set_size( != offset / (ib_longlong)(100 * 1024 * 1024)) { fprintf(stderr, " %lu00", - (ulint)((offset + n_bytes) + (ulong) ((offset + n_bytes) / (ib_longlong)(100 * 1024 * 1024))); } @@ -1858,9 +1858,9 @@ error_handling: fprintf(stderr, "InnoDB: Fatal error: cannot read from file. OS error number %lu.\n", #ifdef __WIN__ - (ulint)GetLastError() + (ulong) GetLastError() #else - (ulint)errno + (ulong) errno #endif ); fflush(stderr); @@ -2013,8 +2013,8 @@ retry: "InnoDB: offset %lu %lu. Operating system error number %lu.\n" "InnoDB: Look from section 13.2 at http://www.innodb.com/ibman.html\n" "InnoDB: what the error number means.\n", - name, offset_high, offset, - (ulint)GetLastError()); + name, (ulong) offset_high, (ulong) offset, + (ulong) GetLastError()); return(FALSE); } @@ -2060,12 +2060,12 @@ retry: "InnoDB: Operating system error number %lu.\n" "InnoDB: Check that your OS and file system support files of this size.\n" "InnoDB: Check also that the disk is not full or a disk quota exceeded.\n", - name, offset_high, offset, n, (ulint)len, - err); + name, (ulong) offset_high, (ulong) offset, + (ulong) n, (ulong) len, (ulong) err); if (strerror((int)err) != NULL) { fprintf(stderr, -"InnoDB: Error number %lu means '%s'.\n", err, strerror((int)err)); +"InnoDB: Error number %lu means '%s'.\n", (ulong) err, strerror((int)err)); } fprintf(stderr, @@ -3151,7 +3151,7 @@ restart: if (os_aio_print_debug) { fprintf(stderr, -"InnoDB: i/o for slot %lu already done, returning\n", i); +"InnoDB: i/o for slot %lu already done, returning\n", (ulong) i); } ret = TRUE; @@ -3298,8 +3298,8 @@ consecutive_loop: if (os_aio_print_debug) { fprintf(stderr, "InnoDB: doing i/o of type %lu at offset %lu %lu, length %lu\n", - slot->type, slot->offset_high, slot->offset, - total_len); + (ulong) slot->type, (ulong) slot->offset_high, + (ulong) slot->offset, (ulong) total_len); } /* Do the i/o with ordinary, synchronous i/o functions: */ @@ -3309,8 +3309,9 @@ consecutive_loop: || (slot->offset % UNIV_PAGE_SIZE != 0)) { fprintf(stderr, "InnoDB: Error: trying a displaced write to %s %lu %lu, len %lu\n", - slot->name, slot->offset_high, - slot->offset, total_len); + slot->name, (ulong) slot->offset_high, + (ulong) slot->offset, + (ulong) total_len); ut_a(0); } @@ -3409,7 +3410,7 @@ recommended_sleep: if (os_aio_print_debug) { fprintf(stderr, "InnoDB: i/o handler thread for i/o segment %lu wakes up\n", - global_segment); + (ulong) global_segment); } goto restart; @@ -3491,7 +3492,8 @@ os_aio_print( } for (i = 0; i < srv_n_file_io_threads; i++) { - buf += sprintf(buf, "I/O thread %lu state: %s (%s)\n", i, + buf += sprintf(buf, "I/O thread %lu state: %s (%s)\n", + (ulong) i, srv_io_thread_op_info[i], srv_io_thread_function[i]); } @@ -3523,7 +3525,7 @@ loop: ut_a(array->n_reserved == n_reserved); - buf += sprintf(buf, " %lu", n_reserved); + buf += sprintf(buf, " %lu", (ulong) n_reserved); os_mutex_exit(array->mutex); @@ -3563,15 +3565,18 @@ loop: buf += sprintf(buf, "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); buf += sprintf(buf, "%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); if (os_file_n_pending_preads != 0 || os_file_n_pending_pwrites != 0) { buf += sprintf(buf, "%lu pending preads, %lu pending pwrites\n", - os_file_n_pending_preads, os_file_n_pending_pwrites); + (ulong) os_file_n_pending_preads, + (ulong) os_file_n_pending_pwrites); } if (os_n_file_reads == os_n_file_reads_old) { @@ -3585,7 +3590,7 @@ loop: "%.2f reads/s, %lu avg bytes/read, %.2f writes/s, %.2f fsyncs/s\n", (os_n_file_reads - os_n_file_reads_old) / time_elapsed, - (ulint)avg_bytes_read, + (ulong)avg_bytes_read, (os_n_file_writes - os_n_file_writes_old) / time_elapsed, (os_n_fsyncs - os_n_fsyncs_old) diff --git a/innobase/os/os0sync.c b/innobase/os/os0sync.c index 827d68501db..7cbaf1f5123 100644 --- a/innobase/os/os0sync.c +++ b/innobase/os/os0sync.c @@ -125,7 +125,7 @@ os_event_create( if (!event->handle) { fprintf(stderr, "InnoDB: Could not create a Windows event semaphore; Windows error %lu\n", - (ulint)GetLastError()); + (ulong) GetLastError()); } #else /* Unix */ os_event_t event; @@ -182,7 +182,7 @@ os_event_create_auto( if (!event->handle) { fprintf(stderr, "InnoDB: Could not create a Windows auto event semaphore; Windows error %lu\n", - (ulint)GetLastError()); + (ulong) GetLastError()); } /* Put to the list of events */ @@ -412,7 +412,7 @@ os_event_wait_multiple( FALSE, /* Wait for any 1 event */ INFINITE); /* Infinite wait time limit */ - ut_a(index >= WAIT_OBJECT_0); + ut_a(index >= WAIT_OBJECT_0); /* NOTE: Pointless comparision */ ut_a(index < WAIT_OBJECT_0 + n); if (srv_shutdown_state == SRV_SHUTDOWN_EXIT_THREADS) { |