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: 添加enable_any_statement选项以支持所有语法 #301

Merged
merged 2 commits into from
Feb 9, 2021

Conversation

hanchuanchuan
Copy link
Owner

@hanchuanchuan hanchuanchuan commented Feb 8, 2021

仅支持TiDB解析器可正常解析的语法.

安全上有以下强限制:

  1. 用户名必须为root(无论是否开启goinception鉴权功能).因此可通过不同用户名实现权限隔离.
  2. 优先级低于现有的功能开关,如禁止删表的话(enable_drop_table=false),则即可允许所有语法也无法执行删除,尽可能保证数据安全性.
  3. 该功能为只读变量,不允许通过会话级进行设置

说明: 若出现语法错误(在MySQL中正常时),可创建Issue来指出该语法,以便更新SQL解析器.

@codecov
Copy link

codecov bot commented Feb 8, 2021

Codecov Report

Merging #301 (1af470d) into master (80727f9) will decrease coverage by 0.0028%.
The diff coverage is 4.0000%.

@@               Coverage Diff                @@
##             master       #301        +/-   ##
================================================
- Coverage   57.8255%   57.8226%   -0.0029%     
================================================
  Files           373        373                
  Lines         73746      73760        +14     
================================================
+ Hits          42644      42650         +6     
- Misses        26648      26657         +9     
+ Partials       4454       4453         -1     

@hanchuanchuan hanchuanchuan merged commit a6c0cfa into master Feb 9, 2021
@hanchuanchuan hanchuanchuan deleted the feature-any-statement branch February 9, 2021 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant