alibaba / alibaba/otter

关于过滤“危险”SQL语句

Open
#656 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
8.1k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

由于项目需求,需要对一些“危险”语句进行过滤(即:不进行同步)。所以想在EventProcessor中,通过EventData.getSql()方法获取同步的SQL语句,但实际情况是无法获取insert、update、delete场景下的SQL语句。但是,我在看EventData类中的sql字段描述时,上面的描述是可以获取动态的SQL。是否有大神可以指点下。谢谢。

![image](https://user-images.githubusercontent.com/45141175/48979623-dcb1de00-f0f8-11e8-970d-a3b411497579.png)
![image](https://user-images.githubusercontent.com/45141175/48979631-f4896200-f0f8-11e8-8f23-b0e5135f94d7.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading EventProcessor and EventData, especially the EventData.sql field description and getSql() behavior for insert, update, and delete events. Trace how these events are represented during synchronization and determine what existing tests cover; done should be defined as reliably identifying or filtering the requested dangerous statements.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases, distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.