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

sysvar to control pcre match limit

    XMLWordPrintable

Details

    Description

      Under some conditions, the regexp function will raise a warning about some internal error:

      MariaDB [(none)]> SELECT 'mail@abcdefghijklmnopqr. com' REGEXP '@([[:alnum:]]*|[-]*|[.]*)*[.](com|net|us|tv|vg|qs|org|cc|tc|info|ws|ms|biz|bz|net|edu|es|fr|ru|nl|it|de|am|cl)';
      +--------------------------------------------------------------------------------------------------------------------------------------------------------+
      | 'mail@abcdefghijklmnopqr. com' REGEXP '@([[:alnum:]]*|[-]*|[.]*)*[.](com|net|us|tv|vg|qs|org|cc|tc|info|ws|ms|biz|bz|net|edu|es|fr|ru|nl|it|de|am|cl)' |
      +--------------------------------------------------------------------------------------------------------------------------------------------------------+
      |                                                                                                                                                      0 |
      +--------------------------------------------------------------------------------------------------------------------------------------------------------+
      1 row in set, 1 warning (0.18 sec)
       
      MariaDB [(none)]> SHOW WARNINGS;
      +---------+------+--------------------------------------------------------+
      | Level   | Code | Message                                                |
      +---------+------+--------------------------------------------------------+
      | Warning | 1139 | Got error 'pcre_exec: Internal error (-8)' from regexp |
      +---------+------+--------------------------------------------------------+
      1 row in set (0.00 sec)

      It might be related to string length. Changing the length of the string makes the message go away:

      MariaDB [(none)]> SELECT 'mail@abcdefghijklmnopq. com' REGEXP '@([[:alnum:]]*|[-]*|[.]*)*[.](com|net|us|tv|vg|qs|org|cc|tc|info|ws|ms|biz|bz|net|edu|es|fr|ru|nl|it|de|am|cl)';
      +-------------------------------------------------------------------------------------------------------------------------------------------------------+
      | 'mail@abcdefghijklmnopq. com' REGEXP '@([[:alnum:]]*|[-]*|[.]*)*[.](com|net|us|tv|vg|qs|org|cc|tc|info|ws|ms|biz|bz|net|edu|es|fr|ru|nl|it|de|am|cl)' |
      +-------------------------------------------------------------------------------------------------------------------------------------------------------+
      |                                                                                                                                                     0 |
      +-------------------------------------------------------------------------------------------------------------------------------------------------------+
      1 row in set (0.14 sec)

      Attachments

        Activity

          People

            bar Alexander Barkov
            GeoffMontee Geoff Montee (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            5 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.