diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-04-21 05:51:27 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-04-21 18:03:15 +0300 |
commit | 5684aa220cc4415fe8ee31ac044210b9ff8c7ce1 (patch) | |
tree | 4ea6a8d8abca09dd1ec49130748ab406b92dfe92 /storage/innobase/data | |
parent | 039a299b92545151501bce765aecafe3c062ef09 (diff) | |
download | mariadb-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/data')
-rw-r--r-- | storage/innobase/data/data0data.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/innobase/data/data0data.cc b/storage/innobase/data/data0data.cc index 8b1900face7..d819ad50ed9 100644 --- a/storage/innobase/data/data0data.cc +++ b/storage/innobase/data/data0data.cc @@ -429,7 +429,7 @@ print_hex: fputs(" Hex: ",stderr); for (i = 0; i < len; i++) { - fprintf(stderr, "%02lx", static_cast<ulong>(*data++)); + fprintf(stderr, "%02x", *data++); } if (dfield_is_ext(dfield)) { |