mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
Merge pull request #475 from cutedemons/master
improve sql wall & fix datasource bug
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<version>1.0.1</version>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
<name>druid</name>
|
||||
|
||||
@@ -1065,7 +1065,7 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
|
||||
|
||||
String errorMessage = buf.toString();
|
||||
|
||||
if (this.createError == null) {
|
||||
if (this.createError != null) {
|
||||
throw new GetConnectionTimeoutException(errorMessage, createError);
|
||||
} else {
|
||||
throw new GetConnectionTimeoutException(errorMessage);
|
||||
|
||||
@@ -794,6 +794,14 @@ public class WallVisitorUtils {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (parent instanceof SQLJoinTableSource) {
|
||||
SQLJoinTableSource joinTableSource = (SQLJoinTableSource) parent;
|
||||
if (joinTableSource.getCondition() == x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (parent instanceof SQLUnionQuery) {
|
||||
SQLUnionQuery union = (SQLUnionQuery) parent;
|
||||
if (union.getRight() == x && hasWhere(union.getLeft())) {
|
||||
|
||||
Reference in New Issue
Block a user