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

PCRE2 10.45 breaks main.func_regexp_pcre due to change in PCRE

Details

    Description

      Latest PCRE2 10.45 introduced a behavior change as a bugfix, which lead to behavior change in MariaDB with test failing:

          main.func_regexp_pcre                    w4 [ fail ]
                  Test ended at 2025-02-06 07:00:25
          CURRENT_TEST: main.func_regexp_pcre
          @@ -169,13 +169,13 @@
           \p{Latin}	㐗	0
           \p{Latin}	갷	0
           \p{Ll}	1	0
          -\p{Ll}	A	0
          +\p{Ll}	A	1
           \p{Ll}	a	1
          -\p{Ll}	À	0
          +\p{Ll}	À	1
           \p{Ll}	à	1
          -\p{Ll}	Σ	0
          +\p{Ll}	Σ	1
           \p{Ll}	σ	1
          -\p{Ll}	Я	0
          +\p{Ll}	Я	1
           \p{Ll}	я	1
           \p{Ll}	௨	0
           \p{Ll}	ප	0
      

      This was detected in Debian unstable that recently got PCRE2 updated 10.44 -> 10.45. See details in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1095286

      MariaDB could perhaps update PCRE2 to 10.45 starting from 11.8 series to avoid behavior change in a stable release?

      cvicentiu has details as per discussion in https://salsa.debian.org/mariadb-team/mariadb-server/-/merge_requests/102#note_582043

      Attachments

        Activity

          bar as the original author of the test case, can you perhaps offer your input on the matter, please?

          cvicentiu Vicențiu Ciorbaru added a comment - bar as the original author of the test case, can you perhaps offer your input on the matter, please?

          Another idea to help our userbase, should we decide to go the keep updating the PCRE library route:

          parse the regex and identify the

          \p{Ll} and \p{Lu}
          

          characters. Issue warnings when they are encountered.

          cvicentiu Vicențiu Ciorbaru added a comment - Another idea to help our userbase, should we decide to go the keep updating the PCRE library route: parse the regex and identify the \p{Ll} and \p{Lu} characters. Issue warnings when they are encountered.

          cvicentiu, my opinion always was (since a week ago, when I first saw https://salsa.debian.org/mariadb-team/mariadb-server/-/merge_requests/102) that it's a PRCE2 bug, old result was incorrect, now it is correct.

          serg Sergei Golubchik added a comment - cvicentiu , my opinion always was (since a week ago, when I first saw https://salsa.debian.org/mariadb-team/mariadb-server/-/merge_requests/102 ) that it's a PRCE2 bug, old result was incorrect, now it is correct.
          bar Alexander Barkov added a comment - - edited

          Switching to PCRE-10.45 in 11.8 sounds like a good idea.

          I propose we don't spend time on parsing the regex to identify

          \p{Ll} and \p{Lu}

          bar Alexander Barkov added a comment - - edited Switching to PCRE-10.45 in 11.8 sounds like a good idea. I propose we don't spend time on parsing the regex to identify \p{Ll} and \p{Lu}

          As discussed with monty, we clasify this change in behaviour as a bug in PCRE implementation in the past, thus we consider the new behaviour to be the correct one. Tests will be updated accordingly. We will have a more prominent note of this on the Release notes. This will be true for all versions 10.5 -> 11.8.

          cvicentiu Vicențiu Ciorbaru added a comment - As discussed with monty , we clasify this change in behaviour as a bug in PCRE implementation in the past, thus we consider the new behaviour to be the correct one. Tests will be updated accordingly. We will have a more prominent note of this on the Release notes. This will be true for all versions 10.5 -> 11.8.

          People

            serg Sergei Golubchik
            otto Otto Kekäläinen
            Votes:
            0 Vote for this issue
            Watchers:
            9 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.