mirror of https://github.com/alibaba/druid.git
Compare commits
3 Commits
a6180ef8a3
...
e5b81f1479
| Author | SHA1 | Date |
|---|---|---|
|
|
e5b81f1479 | |
|
|
0444f4f532 | |
|
|
7538dc54a7 |
|
|
@ -3203,7 +3203,9 @@ public class DruidDataSource extends DruidAbstractDataSource
|
|||
lock.lock();
|
||||
try {
|
||||
int fillCount = minIdle - (activeCount + poolingCount + createTaskCount);
|
||||
emptySignal(fillCount);
|
||||
if (fillCount > 0) {
|
||||
emptySignal(fillCount);
|
||||
}
|
||||
} finally {
|
||||
lock.unlock();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ public enum SQLBinaryOperator {
|
|||
RegExp("REGEXP", 110),
|
||||
NotRegExp("NOT REGEXP", 110),
|
||||
Equality("=", 110),
|
||||
EqEq("==", 110),
|
||||
|
||||
BitwiseNot("!", 130),
|
||||
Concat("||", 140),
|
||||
|
|
|
|||
|
|
@ -3657,7 +3657,8 @@ public class SQLExprParser extends SQLParser {
|
|||
}
|
||||
|
||||
protected SQLExpr relationalRestEqeq(SQLExpr expr) {
|
||||
return expr;
|
||||
lexer.nextToken();
|
||||
return new SQLBinaryOpExpr(expr, SQLBinaryOperator.EqEq, expr());
|
||||
}
|
||||
|
||||
protected SQLExpr relationalRestTilde(SQLExpr expr) {
|
||||
|
|
|
|||
|
|
@ -1100,6 +1100,10 @@ public class SQLSelectParser extends SQLParser {
|
|||
} else {
|
||||
item = this.exprParser.expr();
|
||||
}
|
||||
if (lexer.nextIf(Token.AS)) {
|
||||
item = new SQLAliasedExpr(item, lexer.stringVal);
|
||||
lexer.nextToken();
|
||||
}
|
||||
|
||||
if (dialectFeatureEnabled(GroupByItemOrder)) {
|
||||
if (lexer.token == Token.DESC) {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,14 @@
|
|||
select if(a=='G', b, c) from test
|
||||
--------------------
|
||||
SELECT if(a == 'G', b, c)
|
||||
FROM test
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
select a, b, count(1) from test group by a as c, b as d
|
||||
--------------------
|
||||
SELECT a, b, count(1)
|
||||
FROM test
|
||||
GROUP BY a AS c, b AS d
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
select c from b where c=1 ${if(len(a)=0,'and 1=1',"and a>0")} ${if(len(a)=0,'and 1=1',"and a>0")}
|
||||
--------------------
|
||||
SELECT c
|
||||
|
|
|
|||
Loading…
Reference in New Issue