Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL)
Description
This query:
DROP FUNCTION IF EXISTS SYSDATE; |
works normally and returns no errors.
This query:
CREATE FUNCTION SYSDATE() RETURNS INT RETURN 10; |
returns an error:
ERROR 1064 (42000): You have an error in your SQL syntax ... near 'SYSDATE() ...
|
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:
DROP FUNCTION IF EXISTS CONCAT; |
CREATE FUNCTION CONCAT(a TEXT) RETURNS TEXT RETURN 'test'; |
SELECT test.CONCAT('dummy'); |
DROP FUNCTION CONCAT; |
Attachments
Issue Links
- is part of
-
MDEV-10137 Providing compatibility to other databases
- Open