26 lines
565 B
MySQL
26 lines
565 B
MySQL
|
DELIMITER $$
|
||
|
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`mockUtcTime`()
|
||
|
RETURNS datetime
|
||
|
DETERMINISTIC
|
||
|
BEGIN
|
||
|
/**
|
||
|
* Returns the UTC datetime in mockTime format or timeStamp depending on config table
|
||
|
*
|
||
|
* @return The UTC datetime format
|
||
|
*/
|
||
|
-- FIXME: #5041 Commented because there is slowness when querying a table
|
||
|
/*
|
||
|
DECLARE vMockEnabled BOOL;
|
||
|
|
||
|
SELECT mockEnabled INTO vMockEnabled FROM config LIMIT 1;
|
||
|
|
||
|
IF vMockEnabled THEN
|
||
|
RETURN mockTimeBase(TRUE);
|
||
|
ELSE
|
||
|
RETURN UTC_TIMESTAMP();
|
||
|
END IF;
|
||
|
*/
|
||
|
RETURN UTC_TIMESTAMP();
|
||
|
END$$
|
||
|
DELIMITER ;
|