Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.4.5
-
Component/s: qc_sqlite
-
Labels:None
Description
MaxScale masking handles UNION correctly, but does not handle UNION ALL
mysql> SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT COL FROM TABLE LIMIT 2;
|
+------+
|
| 1 |
|
+------+
|
| 1 |
|
| 2 |
|
+------+
|
2 rows in set (0.00 sec)
|
|
mysql> SELECT 1 UNION SELECT 2 UNION SELECT COL FROM TABLE;
|
ERROR 1141 (HY000): The field COL that should be masked for 'user'@'host' is used in the second or subsequent SELECT of a UNION, access is denied.
|
config file setting:
[Mask-Strings]
|
type=filter
|
module=masking
|
large_payload=abort
|
rules=/etc/mask-rules.json
|
|
[Mask-Service]
|
type=service
|
filters=Mask-Strings
|
router=readwritesplit
|
servers=server1,server2
|
user=MAX_SCALE_USER
|
password=MAX_SCALE_PASSWORD
|
enable_root_user=false
|
|
{
|
"replace": {
|
"column": "COL"
|
},
|
"with": {
|
"value": ".",
|
"fill": "."
|
}
|