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

Merge Bug#18935421 RPAD DIES WITH CERTAIN PADSTR INTPUTS..

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 5.5.40
    • 5.5.41
    • Character Sets
    • None

    Description

      The fix is available at:
      https://bazaar.launchpad.net/~mysql/mysql-server/5.5/revision/tor.didriksen@oracle.com-20140707100530-itmypugpsoaejqtv
      without tests though.

      Test case:

      SELECT RPAD(_utf16 0x0061 COLLATE utf16_unicode_ci, 10000, 0x0061DE989999)

      Also, rpad returns a wrong result in some cases (not repeatable in 10.0):

      mysql> select hex(rpad(0x0061DDDD,2, _utf16 0x0000 COLLATE utf16_general_ci));
      +-----------------------------------------------------------------+
      | hex(rpad(0x0061DDDD,2, _utf16 0x0000 COLLATE utf16_general_ci)) |
      +-----------------------------------------------------------------+
      | 0061DDDD0000                                                    |
      +-----------------------------------------------------------------+

      The expected result is NULL, as DDDD is not a valid code in utf16.

      More bad result examples (not repeatable in 10.0):

      mysql> SELECT HEX(RPAD(_utf16 0x0061 COLLATE utf16_unicode_ci, 3, 0x0061DDDD9999));
      +----------------------------------------------------------------------+
      | HEX(RPAD(_utf16 0x0061 COLLATE utf16_unicode_ci, 3, 0x0061DDDD9999)) |
      +----------------------------------------------------------------------+
      | 00610061DDDD99990061                                                 |
      +----------------------------------------------------------------------+

      The expected result is NULL, as DDDD is not a valid utf16 character.

      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.