2024-01-15 11:31:03 +00:00
|
|
|
DELIMITER $$
|
2024-06-17 12:51:04 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`debugAdd`(
|
|
|
|
vVariable VARCHAR(255),
|
|
|
|
vValue TEXT
|
|
|
|
)
|
2024-01-15 11:31:03 +00:00
|
|
|
MODIFIES SQL DATA
|
|
|
|
BEGIN
|
|
|
|
/**
|
|
|
|
* Añade una entrada de depuración en la tabla @debug.
|
|
|
|
*
|
|
|
|
* @param vVariable Nombre de variable
|
|
|
|
* @param vValue Valor de la variable
|
|
|
|
*/
|
|
|
|
DECLARE vIndex INT DEFAULT INSTR(USER(), '@');
|
|
|
|
|
|
|
|
INSERT INTO debug SET
|
|
|
|
`connectionId` = CONNECTION_ID(),
|
|
|
|
`user` = LEFT(USER(), vIndex - 1),
|
|
|
|
`host` = RIGHT(USER(), CHAR_LENGTH(USER()) - vIndex),
|
|
|
|
`variable` = vVariable,
|
|
|
|
`value` = vValue;
|
|
|
|
END$$
|
|
|
|
DELIMITER ;
|