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

COLUMN_GET() produces warnings with no data

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.0(EOL), 10.1(EOL)
    • 10.1.8
    • Virtual Columns
    • None
    • 10.1.8-3

    Description

      SET @aaa = COLUMN_CREATE('price', 0xF0F1F2F3F4F5F6F7);
      SELECT COLUMN_GET(@aaa, 'price' AS DECIMAL) aaa;
      SHOW WARNINGS;

      returns this warning:

      +---------+------+---------------------------------------------------------+
      | Level   | Code | Message                                                 |
      +---------+------+---------------------------------------------------------+
      | Warning | 1918 | Encountered illegal value '' when converting to DECIMAL |
      +---------+------+---------------------------------------------------------+

      Notice, the empty string in the warning text, instead of the actual data.

      The expected result it to escape unreadable data, like it's done everything else, e.g:

      SELECT _binary 0xF1F2F3F4F5F6F7 + 0;
      SHOW WARNINGS;

      +---------+------+------------------------------------------------------------------+
      | Level   | Code | Message                                                          |
      +---------+------+------------------------------------------------------------------+
      | Warning | 1292 | Truncated incorrect DOUBLE value: '\xF1\xF2\xF3\xF4\xF5\xF6\xF7' |
      +---------+------+------------------------------------------------------------------+

      Attachments

        Activity

          bar Alexander Barkov created issue -
          bar Alexander Barkov made changes -
          Field Original Value New Value
          Summary COLUMN_GET() produces warnings with unreadable raw data COLUMN_GET() produces warnings with no data
          bar Alexander Barkov made changes -
          Description {code}
          SET @aaa = COLUMN_CREATE('price', 0xF0F1F2F3F4F5F6F7);
          SELECT COLUMN_GET(@aaa, 'price' AS DECIMAL) aaa;
          SHOW WARNINGS;
          {code}
          returns this warning:
          {noformat}
          +---------+------+-----------------------------------------------------------------+
          | Level | Code | Message |
          +---------+------+-----------------------------------------------------------------+
          | Warning | 1918 | Encountered illegal value '��������' when converting to DECIMAL |
          +---------+------+-----------------------------------------------------------------+
          {noformat}

          The expected result it to escape unreadable data, like it's done everything else, e.g:
          {code}
          SELECT _binary 0xF1F2F3F4F5F6F7 + 0;
          SHOW WARNINGS;
          {code}
          {noformat}
          +---------+------+------------------------------------------------------------------+
          | Level | Code | Message |
          +---------+------+------------------------------------------------------------------+
          | Warning | 1292 | Truncated incorrect DOUBLE value: '\xF1\xF2\xF3\xF4\xF5\xF6\xF7' |
          +---------+------+------------------------------------------------------------------+
          {noformat}
          {code}
          SET @aaa = COLUMN_CREATE('price', 0xF0F1F2F3F4F5F6F7);
          SELECT COLUMN_GET(@aaa, 'price' AS DECIMAL) aaa;
          SHOW WARNINGS;
          {code}
          returns this warning:
          {noformat}
          +---------+------+---------------------------------------------------------+
          | Level | Code | Message |
          +---------+------+---------------------------------------------------------+
          | Warning | 1918 | Encountered illegal value '' when converting to DECIMAL |
          +---------+------+---------------------------------------------------------+
          {noformat}
          Notice, the empty string in the warning text, instead of the actual data.

          The expected result it to escape unreadable data, like it's done everything else, e.g:
          {code}
          SELECT _binary 0xF1F2F3F4F5F6F7 + 0;
          SHOW WARNINGS;
          {code}
          {noformat}
          +---------+------+------------------------------------------------------------------+
          | Level | Code | Message |
          +---------+------+------------------------------------------------------------------+
          | Warning | 1292 | Truncated incorrect DOUBLE value: '\xF1\xF2\xF3\xF4\xF5\xF6\xF7' |
          +---------+------+------------------------------------------------------------------+
          {noformat}
          bar Alexander Barkov made changes -
          Rank Ranked higher
          bar Alexander Barkov made changes -
          Sprint 10.1.8-3 [ 15 ]
          bar Alexander Barkov made changes -
          Rank Ranked lower
          bar Alexander Barkov made changes -
          Fix Version/s 10.1.8 [ 19605 ]
          Fix Version/s 10.1 [ 16100 ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 71741 ] MariaDB v4 [ 149641 ]

          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.