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

implement Restore for DeleteStmt #189

Merged
merged 9 commits into from
Jan 28, 2019
Merged

implement Restore for DeleteStmt #189

merged 9 commits into from
Jan 28, 2019

Conversation

arnkore
Copy link
Contributor

@arnkore arnkore commented Jan 23, 2019

  1. implement Restore for DeleteStmt;
  2. fix issue#188 support parse tbl_name.* in delete multiple-table syntax;
    support restoring SQL text from a AST tree tidb#8532

Copy link
Contributor

@zier-one zier-one left a comment

Choose a reason for hiding this comment

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

rest LGTM

ast/dml.go Outdated

if n.IsMultiTable { // Multiple-Table Syntax
if n.BeforeFrom {
// DELETE [LOW_PRIORITY] [QUICK] [IGNORE]
Copy link
Contributor

Choose a reason for hiding this comment

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

remove L1425-L1428

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

ast/dml.go Outdated
return errors.Annotate(err, "An error occurred while restore DeleteStmt.TableRefs")
}
} else {
// DELETE [LOW_PRIORITY] [QUICK] [IGNORE]
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

ast/dml.go Outdated
}
}
} else { // Single-Table Syntax
// DELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM tbl_name
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

Copy link
Contributor

@kennytm kennytm left a comment

Choose a reason for hiding this comment

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

Rest LGTM

ast/dml.go Outdated Show resolved Hide resolved
parser.y Outdated Show resolved Hide resolved
parser_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@zier-one zier-one left a comment

Choose a reason for hiding this comment

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

LGTM

@zier-one zier-one added the status/LGT1 LGT1 label Jan 24, 2019
@zier-one
Copy link
Contributor

@kennytm PTAL

Copy link
Contributor

@kennytm kennytm left a comment

Choose a reason for hiding this comment

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

LGTM

@kennytm kennytm added status/LGT2 LGT2 and removed status/LGT1 LGT1 labels Jan 26, 2019
@zier-one zier-one merged commit 3984445 into pingcap:master Jan 28, 2019
tiancaiamao pushed a commit to tiancaiamao/parser that referenced this pull request Apr 27, 2021
lyonzhi pushed a commit to lyonzhi/parser that referenced this pull request Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tidb parser cann't parse tbl_name.* in delete multiple-table syntax
3 participants