MDEV-23371: Crash in _db_doprnt_ via que_thr_step()
Something appears to be broken in the DBUG subsystem. Let us remove frequent calls to it from the InnoDB internal SQL interpreter that is used in the purge of transaction history. The DBUG_PRINT in que_eval_sql() can remain for now, because those operations are much less frequent.
This commit is contained in:
parent
9ac8be4e29
commit
49a0ad695b
@ -1,7 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, 2021, MariaDB Corporation.
|
||||
Copyright (c) 2017, 2022, 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
|
||||
@ -402,17 +402,10 @@ que_graph_free_recursive(
|
||||
ind_node_t* cre_ind;
|
||||
purge_node_t* purge;
|
||||
|
||||
DBUG_ENTER("que_graph_free_recursive");
|
||||
|
||||
if (node == NULL) {
|
||||
|
||||
DBUG_VOID_RETURN;
|
||||
return;
|
||||
}
|
||||
|
||||
DBUG_PRINT("que_graph_free_recursive",
|
||||
("node: %p, type: " ULINTPF, node,
|
||||
que_node_get_type(node)));
|
||||
|
||||
switch (que_node_get_type(node)) {
|
||||
|
||||
case QUE_NODE_FORK:
|
||||
@ -558,8 +551,6 @@ que_graph_free_recursive(
|
||||
default:
|
||||
ut_error;
|
||||
}
|
||||
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
/**********************************************************************//**
|
||||
@ -892,65 +883,6 @@ que_node_get_containing_loop_node(
|
||||
return(node);
|
||||
}
|
||||
|
||||
#ifndef DBUG_OFF
|
||||
/** Gets information of an SQL query graph node.
|
||||
@return type description */
|
||||
static MY_ATTRIBUTE((warn_unused_result, nonnull))
|
||||
const char*
|
||||
que_node_type_string(
|
||||
/*=================*/
|
||||
const que_node_t* node) /*!< in: query graph node */
|
||||
{
|
||||
switch (que_node_get_type(node)) {
|
||||
case QUE_NODE_SELECT:
|
||||
return("SELECT");
|
||||
case QUE_NODE_INSERT:
|
||||
return("INSERT");
|
||||
case QUE_NODE_UPDATE:
|
||||
return("UPDATE");
|
||||
case QUE_NODE_WHILE:
|
||||
return("WHILE");
|
||||
case QUE_NODE_ASSIGNMENT:
|
||||
return("ASSIGNMENT");
|
||||
case QUE_NODE_IF:
|
||||
return("IF");
|
||||
case QUE_NODE_FETCH:
|
||||
return("FETCH");
|
||||
case QUE_NODE_OPEN:
|
||||
return("OPEN");
|
||||
case QUE_NODE_PROC:
|
||||
return("STORED PROCEDURE");
|
||||
case QUE_NODE_FUNC:
|
||||
return("FUNCTION");
|
||||
case QUE_NODE_LOCK:
|
||||
return("LOCK");
|
||||
case QUE_NODE_THR:
|
||||
return("QUERY THREAD");
|
||||
case QUE_NODE_COMMIT:
|
||||
return("COMMIT");
|
||||
case QUE_NODE_UNDO:
|
||||
return("UNDO ROW");
|
||||
case QUE_NODE_PURGE:
|
||||
return("PURGE ROW");
|
||||
case QUE_NODE_ROLLBACK:
|
||||
return("ROLLBACK");
|
||||
case QUE_NODE_CREATE_TABLE:
|
||||
return("CREATE TABLE");
|
||||
case QUE_NODE_CREATE_INDEX:
|
||||
return("CREATE INDEX");
|
||||
case QUE_NODE_FOR:
|
||||
return("FOR LOOP");
|
||||
case QUE_NODE_RETURN:
|
||||
return("RETURN");
|
||||
case QUE_NODE_EXIT:
|
||||
return("EXIT");
|
||||
default:
|
||||
ut_ad(0);
|
||||
return("UNKNOWN NODE TYPE");
|
||||
}
|
||||
}
|
||||
#endif /* !DBUG_OFF */
|
||||
|
||||
/**********************************************************************//**
|
||||
Performs an execution step on a query thread.
|
||||
@return query thread to run next: it may differ from the input
|
||||
@ -978,10 +910,6 @@ que_thr_step(
|
||||
|
||||
old_thr = thr;
|
||||
|
||||
DBUG_PRINT("ib_que", ("Execute %u (%s) at %p",
|
||||
unsigned(type), que_node_type_string(node),
|
||||
(const void*) node));
|
||||
|
||||
if (type & QUE_NODE_CONTROL_STAT) {
|
||||
if ((thr->prev_node != que_node_get_parent(node))
|
||||
&& que_node_get_next(thr->prev_node)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user