-- Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. -- -- 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 St, Fifth Floor, Boston, MA 02110-1301 USA
DROP FUNCTION IFEXISTS ps_thread_account;
DELIMITER $$
CREATE DEFINER='mariadb.sys'@'localhost' FUNCTION ps_thread_account (
in_thread_id BIGINTUNSIGNED
) RETURNS TEXT
COMMENT '
Description -----------
Return the user@host account for the given Performance Schema thread id.
Parameters -----------
in_thread_id (BIGINTUNSIGNED):
The id of the thread toreturn the account for.
SQL SECURITY INVOKER NOTDETERMINISTIC READSSQL DATA
BEGIN RETURN (SELECTIF(
type = 'FOREGROUND',
CONCAT(processlist_user, '@', processlist_host),
type
) AS account FROM `performance_schema`.`threads` WHERE thread_id = in_thread_id);
END$$
DELIMITER ;
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-10-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.