mariadb/storage/innobase/ut/ut0dbg.cc
Marko Mäkelä dfde5ae912 MDEV-14130 InnoDB messages should not refer to the MySQL 5.7 manual
Replace most occurrences of the REFMAN macro. For some pages there
is no replacement yet.
2018-01-10 13:53:44 +02:00

62 lines
2.2 KiB
C++

/*****************************************************************************
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 2018, 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
Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
*****************************************************************************/
/*****************************************************************//**
@file ut/ut0dbg.cc
Debug utilities for Innobase.
Created 1/30/1994 Heikki Tuuri
**********************************************************************/
#include "ha_prototypes.h"
#include "ut0dbg.h"
/*************************************************************//**
Report a failed assertion. */
ATTRIBUTE_NORETURN
void
ut_dbg_assertion_failed(
/*====================*/
const char* expr, /*!< in: the failed assertion (optional) */
const char* file, /*!< in: source file containing the assertion */
unsigned line) /*!< in: line number of the assertion */
{
ut_print_timestamp(stderr);
fprintf(stderr, " InnoDB: Assertion failure in file %s line %u\n",
file, line);
if (expr) {
fprintf(stderr,
"InnoDB: Failing assertion: %s\n", expr);
}
fputs("InnoDB: We intentionally generate a memory trap.\n"
"InnoDB: Submit a detailed bug report"
" to https://jira.mariadb.org/\n"
"InnoDB: If you get repeated assertion failures"
" or crashes, even\n"
"InnoDB: immediately after the mysqld startup, there may be\n"
"InnoDB: corruption in the InnoDB tablespace. Please refer to\n"
"InnoDB: https://mariadb.com/kb/en/library/xtradbinnodb-recovery-modes/\n"
"InnoDB: about forcing recovery.\n", stderr);
fflush(stderr);
fflush(stdout);
abort();
}