2024-01-15 11:31:03 +00:00
|
|
|
DELIMITER $$
|
2024-08-20 08:06:10 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`mysqlPreparedCount_check`()
|
2024-01-15 11:31:03 +00:00
|
|
|
BEGIN
|
|
|
|
DECLARE vPreparedCount INTEGER;
|
|
|
|
|
|
|
|
SELECT VARIABLE_VALUE INTO vPreparedCount
|
|
|
|
FROM INFORMATION_SCHEMA.GLOBAL_STATUS
|
|
|
|
WHERE VARIABLE_NAME LIKE '%prepared_stmt_count%';
|
|
|
|
|
|
|
|
IF(vPreparedCount >= 40000) THEN
|
|
|
|
CALL `vn`.`mail_insert`('cau@verdnatura.es',
|
|
|
|
NULL,
|
|
|
|
'Problemas BBDD prepared_stmt_count',
|
|
|
|
CONCAT('Existen problemas con el servicio de Logiflora, prepared_stmt_count con valor: ',
|
|
|
|
vPreparedCount,
|
|
|
|
', está próximo a exceder su límite. \r\n Hay que reiniciar el servicio LF.VMP.Service del servidor a3.')
|
|
|
|
);
|
|
|
|
END IF;
|
|
|
|
|
|
|
|
END$$
|
|
|
|
DELIMITER ;
|