--- new/mysql-8.0.31/storage/innobase/lock/lock0lock.cc 2022-09-14 00:15:16.000000000 +0800 +++ mysql-8.0.31/storage/innobase/lock/lock0lock.cc 2023-04-03 18:47:44.773429238 +0800 @@ -34,7 +34,7 @@ #include #include - +#include "sql/mysqld.h" #include #include #include @@ -6318,6 +6318,15 @@ ut_print_timestamp(lock_latest_err_file); if (srv_print_all_deadlocks) { + if(log_error_verbosity <3) + { + ut::ostringstream buff; + ut_print_timestamp(stderr); + buff << " *** Transactions deadlock detected, dumping" + << " detailed information.\n"; + fputs(buff.str().c_str(), stderr); + return; + } ib::info(ER_IB_MSG_643) << "Transactions deadlock detected, dumping" << " detailed information."; } @@ -6394,6 +6403,15 @@ ut_ad(locksys::owns_exclusive_global_latch()); ut::ostringstream buff; buff << "\n*** (" << (pos_on_cycle + 1) << ") " << title << ":\n"; + if( log_error_verbosity <3) + { + ut::ostringstream buff_title; + buff_title << " *** " << title << ":"; + ut_print_timestamp(stderr); + fputs(buff_title.str().c_str(), stderr); + putc('\n', stderr); + return; + } print(buff.str().c_str()); }