mirror of
https://github.com/MariaDB/server.git
synced 2025-01-23 15:24:16 +01:00
2606cb9321
All but ss677 are against the mysql-5.1 tree only. Fixes the following bugs: - Bug #19834: Using cursors when running in READ-COMMITTED can cause InnoDB to crash - Bug #20213: DBT2 testing cause mysqld to core using Innodb - Bug #20493: on partition tables, select and show command casue server crash - Bug #21113: Duplicate printout in SHOW INNODB STATUS - Bug #21313: rsql_..._recover_innodb_tmp_table is redundant and broken - Bug #21467: Manual URL wrong in InnoDB "page corrupted" error report mysql-test/r/innodb.result: Applied innodb-5.1-ss677, -ss680, -ss713, and -ss720 snapshots. All but ss677 are against the mysql-5.1 tree only. innodb.result: Adjust Innodb_rows_inserted and Innodb_rows_updated to reflect the deleted statements in r420, which somehow reappeared in the MySQL tree. mysql-test/t/innodb.test: Applied innodb-5.1-ss677, -ss680, -ss713, and -ss720 snapshots. All but ss677 are against the mysql-5.1 tree only. sql/ha_innodb.cc: Applied innodb-5.1-ss677, -ss680, -ss713, and -ss720 snapshots. All but ss677 are against the mysql-5.1 tree only. ha_innobase::start_stmt(): patch from Heikki: Do not call read_view_close_for_mysql(). (Bug #19834) Fix Bug#20213 and its duplicates: stress test crashes of InnoDB-5.1 Fix Bug #20493 : we must prepare prebuilt->trx to point to the trx of this thd before using it Add update_thd() to several places in ha_innodb.cc to make sure prebuilt->trx points to the right trx object; in other functions add assertions that prebuilt->trx is for this thd; when 5.1 stabilizes, we can change these assertions to ut_ad() debug version assertions Remove redundant check_trx_exists() and ut_a() from r701, as suggested by Marko Correct all URLs pointing to the MySQL manual. (Bug #21467) storage/innobase/btr/btr0btr.c: Applied innodb-5.1-ss677, -ss680, -ss713, and -ss720 snapshots. All but ss677 are against the mysql-5.1 tree only. Correct all URLs pointing to the MySQL manual. (Bug #21467) storage/innobase/buf/buf0buf.c: Applied innodb-5.1-ss677, -ss680, -ss713, and -ss720 snapshots. All but ss677 are against the mysql-5.1 tree only. Correct all URLs pointing to the MySQL manual. (Bug #21467) storage/innobase/dict/dict0dict.c: Applied innodb-5.1-ss677, -ss680, -ss713, and -ss720 snapshots. All but ss677 are against the mysql-5.1 tree only. Correct all URLs pointing to the MySQL manual. (Bug #21467) storage/innobase/fil/fil0fil.c: Applied innodb-5.1-ss677, -ss680, -ss713, and -ss720 snapshots. All but ss677 are against the mysql-5.1 tree only. Make the tablespace cache hash size 100 or 1000 times bigger. Fixes bug #21112. After ut_print_timestamp(), always display " InnoDB:" (note two spaces). Correct all URLs pointing to the MySQL manual. (Bug #21467) storage/innobase/fsp/fsp0fsp.c: Applied innodb-5.1-ss677, -ss680, -ss713, and -ss720 snapshots. All but ss677 are against the mysql-5.1 tree only. Correct all URLs pointing to the MySQL manual. (Bug #21467) storage/innobase/ibuf/ibuf0ibuf.c: Applied innodb-5.1-ss677, -ss680, -ss713, and -ss720 snapshots. All but ss677 are against the mysql-5.1 tree only. ibuf_print(): Don't print redundant information. Fixes bug #21113. Remove non-varying variable ibuf->meter and related constant IBUF_THRESHOLD. storage/innobase/include/btr0cur.ic: Applied innodb-5.1-ss677, -ss680, -ss713, and -ss720 snapshots. All but ss677 are against the mysql-5.1 tree only. btr_cur_get_page(): Remove buggy assertion. storage/innobase/include/buf0buf.ic: Applied innodb-5.1-ss677, -ss680, -ss713, and -ss720 snapshots. All but ss677 are against the mysql-5.1 tree only. Correct all URLs pointing to the MySQL manual. (Bug #21467) storage/innobase/include/ibuf0ibuf.ic: Applied innodb-5.1-ss677, -ss680, -ss713, and -ss720 snapshots. All but ss677 are against the mysql-5.1 tree only. Remove non-varying variable ibuf->meter and related constant IBUF_THRESHOLD. storage/innobase/log/log0log.c: Applied innodb-5.1-ss677, -ss680, -ss713, and -ss720 snapshots. All but ss677 are against the mysql-5.1 tree only. Correct all URLs pointing to the MySQL manual. (Bug #21467) storage/innobase/log/log0recv.c: Applied innodb-5.1-ss677, -ss680, -ss713, and -ss720 snapshots. All but ss677 are against the mysql-5.1 tree only. Correct all URLs pointing to the MySQL manual. (Bug #21467) storage/innobase/os/os0file.c: Applied innodb-5.1-ss677, -ss680, -ss713, and -ss720 snapshots. All but ss677 are against the mysql-5.1 tree only. Correct all URLs pointing to the MySQL manual. (Bug #21467) storage/innobase/row/row0mysql.c: Applied innodb-5.1-ss677, -ss680, -ss713, and -ss720 snapshots. All but ss677 are against the mysql-5.1 tree only. Remove the special treatment of tables rsql_IDENTIFIER_recover_innodb_tmp_table, which is redundant and was broken with the introduction of the "safe" file name encoding of identifiers. (Bug #21313) ChangeSet@1.2181.173.1 2006-08-02 17:57:06+02:00 ingo@local Bug#18775 - Temporary table from alter table visible to other threads Continued implementation of WL#1324 (table name to filename encoding) Changed back the encoded temp file prefix to #sql. After ut_print_timestamp(), always display " InnoDB:" (note two spaces). Correct all URLs pointing to the MySQL manual. (Bug #21467) storage/innobase/row/row0sel.c: Applied innodb-5.1-ss677, -ss680, -ss713, and -ss720 snapshots. All but ss677 are against the mysql-5.1 tree only. Correct all URLs pointing to the MySQL manual. (Bug #21467) storage/innobase/row/row0vers.c: Applied innodb-5.1-ss677, -ss680, -ss713, and -ss720 snapshots. All but ss677 are against the mysql-5.1 tree only. row_vers_build_for_semi_consistent_read(): rec_trx_id was uninitialized in a comparison. Initialize it. storage/innobase/srv/srv0start.c: Applied innodb-5.1-ss677, -ss680, -ss713, and -ss720 snapshots. All but ss677 are against the mysql-5.1 tree only. Correct all URLs pointing to the MySQL manual. (Bug #21467) storage/innobase/ut/ut0dbg.c: Applied innodb-5.1-ss677, -ss680, -ss713, and -ss720 snapshots. All but ss677 are against the mysql-5.1 tree only. ut_dbg_assertion_failed(): Print space between timestamp and start of error message. After ut_print_timestamp(), always display " InnoDB:" (note two spaces). Correct all URLs pointing to the MySQL manual. (Bug #21467) storage/innobase/Makefile.am: Applied innodb-5.1-ss677, -ss680, -ss713, and -ss720 snapshots. All but ss677 are against the mysql-5.1 tree only.
96 lines
2.7 KiB
C
96 lines
2.7 KiB
C
/*********************************************************************
|
|
Debug utilities for Innobase.
|
|
|
|
(c) 1994, 1995 Innobase Oy
|
|
|
|
Created 1/30/1994 Heikki Tuuri
|
|
**********************************************************************/
|
|
|
|
#include "univ.i"
|
|
|
|
#if defined(__GNUC__) && (__GNUC__ > 2)
|
|
#else
|
|
/* This is used to eliminate compiler warnings */
|
|
ulint ut_dbg_zero = 0;
|
|
#endif
|
|
|
|
#if defined(UNIV_SYNC_DEBUG) || !defined(UT_DBG_USE_ABORT)
|
|
/* If this is set to TRUE all threads will stop into the next assertion
|
|
and assert */
|
|
ibool ut_dbg_stop_threads = FALSE;
|
|
#endif
|
|
#ifdef __NETWARE__
|
|
ibool panic_shutdown = FALSE; /* This is set to TRUE when on NetWare there
|
|
happens an InnoDB assertion failure or other
|
|
fatal error condition that requires an
|
|
immediate shutdown. */
|
|
#elif !defined(UT_DBG_USE_ABORT)
|
|
/* Null pointer used to generate memory trap */
|
|
|
|
ulint* ut_dbg_null_ptr = NULL;
|
|
#endif
|
|
|
|
/*****************************************************************
|
|
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 */
|
|
ulint line) /* in: line number of the assertion */
|
|
{
|
|
ut_print_timestamp(stderr);
|
|
fprintf(stderr,
|
|
" InnoDB: Assertion failure in thread %lu"
|
|
" in file %s line %lu\n",
|
|
os_thread_pf(os_thread_get_curr_id()), 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: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html\n"
|
|
"InnoDB: about forcing recovery.\n", stderr);
|
|
#if defined(UNIV_SYNC_DEBUG) || !defined(UT_DBG_USE_ABORT)
|
|
ut_dbg_stop_threads = TRUE;
|
|
#endif
|
|
}
|
|
|
|
#ifdef __NETWARE__
|
|
/*****************************************************************
|
|
Shut down MySQL/InnoDB after assertion failure. */
|
|
|
|
void
|
|
ut_dbg_panic(void)
|
|
/*==============*/
|
|
{
|
|
if (!panic_shutdown) {
|
|
panic_shutdown = TRUE;
|
|
innobase_shutdown_for_mysql();
|
|
}
|
|
exit(1);
|
|
}
|
|
#else /* __NETWARE__ */
|
|
# if defined(UNIV_SYNC_DEBUG) || !defined(UT_DBG_USE_ABORT)
|
|
/*****************************************************************
|
|
Stop a thread after assertion failure. */
|
|
|
|
void
|
|
ut_dbg_stop_thread(
|
|
/*===============*/
|
|
const char* file,
|
|
ulint line)
|
|
{
|
|
fprintf(stderr, "InnoDB: Thread %lu stopped in file %s line %lu\n",
|
|
os_thread_pf(os_thread_get_curr_id()), file, line);
|
|
os_thread_sleep(1000000000);
|
|
}
|
|
# endif
|
|
#endif /* __NETWARE__ */
|