1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-10411 Providing compatibility for basic PL/SQL constructs

Part 13: RETURN vs RETURNS in function definition:

  CREATE FUNCTION f1(a INT) RETURN INT ...

Part 12:  No parentheses if no arguments:

  CREATE FUNCTION f1 RETURN INT ...
This commit is contained in:
Alexander Barkov
2016-08-12 15:32:10 +04:00
parent bd76d44564
commit 0040b0f380
4 changed files with 61 additions and 17 deletions

View File

@@ -2230,7 +2230,10 @@ show_create_sp(THD *thd, String *buf,
buf->append(')');
if (type == TYPE_ENUM_FUNCTION)
{
buf->append(STRING_WITH_LEN(" RETURNS "));
if (sql_mode & MODE_ORACLE)
buf->append(STRING_WITH_LEN(" RETURN "));
else
buf->append(STRING_WITH_LEN(" RETURNS "));
buf->append(returns, returnslen);
}
buf->append('\n');