MySQL Forums
Forum List  »  Stored Procedures

Re: REGEXP_SUBSTR function missing
Posted by: ian diddams
Date: February 17, 2022 03:02AM

OK - stand down. Think I'm sorted :-)

Putting this here for archival purposes lest anybody else stumpble across this.

The fix (based on what it appears a developer did some while ago) was to copy regexp.so from a "working" server to

/usr/lib64/mysql/plugin/regexp.so (root:root 755)
restart mysqld

become root mysql user
> CREATE FUNCTION regexp_like RETURNS INTEGER SONAME "regexp.so";
> CREATE FUNCTION regexp_substr RETURNS STRING SONAME "regexp.so"
> CREATE FUNCTION regexp_instr RETURNS INTEGER SONAME "regexp.so"
> CREATE FUNCTION regexp_replace RETURNS STRING SONAME "regexp.so"

test function exists
> select * from mysql.func;

+-----------------------+-----+----------------+--------------+
| name | ret | dl | type |
+-----------------------+-----+----------------+--------------+
| regexp_like | 2 | regexp.so | function |
| regexp_substr | 0 | regexp.so | function |
| regexp_instr | 2 | regexp.so | function |
| regexp_replace | 0 | regexp.so | function |
+------------------------+-----+---------------+--------------+

many thanks for the help - its gratrefully received.

Options: ReplyQuote


Subject
Views
Written By
Posted
1144
February 16, 2022 02:34AM
358
February 16, 2022 03:39PM
339
February 17, 2022 02:26AM
Re: REGEXP_SUBSTR function missing
680
February 17, 2022 03:02AM
377
February 17, 2022 02:09AM
2367
February 17, 2022 09:49AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.