mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 12:01:42 +01:00
89d80c1b0b
Define my_thread_id as an unsigned type, to avoid mismatch with ulonglong. Change some parameters to this type. Use size_t in a few more places. Declare many flag constants as unsigned to avoid sign mismatch when shifting bits or applying the unary ~ operator. When applying the unary ~ operator to enum constants, explictly cast the result to an unsigned type, because enum constants can be treated as signed. In InnoDB, change the source code line number parameters from ulint to unsigned type. Also, make some InnoDB functions return a narrower type (unsigned or uint32_t instead of ulint; bool instead of ibool).
61 lines
2.2 KiB
C++
61 lines
2.2 KiB
C++
/*****************************************************************************
|
|
|
|
Copyright (c) 1994, 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
|
|
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. */
|
|
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 http://bugs.mysql.com.\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: " REFMAN "forcing-innodb-recovery.html\n"
|
|
"InnoDB: about forcing recovery.\n", stderr);
|
|
|
|
fflush(stderr);
|
|
fflush(stdout);
|
|
abort();
|
|
}
|