--- ../mysql-8.0.32/sql/log.cc 2022-12-16 23:34:44.000000000 +0800 +++ mysql-8.0.32/sql/log.cc 2023-02-16 19:26:00.155830417 +0800 @@ -755,7 +755,8 @@ " Sort_rows: %lu Sort_scan_count: %lu" " Created_tmp_disk_tables: %lu" " Created_tmp_tables: %lu" - " Start: %s End: %s\n", + " Start: %s End: %s" + " Database: %s\n", query_time_buff, lock_time_buff, (ulong)thd->get_sent_row_count(), (ulong)thd->get_examined_row_count(), (ulong)thd->thread_id(), static_cast( @@ -791,7 +792,9 @@ thd->copy_status_var_ptr->created_tmp_disk_tables), (ulong)(thd->status_var.created_tmp_tables - thd->copy_status_var_ptr->created_tmp_tables), - start_time_buff, end_time_buff) == (uint)-1) + start_time_buff, end_time_buff) == (uint)-1, + (thd->db().str) + ) goto err; /* purecov: inspected */ }