summaryrefslogtreecommitdiff
path: root/storage/innobase/trx/trx0sys.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-04-21 05:51:27 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2017-04-21 18:03:15 +0300
commit5684aa220cc4415fe8ee31ac044210b9ff8c7ce1 (patch)
tree4ea6a8d8abca09dd1ec49130748ab406b92dfe92 /storage/innobase/trx/trx0sys.cc
parent039a299b92545151501bce765aecafe3c062ef09 (diff)
downloadmariadb-git-5684aa220cc4415fe8ee31ac044210b9ff8c7ce1.tar.gz
MDEV-12488 Remove type mismatch in InnoDB printf-like calls
Alias the InnoDB ulint and lint data types to size_t and ssize_t, which are the standard names for the machine-word-width data types. Correspondingly, define ULINTPF as "%zu" and introduce ULINTPFx as "%zx". In this way, better compiler warnings for type mismatch are possible. Furthermore, use PRIu64 for that 64-bit format, and define the feature macro __STDC_FORMAT_MACROS to enable it on Red Hat systems. Fix some errors in error messages, and replace some error messages with assertions. Most notably, an IMPORT TABLESPACE error message in InnoDB was displaying the number of columns instead of the mismatching flags.
Diffstat (limited to 'storage/innobase/trx/trx0sys.cc')
-rw-r--r--storage/innobase/trx/trx0sys.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/innobase/trx/trx0sys.cc b/storage/innobase/trx/trx0sys.cc
index 24983dcc2a3..19d4a228eda 100644
--- a/storage/innobase/trx/trx0sys.cc
+++ b/storage/innobase/trx/trx0sys.cc
@@ -258,8 +258,8 @@ trx_sys_print_mysql_binlog_offset(void)
+ TRX_SYS_MYSQL_LOG_OFFSET_LOW);
fprintf(stderr,
- "InnoDB: Last MySQL binlog file position %lu %lu,"
- " file name %s\n",
+ "InnoDB: Last MySQL binlog file position " ULINTPF " " ULINTPF
+ ", file name %s\n",
trx_sys_mysql_bin_log_pos_high, trx_sys_mysql_bin_log_pos_low,
sys_header + TRX_SYS_MYSQL_LOG_INFO
+ TRX_SYS_MYSQL_LOG_NAME);