Skip to content

Commit

Permalink
bugfix: DeleteExecutor. buildBeforeImageSQL keyword checker by db type (
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbxyyx authored and zjinlei committed Oct 16, 2019
1 parent d9d888d commit 1e74fac
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import java.util.List;
import java.util.StringJoiner;

import com.alibaba.druid.util.JdbcConstants;
import io.seata.rm.datasource.StatementProxy;
import io.seata.rm.datasource.sql.SQLDeleteRecognizer;
import io.seata.rm.datasource.sql.SQLRecognizer;
Expand Down Expand Up @@ -63,9 +62,9 @@ protected TableRecords beforeImage() throws SQLException {
}

private String buildBeforeImageSQL(SQLDeleteRecognizer visitor, TableMeta tableMeta, ArrayList<List<Object>> paramAppenderList) {
KeywordChecker keywordChecker = KeywordCheckerFactory.getKeywordChecker(JdbcConstants.MYSQL);
KeywordChecker keywordChecker = KeywordCheckerFactory.getKeywordChecker(getDbType());
String whereCondition = buildWhereCondition(visitor, paramAppenderList);
StringBuilder suffix = new StringBuilder(" FROM ").append(keywordChecker.checkAndReplace(getFromTableInSQL()));
StringBuilder suffix = new StringBuilder(" FROM ").append(getFromTableInSQL());
if (StringUtils.isNotBlank(whereCondition)) {
suffix.append(" WHERE ").append(whereCondition);
}
Expand Down

0 comments on commit 1e74fac

Please sign in to comment.