Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-2850

MaxScale masking does not work with UNION ALL

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.5
    • Fix Version/s: 2.3.17, 2.4.7
    • 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": "."
            }
      

        Attachments

          Activity

            People

            Assignee:
            johan.wikman Johan Wikman
            Reporter:
            muhammad.irfan Muhammad Irfan
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: