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

bugfix: when tableName is keyword, the insert operation will get afterImage fail #2053

Merged
merged 9 commits into from
Dec 18, 2019
Prev Previous commit
Next Next commit
bugfix: when tableName is keyword, the insert operation will get afte…
…rImage fail.

Signed-off-by: slievrly <slievrly@163.com>
  • Loading branch information
slievrly committed Dec 17, 2019
commit 380e9d3506c433fe9da5c0450af0578ed0c5fb49
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,8 @@ protected TableRecords buildTableRecords(TableMeta tableMeta, String selectSQL,
protected TableRecords buildTableRecords(List<Object> pkValues) throws SQLException {
TableRecords afterImage;
String pk = getTableMeta().getPkName();
StringJoiner pkValuesJoiner =
new StringJoiner(" , ", "SELECT * FROM " + getFromTableInSQL() + " WHERE " + pk + " in (",
")");
StringJoiner pkValuesJoiner = new StringJoiner(" , ",
"SELECT * FROM " + getFromTableInSQL() + " WHERE " + pk + " in (", ")");
for (Object pkValue : pkValues) {
pkValuesJoiner.add("?");
}
Expand Down