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

IF() function is returning incorrect error

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.6.24
    • 10.6
    • OTHER
    • None

    Description

      The IF() function is not implemented in mysqltest. However, when we attempt to use IF() in test scripts, it is incorrectly interpreted as IFNULL(), leading to misleading or incorrect error messages during test execution.

      Test Case:

      let $lt36 = $(if(null,"   fallback", "   actual"));
      -- echo (if(null, "   fallback", "   actual") -> $lt36;
      

      Mysqltest Output:
      mysqltest: At line 1: ifnull() expects 2 arguments, got 3

      Server Output:

      MariaDB [(none)]> select if(null,"   fallback", "   actual");
      +-------------------------------------+
      | if(null,"   fallback", "   actual") |
      +-------------------------------------+
      |    actual                           |
      +-------------------------------------+
      1 row in set (0.001 sec)
      

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              poojalamba16 Pooja Rani Lamba
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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