Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-5836

clang-8 reports broken source encoding in scripts/sql_commands_help_data.h

Details

    • Bug
    • Status: Done
    • Medium
    • Resolution: Fixed
    • 5.7.26-29, 8.0.16-7
    • 5.7.28-31, 8.0.18-9
    • None

    Description

      clang-8 reported the following issue:

      In file included from /data/mysql-server/5.7/sql/sql_initialize.cc:30:
      /data/mysql-server/5.7-debug-clang8-tokudb/include/../scripts/sql_commands_help_data.h:316:121: error: 
            illegal character encoding in string literal [-Werror,-Winvalid-source-encoding]
        ...[COLLATE collation_name]\\n\\nA TEXT column with a maximum length of 16,777,215 (224 <E2><88>"
                                                                                                ^~~~~~~~
      /data/mysql-server/5.7-debug-clang8/include/../scripts/sql_commands_help_data.h:317:4: error: 
            illegal character encoding in string literal [-Werror,-Winvalid-source-encoding]
        "<92> 1)\\ncharacters. The effective maximum length is less if the value contains\\nmultibyte ...
         ^~~~
      2 errors generated.
      

      Clang-8 is right as utf-8 encoded characters (3 bytes in this case) shouldn't be split into two separate lines.

      Attachments

        Activity

          People

            przemyslaw.skibinski Przemyslaw Skibinski
            przemyslaw.skibinski Przemyslaw Skibinski
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Smart Checklist