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

Unreadable control characters printed as is in warnings

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 10.0(EOL), 10.1(EOL)
    • 10.5.1
    • Character Sets
    • None
    • 10.1.10, 10.1.11

    Description

      SELECT CAST(_latin1 0x01 AS INT);
      SHOW WARNINGS;

      returns this warning:

      +---------+------+----------------------------------------+
      | Level   | Code | Message                                |
      +---------+------+----------------------------------------+
      | Warning | 1292 | Truncated incorrect INTEGER value: '<garbage>�' |
      +---------+------+----------------------------------------+

      Notice, the unreadable control character 0x01 is printed as is. It should be escaped.

      Attachments

        Activity

          Hi julien.fritsch, I need to adjust the patch to the latest sources first.

          bar Alexander Barkov added a comment - Hi julien.fritsch , I need to adjust the patch to the latest sources first.
          bar Alexander Barkov added a comment - - edited

          As of version 10.5 the warning is better, but still not correct:

          SELECT CAST(_latin1 X'c000c1' AS SIGNED);
          SHOW WARNINGS;
          

          +---------+------+-----------------------------------------+
          | Level   | Code | Message                                 |
          +---------+------+-----------------------------------------+
          | Warning | 1292 | Truncated incorrect INTEGER value: 'À'  |
          +---------+------+-----------------------------------------+
          

          Notice, it breaks on the byte 0x00 and does not display the rest of the string.

          bar Alexander Barkov added a comment - - edited As of version 10.5 the warning is better, but still not correct: SELECT CAST (_latin1 X 'c000c1' AS SIGNED); SHOW WARNINGS; +---------+------+-----------------------------------------+ | Level | Code | Message | +---------+------+-----------------------------------------+ | Warning | 1292 | Truncated incorrect INTEGER value: 'À' | +---------+------+-----------------------------------------+ Notice, it breaks on the byte 0x00 and does not display the rest of the string.

          Control characters \t \r \n are displayed as is, which makes the output look not nice:

          SELECT CAST(_latin1 X'c00ac1' AS SIGNED);
          SHOW WARNINGS;
          

          +---------+------+--------------------------------------------+
          | Level   | Code | Message                                    |
          +---------+------+--------------------------------------------+
          | Warning | 1292 | Truncated incorrect INTEGER value: 'À
          Á'   |
          +---------+------+--------------------------------------------+
          

          This can be fixed later, if needed, in a separate MDEV.

          bar Alexander Barkov added a comment - Control characters \t \r \n are displayed as is, which makes the output look not nice: SELECT CAST (_latin1 X 'c00ac1' AS SIGNED); SHOW WARNINGS; +---------+------+--------------------------------------------+ | Level | Code | Message | +---------+------+--------------------------------------------+ | Warning | 1292 | Truncated incorrect INTEGER value: 'À Á' | +---------+------+--------------------------------------------+ This can be fixed later, if needed, in a separate MDEV.

          People

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