Compare commits

...

4 Commits

Author SHA1 Message Date
WuTaoyu dba99c0636
Merge da4832aa85 into c0a58c10b7 2025-07-28 14:52:22 +08:00
林枸 c0a58c10b7 Fix holo array output.
Java CI / Test JDK ${{ matrix.java }}, ${{ matrix.os }} (11, ubuntu-latest) (push) Has been cancelled Details
Java CI / Test JDK ${{ matrix.java }}, ${{ matrix.os }} (17, ubuntu-latest) (push) Has been cancelled Details
Java CI / Test JDK ${{ matrix.java }}, ${{ matrix.os }} (21, ubuntu-latest) (push) Has been cancelled Details
Java CI / Test JDK ${{ matrix.java }}, ${{ matrix.os }} (8, ubuntu-latest) (push) Has been cancelled Details
2025-07-28 14:22:24 +08:00
WuTaoyu da4832aa85 fix removecount calculation bug(A connection may meet the calculation conditions of both evictCount and keepAliveCount at the same time, resulting in duplicate calculations) 2025-07-13 17:56:33 +08:00
WuTaoyu 7538dc54a7 Fix issue#6318:该问题导致误判连接池空闲连接不足,创建多余连接 2025-06-08 15:57:43 +08:00
5 changed files with 21 additions and 5 deletions

View File

@ -3149,6 +3149,9 @@ public class DruidDataSource extends DruidAbstractDataSource
// shrink connections by HotSpot intrinsic function _arraycopy for performance optimization.
int removeCount = evictCount + keepAliveCount;
if (removeCount > poolingCount) {
removeCount = poolingCount;
}
if (removeCount > 0) {
int breakedCount = poolingCount - i;
if (breakedCount > 0) {
@ -3253,7 +3256,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();
}

View File

@ -104,4 +104,8 @@ public class HologresOutputVisitor extends PGOutputVisitor {
endLineComment = true;
}
}
public void printArrayExprPrefix() {
print0(ucase ? "ARRAY" : "array");
}
}

View File

@ -202,4 +202,8 @@ public class PrestoOutputVisitor extends SQLASTOutputVisitor implements PrestoAS
timeZone.accept(this);
return false;
}
public void printArrayExprPrefix() {
print0(ucase ? "ARRAY" : "array");
}
}

View File

@ -7650,6 +7650,8 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Paramet
return false;
}
public void printArrayExprPrefix() {
}
@Override
public boolean visit(SQLArrayExpr x) {
SQLExpr expr = x.getExpr();
@ -7661,10 +7663,7 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Paramet
} else if (expr != null) {
expr.accept(this);
} else {
boolean trino = dbType == DbType.trino || dbType == DbType.presto || dbType == DbType.supersql;
if (trino) {
print0(ucase ? "ARRAY" : "array");
}
printArrayExprPrefix();
}
if (x.getDataType() != null) {

View File

@ -1,3 +1,7 @@
select []
--------------------
SELECT ARRAY[]
------------------------------------------------------------------------------------------------------------------------
select cast(($0 + interval $1 week) as date)
--------------------
SELECT CAST(($0 + INTERVAL '$1' WEEK) AS date)