Skip to content

Commit

Permalink
bugfix: jdbc parameter set null (apache#1879)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbxyyx authored and slievrly committed Nov 8, 2019
1 parent 4f28687 commit 6e7d88c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ dependency-reduced-pom.xml
/server/sessionStore/
/server/db_store/
/sessionStore/
/test/sessionStore/
/distribution/sessionStore/

# system ignore
.DS_Store
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlOutputVisitor;

import io.seata.rm.datasource.ParametersHolder;
import io.seata.rm.datasource.sql.struct.Null;

/**
* @author will
Expand All @@ -52,7 +53,8 @@ public boolean visit(SQLVariantRefExpr x) {
oneParamValues.stream().forEach(t -> paramAppenderList.add(new ArrayList<>()));
}
for (int i = 0; i < oneParamValues.size(); i++) {
paramAppenderList.get(i).add(oneParamValues.get(i));
Object o = oneParamValues.get(i);
paramAppenderList.get(i).add(o instanceof Null ? null : o);
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

import io.seata.rm.datasource.ParametersHolder;
import io.seata.rm.datasource.sql.druid.BaseRecognizer;
import io.seata.rm.datasource.sql.struct.Null;

/**
* @author will
Expand All @@ -53,7 +54,8 @@ public boolean visit(SQLVariantRefExpr x) {
oneParamValues.stream().forEach(t -> paramAppenderList.add(new ArrayList<>()));
}
for (int i = 0; i < oneParamValues.size(); i++) {
paramAppenderList.get(i).add(oneParamValues.get(i));
Object o = oneParamValues.get(i);
paramAppenderList.get(i).add(o instanceof Null ? null : o);
}

}
Expand Down

0 comments on commit 6e7d88c

Please sign in to comment.