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

fix: undo log sql #724

Merged
merged 4 commits into from
Dec 7, 2024
Merged

fix: undo log sql #724

merged 4 commits into from
Dec 7, 2024

Conversation

FinnTew
Copy link
Contributor

@FinnTew FinnTew commented Dec 2, 2024

What this PR does:

Fix the problem of MySQLUpdateUndoLogBuilder failing to generate undo log sql.

The reason for the failure is that BasicUndoLogBuilder.traversalArgs ignores the processing of the ParenthesesExpr node when recursively traversing ast.

Solved after adding the following code:

case *ast.ParenthesesExpr:
	expr := node.(*ast.ParenthesesExpr)
	b.traversalArgs(expr.Expr, argsIndex)
	break

Which issue(s) this PR fixes:

Fixes #593

Special notes for your reviewer:

Test samples for this issue have been added and all test cases have passed.

Does this PR introduce a user-facing change?:

NONE

@github-actions github-actions bot added the coding label Dec 2, 2024
@@ -121,6 +121,10 @@ func (b *BasicUndoLogBuilder) traversalArgs(node ast.Node, argsIndex *[]int32) {
b.traversalArgs(exprs[i], argsIndex)
}
break
case *ast.ParenthesesExpr:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个没问题

@luky116 luky116 merged commit 406b8ba into apache:master Dec 7, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

生成undo log sql失败
2 participants