Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.5.18
-
None
-
Debian 11
Description
Calling a simple function which uses STR_TO_DATE twice to safely return a date produces an error while the same code run as a select produces (the expected) warning.
DELIMITER $$
|
CREATE DEFINER=`root`@`localhost` FUNCTION `safe_date`(`date_str` VARCHAR(30)) RETURNS datetime |
NO SQL |
DETERMINISTIC
|
return COALESCE(STR_TO_DATE(date_str,'%d/%m/%Y'),STR_TO_DATE(date_str,'%Y-%m-%d'))$$ |
DELIMITER ;
|