Comments - would some one tell me what is wrong with this function
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.
I just added 'Create' at the beginning of the function.
now I'm getting this error:
ERROR 1418: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
What does that mean?
I had to execute this line SET GLOBAL log_bin_trust_function_creators = 1; now it's working fine !
Make sure you understand what log_bin_trust_function_creators does and that you're happy setting it. Alternatively, read up on what DETERMINISTIC, NO SQL and READS SQL DATA do and use one of them in your definition.
I added DETERMINISTIC at return clause. I guess that would do it! Thanks!!!