works normally and returns no errors.
returns an error:
There is an inconsistency in here.
Either both queries should return an error, or both work with no errors.
The best solution is to make both queries work, as we generally allow to create stored functions that have the same names with built-in functions: