pingcap / pingcap/tidb

Parser: Add support for the DEFAULT ROLE clause in CREATE USER and ALTER USER statements

Open
#60,385 0 comments 0 reactions 0 assignees View on GitHub
compatibility-mysql80 compatibility-mysql84 type/feature-request
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Feature Request

**Is your feature request related to a problem? Please describe:**

Currently the parser fails to handle valid MySQL statements, such as:

```
CREATE USER foo DEFAULT ROLE bar;
```

This has downstream effects with libraries & tools like `go-mysql/canal` that will fail to handle these statements when a default role is specified.

**Describe the feature you'd like:**

The parser should be updated to support the `DEFAULT ROLE` clause in both `CREATE USER` and `ALTER USER` statements.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.