Data mask plugin not working on PS 5.7
General
Escalation
General
Escalation
Description
Environment
None
Smart Checklist
Activity
Show:
Aaditya Dubey May 11, 2022 at 8:51 AM
Hi @Carlos Tutte,
Thank you for the report.
Able to reproduce the issue, please find test case run below:
Server version: 5.7.37-40 Percona Server (GPL), Release 40, Revision 3a1347ec0d4
mysql [localhost:32691] {msandbox} ((none)) > INSTALL PLUGIN data_masking SONAME 'data_masking.so';
Query OK, 0 rows affected (0.04 sec)
mysql [localhost:32691] {msandbox} ((none)) > SELECT mask_inner('123456789', 1, 2);
ERROR 1046 (3D000): No database selected
mysql [localhost:32691] {msandbox} ((none)) > use test;
Database changed
mysql [localhost:32691] {msandbox} (test) > SELECT mask_inner('123456789', 1, 2);
ERROR 1305 (42000): FUNCTION test.mask_inner does not exist
mysql [localhost:32691] {msandbox} (test) > SELECT mask_pan (gen_rnd_pan());
ERROR 1305 (42000): FUNCTION test.mask_pan does not exist
mysql [localhost:32691] {msandbox} (test) > SELECT gen_blacklist('apple', 'fruit', 'nut');
ERROR 1305 (42000): FUNCTION test.gen_blacklist does not exist
Server version: 8.0.27-18 Percona Server (GPL), Release 18, Revision 24801e21b45
mysql [localhost:45002] {msandbox} (test) > INSTALL PLUGIN data_masking SONAME 'data_masking.so';
Query OK, 0 rows affected (0.05 sec)
mysql [localhost:45002] {msandbox} (test) > SELECT mask_inner('123456789', 1, 2);
+-------------------------------+
| mask_inner('123456789', 1, 2) |
+-------------------------------+
| 1XXXXXX89 |
+-------------------------------+
1 row in set (0.00 sec)
mysql [localhost:45002] {msandbox} (test) > SELECT mask_pan (gen_rnd_pan());
+--------------------------+
| mask_pan (gen_rnd_pan()) |
+--------------------------+
| XXXXXXXXXXXX8724 |
+--------------------------+
1 row in set (0.00 sec)
mysql [localhost:45002] {msandbox} (test) > SELECT gen_blacklist('apple', 'fruit', 'nut');
+----------------------------------------+
| gen_blacklist('apple', 'fruit', 'nut') |
+----------------------------------------+
| NULL |
+----------------------------------------+
1 row in set (0.00 sec)
Details
Details
Assignee
Unassigned
UnassignedReporter
Carlos Tutte
Carlos TutteComponents
Affects versions
Priority
Smart Checklist
Open Smart Checklist
Smart Checklist

Open Smart Checklist
Created May 7, 2022 at 5:29 PM
Updated March 6, 2024 at 10:11 AM
Data mask plugin was back ported on version 5.7.32 as shown on these release notes: https://www.percona.com/doc/percona-server/5.7/release-notes/Percona-Server-5.7.32-35.html
When trying to use the examples from the official doc ( https://www.percona.com/doc/percona-server/8.0/security/data-masking.html ) , functions do NOT exit on 5.7 (but same examples do work on 8.0) :
mysql> INSTALL PLUGIN data_masking SONAME 'data_masking.so';
Query OK, 0 rows affected (0.01 sec)
mysql> SELECT mask_inner('123456789', 1, 2);
ERROR 1305 (42000): FUNCTION test.mask_inner does not exist
mysql> SELECT mask_pan (gen_rnd_pan());
ERROR 1305 (42000): FUNCTION test.mask_pan does not exist
mysql> SELECT gen_blacklist('apple', 'fruit', 'nut');
ERROR 1305 (42000): FUNCTION test.gen_blacklist does not exist
Apart from the plugin not working on 5.7, links document for 5.7 are missing (only exist for 8.0)