Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Won't Fix
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)
|