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

Start using system PCRE if available (instead of bundled PCRE)

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Fix
    • 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL)
    • N/A
    • Platform Debian
    • None

    Description

      We have been building against system PCRE for some years in Debian now, using patch: https://salsa.debian.org/mariadb-team/mariadb-10.4/-/blob/master/debian/patches/0024-Revert-to-using-system-pcre-library.patch

      In https://jira.mariadb.org/browse/MDEV-14900 Serg commented that we should use system PCRE but first find out why we were not using them in the first place.

      To me it looks like we used the bundled PCRE simply because we lacked that option or because system PCRE gave errors:

      Nowadays those problems should not exists anymore, as the use of the patch in downstream Debian packaging proves.

      Attachments

        Activity

          otto, it's clear from your 0024-Revert-to-using-system-pcre-library.patch. PCRE has a bug https://bugs.exim.org/show_bug.cgi?id=2173 that will not be fixed upstream. We have fixed it in our bundled pcre copy with the patch 440157cbbe7.

          This check, that you removed in your 0024 patch, checks whether system pcre have this bug fixed. If yes — we use system pcre, if no — we use our bundled version. Some distros use our patch and then our cmake check selects system pcre. On other distros it selects bundled pcre.

          You disabled this check — you got a broken server binary where regex sql function can crash the server.

          serg Sergei Golubchik added a comment - otto , it's clear from your 0024-Revert-to-using-system-pcre-library.patch . PCRE has a bug https://bugs.exim.org/show_bug.cgi?id=2173 that will not be fixed upstream. We have fixed it in our bundled pcre copy with the patch 440157cbbe7. This check, that you removed in your 0024 patch, checks whether system pcre have this bug fixed. If yes — we use system pcre, if no — we use our bundled version. Some distros use our patch and then our cmake check selects system pcre. On other distros it selects bundled pcre. You disabled this check — you got a broken server binary where regex sql function can crash the server.

          Note, this does not apply to 10.5, because 10.5 uses PCRE2, not PCRE1

          serg Sergei Golubchik added a comment - Note, this does not apply to 10.5, because 10.5 uses PCRE2, not PCRE1

          Thanks for pointing this out. I'll keep the issue assigned to myself and close it by documenting the status properly.

          otto Otto Kekäläinen added a comment - Thanks for pointing this out. I'll keep the issue assigned to myself and close it by documenting the status properly.

          Documented in https://salsa.debian.org/mariadb-team/mariadb-10.4/-/commit/d5b206fc7dba8fab2f92c2c09796ffdc5d48a0ab and closing this now, as it will never be fixed for pre-10.5 versions.

          otto Otto Kekäläinen added a comment - Documented in https://salsa.debian.org/mariadb-team/mariadb-10.4/-/commit/d5b206fc7dba8fab2f92c2c09796ffdc5d48a0ab and closing this now, as it will never be fixed for pre-10.5 versions.

          People

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