Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-10764 PL/SQL parser - Phase 2
  3. MDEV-15739

sql_mode=ORACLE: Make LPAD and RPLAD return NULL instead of empty string

    XMLWordPrintable

Details

    Description

      Earlier we made the concatenation operator and functions SUBSTR, TRIM, LTRIM, RTRIM translate empty results to NULL when running with sql_mode=ORACLE.

      Under terms of this task we'll change LPAD and RPAD to do the same.

      SELECT
        CASE
          WHEN LPAD('a', 0) IS NULL THEN 'IS NULL'
          ELSE 'IS NOT NULL'
        END AS c
      FROM DUAL;
      

      C
      -----------
      IS NULL
      

      SELECT
        CASE
          WHEN RPAD('a', 0) IS NULL THEN 'IS NULL'
          ELSE 'IS NOT NULL'
        END AS c
      FROM DUAL;
      

      C
      -----------
      IS NULL
      

      Attachments

        Issue Links

          Activity

            People

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