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

LPAD/RPAD with an empty padstr return NULL (MySQL returns the original string)

    XMLWordPrintable

Details

    Description

      SELECT LPAD('abc', 10, ''), RPAD('abc', 10, '');
      – MariaDB: NULL NULL <-- empty padstr makes the whole function NULL
      – MySQL: abc abc <-- returns the original string when padding is impossible/unneeded
      SELECT LPAD('abc', 3, '') AS l2; – length already satisfied, no pad needed at all:
      – MariaDB: NULL MySQL: abc

      Attachments

        Activity

          People

            raghunandan.bhat Raghunandan Bhat
            chunlingqin chunlingqin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 0d
                0d
                Remaining:
                Remaining Estimate - 2d
                2d
                Logged:
                Time Spent - Not Specified
                Not Specified

                Git Integration

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