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

mysql command line client prints broken tables for combining characters

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.0.4, 5.1.67, 5.2.14, 5.3.12, 5.5.33a
    • 10.2
    • None
    • None

    Description

      The query below selects a sequence consisting of three
      Unicode code points:

      U+0055 LATIN CAPITAL LETTER U
      U+031B COMBINING HORN
      U+0323 COMBINING DOT BELOW

      They make all together a single letter equivalent to
      "U+1EF0 LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW"
      and occupy a single cell in the terminal screen.
      The combining marks are printed on top and below the letter U.

      The code in "mysql" client erroneously considers combining marks
      as normal characters, each occupying its own cell in the screen.
      As a result, any sequence with combining marks prints a broken
      table with the rightmost border put on a wrong place:

      mysql> select _ucs2 0x0055031B0323;
      +----------------------+
      | _ucs2 0x0055031B0323 |
      +----------------------+
      | Ự                  |
      +----------------------+
      1 row in set (0.00 sec)

      Note, the border is correct in case of the equivalent pre-composed character:

      mysql> select _ucs2 0x1EF0;
      +--------------+
      | _ucs2 0x1EF0 |
      +--------------+
      | Ự            |
      +--------------+
      1 row in set (0.00 sec)

      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.