summaryrefslogtreecommitdiff
path: root/storage/innobase/include/mtr0log.ic
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/include/mtr0log.ic
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/include/mtr0log.ic')
-rw-r--r--storage/innobase/include/mtr0log.ic20
1 files changed, 6 insertions, 14 deletions
diff --git a/storage/innobase/include/mtr0log.ic b/storage/innobase/include/mtr0log.ic
index 701f1482e64..972fdc81518 100644
--- a/storage/innobase/include/mtr0log.ic
+++ b/storage/innobase/include/mtr0log.ic
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2017, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -227,20 +228,11 @@ mlog_write_initial_log_record_fast(
if (space == TRX_SYS_SPACE
&& offset >= FSP_EXTENT_SIZE && offset < 3 * FSP_EXTENT_SIZE) {
- if (buf_dblwr_being_created) {
- /* Do nothing: we only come to this branch in an
- InnoDB database creation. We do not redo log
- anything for the doublewrite buffer pages. */
- return(log_ptr);
- } else {
- ib::error() << "Trying to redo log a record of type "
- << type << " on page "
- << page_id_t(space, offset) << "in the"
- " doublewrite buffer, continuing anyway."
- " Please post a bug report to"
- " bugs.mysql.com.";
- ut_ad(0);
- }
+ ut_ad(buf_dblwr_being_created);
+ /* Do nothing: we only come to this branch in an
+ InnoDB database creation. We do not redo log
+ anything for the doublewrite buffer pages. */
+ return(log_ptr);
}
return(mlog_write_initial_log_record_low(type, space, offset,