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

Check if it's Ok for Item_func_nullif to have two args[x] refer to the same Item

    XMLWordPrintable

Details

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

    Description

      Item_func_nullif does this trick:

        // Put "a" to args[0] for comparison and to args[2] for the returned value.
        Item_func_nullif(THD *thd, Item *a, Item *b):
          Item_func_hybrid_field_type(thd, a, b, a)  
        {}

      to emulate CASE WHEN a=b THEN NULL ELSE a END

      It seems to work fine, but needs theoretical proves that it's OK to do this way.

      Attachments

        Activity

          People

            bar Alexander Barkov
            bar Alexander Barkov
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.