2024-04-16 15:01:14 +00:00
|
|
|
DELIMITER $$
|
2024-07-22 09:52:42 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`ticket_setProblemTooLittle`(
|
2024-04-16 15:01:14 +00:00
|
|
|
vSelf INT
|
|
|
|
)
|
|
|
|
BEGIN
|
|
|
|
/**
|
2024-05-02 16:13:12 +00:00
|
|
|
* Update the problems when the ticket is too small or is no longer so
|
2024-04-16 15:01:14 +00:00
|
|
|
*
|
|
|
|
* @param vSelf Id del ticket
|
|
|
|
*/
|
2024-06-27 11:01:42 +00:00
|
|
|
|
2024-04-16 15:01:14 +00:00
|
|
|
CREATE OR REPLACE TEMPORARY TABLE tmp.ticket
|
2024-06-27 11:01:42 +00:00
|
|
|
(INDEX(ticketFk, isProblemCalcNeeded))
|
2024-04-16 15:01:14 +00:00
|
|
|
ENGINE = MEMORY
|
2024-06-27 11:01:42 +00:00
|
|
|
SELECT vSelf ticketFk,
|
|
|
|
ticket_isTooLittle(vSelf) hasProblem,
|
|
|
|
ticket_isProblemCalcNeeded(vSelf) isProblemCalcNeeded;
|
2024-04-16 15:01:14 +00:00
|
|
|
|
|
|
|
CALL ticket_setProblem('isTooLittle');
|
|
|
|
|
|
|
|
DROP TEMPORARY TABLE tmp.ticket;
|
2024-06-27 11:01:42 +00:00
|
|
|
|
2024-04-16 15:01:14 +00:00
|
|
|
END$$
|
|
|
|
DELIMITER ;
|