Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-8812

Giving an alias to function argument (now can make the query to fail)

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Won't Fix
    • N/A
    • Parser
    • None

    Description

      The query, calling a UDF:

      select Json_Object(5 as "five", 7 as "seven");

      works fine; however, this one:

      select greatest(5 as "five", 7 as "seven");

      fails saying: "Incorrect parameters in the call to native function "greatest".

      Indeed, in this case, aliases are useless but why flag this as an error? Perhaps a warning saying that these aliases are ignored would be acceptable.

      BTW: The MariaDB documentation on aliases (in the tutorial) does not say anything about aliasing function arguments. This is an important feature for UDF's as it correspond to the attribute of arguments.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              bertrandop Olivier Bertrand
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.