Skip to content

Support server-side column masking feature #65744

@tiancaiamao

Description

@tiancaiamao

Summary

Tracking issue for server-side column-level masking in TiDB.

Goal: support policy-based masking at query-result time, with optional operation restrictions and policy lifecycle management.

Scope

  • New masking policy DDL / SHOW syntax
  • Expression-based masking (CASE WHEN ..., current_user(), current_role())
  • RESTRICT ON operation controls
  • Supported masking functions and type coverage
  • System table metadata (masking_type, policy state, binding metadata)
  • Privilege model for policy management

Current Status (as of February 27, 2026)

Planned PR Breakdown

  • phase1-parser: syntax / AST / parser tests
  • phaseX-executor|planner|privilege|infoschema: incremental runtime implementation PRs
  • docs PRs for design/spec alignment when needed

Issue found

Notes

  • This feature is TiDB-specific (not full MySQL parity).
  • Current baseline follows the latest spec revision (no backward-compat layer for pre-merge drafts).

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects-8.5This bug affects the 8.5.x(LTS) versions.type/feature-requestCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions