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

MaxScale masking does not work with UNION ALL

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 2.4.5
    • 2.3.17, 2.4.7
    • qc_sqlite
    • 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

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

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.