Skip to content

Commit

Permalink
Merge pull request alibaba#475 from cutedemons/master
Browse files Browse the repository at this point in the history
improve sql wall & fix datasource bug
  • Loading branch information
cutedemons committed Nov 26, 2013
2 parents 188ff78 + dee9308 commit 24382e7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/alibaba/druid/pool/DruidDataSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@ private DruidPooledConnection getConnectionInternal(long maxWait) throws SQLExce

String errorMessage = buf.toString();

if (this.createError == null) {
if (this.createError != null) {
throw new GetConnectionTimeoutException(errorMessage, createError);
} else {
throw new GetConnectionTimeoutException(errorMessage);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,14 @@ public static boolean isWhereOrHaving(SQLObject x) {
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())) {
Expand Down

0 comments on commit 24382e7

Please sign in to comment.