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

parse errors in loadable UCA / LDML collations are silently ignored

    Details

      Description

      [12 Jun 21:22] Hartmut Holzgraefe

      Description:
      When defining a UCA collation using LDML syntax in share/charsets/Index.xml any syntax errors in the collation definitions lead to the collation not being available after mysqld restart without providing any startup error message about the parse failure whatsoever.

      How to repeat:

      • restart mysqld and verify that columns using utf8_phone_ci can be used
      • now add a parse error, e.g. by simply removing the 'u' after the backslash in one of the unicode code point definitions, like replacing

      <reset>\u0000</reset>

      with

      <reset>\0000</reset>

      • restart the server once more
      • verify that utf8_phone_ci can't be used anymore
      • check the mysqld error log for any collation related error message

      => there is none

      Suggested fix:
      Report errors found while parsing the loadable collations during startup to the mysqld error log

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Show
              hholzgra Hartmut Holzgraefe added a comment - See also http://bugs.mysql.com/bug.php?id=65593
              Show
              serg Sergei Golubchik added a comment - http://lists.mysql.com/commits/144273
              Hide
              serg Sergei Golubchik added a comment -

              fixed in mysql-5.6.6

              Show
              serg Sergei Golubchik added a comment - fixed in mysql-5.6.6
              Hide
              elenst Elena Stepanova added a comment -

              Alexander Barkov,
              If it's still relevant after aall changes you've made regarding character sets, maybe it makes sense to merge this fix of yours?

              If the bug is irrelevant to the current version, please just close it.

              Show
              elenst Elena Stepanova added a comment - Alexander Barkov , If it's still relevant after aall changes you've made regarding character sets, maybe it makes sense to merge this fix of yours? If the bug is irrelevant to the current version, please just close it.
              Hide
              bar Alexander Barkov added a comment - - edited

              The problem does not present in 10.0, as the fix for MySQL Bug #65593 was earlier merged into 10.0.5 under terms of MDEV-4928.
              Collation definition syntax errors are now reported to stderr without problems.

              Note, 10.0 also extends the limits of the reset and shift sequences,
              so it won't be possible to see the error using the example from this bug report:
              <reset>\0000</reset>

              It's now a valid sequence, it means resetting to a sequence of five characters (backslash followed by four zeros).

              Hmm, perhaps literal use of the backslash character should have been disallowed from the very beginning... Would be helpful to avoid typos like this.

              Show
              bar Alexander Barkov added a comment - - edited The problem does not present in 10.0, as the fix for MySQL Bug #65593 was earlier merged into 10.0.5 under terms of MDEV-4928 . Collation definition syntax errors are now reported to stderr without problems. Note, 10.0 also extends the limits of the reset and shift sequences, so it won't be possible to see the error using the example from this bug report: <reset>\0000</reset> It's now a valid sequence, it means resetting to a sequence of five characters (backslash followed by four zeros). Hmm, perhaps literal use of the backslash character should have been disallowed from the very beginning... Would be helpful to avoid typos like this.

                People

                • Assignee:
                  bar Alexander Barkov
                  Reporter:
                  hholzgra Hartmut Holzgraefe
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: