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

QUOTE() does not wok well with NULL+UCS2

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 5.3.12, 5.5.39, 10.0.13
    • 10.4, 10.5, 10.6
    • None
    • None

    Description

      MariaDB [test]> SELECT QUOTE(CAST(NULL AS CHAR CHARACTER SET utf8)), QUOTE(_ucs2 0x0061), QUOTE(CAST(NULL AS CHAR CHARACTER SET ucs2));
      +----------------------------------------------+---------------------+----------------------------------------------+
      | QUOTE(CAST(NULL AS CHAR CHARACTER SET utf8)) | QUOTE(_ucs2 0x0061) | QUOTE(CAST(NULL AS CHAR CHARACTER SET ucs2)) |
      +----------------------------------------------+---------------------+----------------------------------------------+
      | NULL                                         | 'a'                 | 乕䱌                                         |
      +----------------------------------------------+---------------------+----------------------------------------------+
      1 row in set (0.00 sec)

      The expected result according to the manual
      for the third column should be a string 'NULL' (four letters),
      similar to the first column.

      For non-NULL values QUOTE seem to work fine for an UCS2 argument,
      as the second column demonstrates.

      Attachments

        Activity

          People

            bar Alexander Barkov
            bar Alexander Barkov
            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.