Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] support OPTIMIZE TABLE Statement #716

Closed
hustjieke opened this issue Jan 11, 2021 · 0 comments
Closed

[feature] support OPTIMIZE TABLE Statement #716

hustjieke opened this issue Jan 11, 2021 · 0 comments
Assignees
Labels
P0 High priority type: feature

Comments

@hustjieke
Copy link
Contributor

MySQL 8.0 syntax:

OPTIMIZE [NO_WRITE_TO_BINLOG | LOCAL]
    TABLE tbl_name [, tbl_name] ...

In the code of 8.0, actually the key word of "TABLE" is "TABLE | TABLES", so radondb support syntax:

OPTIMIZE [NO_WRITE_TO_BINLOG | LOCAL]
    {TABLE | TABLES}  tbl_name [, tbl_name] ...
@hustjieke hustjieke added type: feature P0 High priority labels Jan 11, 2021
@hustjieke hustjieke self-assigned this Jan 11, 2021
hustjieke added a commit to hustjieke/radon that referenced this issue Jan 11, 2021
hustjieke added a commit to hustjieke/radon that referenced this issue Jan 11, 2021
hustjieke added a commit to hustjieke/radon that referenced this issue Jan 15, 2021
hustjieke added a commit to hustjieke/radon that referenced this issue Jan 15, 2021
[summary]
support optimize stmt:

```
OPTIMIZE [NO_WRITE_TO_BINLOG | LOCAL]
{TABLE | TABLES} tbl_name [, tbl_name] ...
```

[test case]
sqlparser/parse_test.go
src/planner/others_plan_test.go
src/proxy/optimize_test.go

[patch codecov]
src/planner/others_plan.go  93.6%
src/proxy/optimize.go 100%
src/proxy/query.go  94.7%
src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/ast.go  87.5%
BohuTANG added a commit that referenced this issue Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 High priority type: feature
Projects
None yet
Development

No branches or pull requests

1 participant