Create a copy of the shared JDBC context (#13049)

This commit is contained in:
Paul Rogers 2022-09-12 19:27:56 +02:00 committed by GitHub
parent eff7c64228
commit 80b97ac24d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -97,7 +97,7 @@ public class DruidConnection
final DruidJdbcStatement statement = new DruidJdbcStatement( final DruidJdbcStatement statement = new DruidJdbcStatement(
connectionId, connectionId,
statementId, statementId,
context, context.copy(),
sqlStatementFactory sqlStatementFactory
); );
@ -109,7 +109,7 @@ public class DruidConnection
public DruidJdbcPreparedStatement createPreparedStatement( public DruidJdbcPreparedStatement createPreparedStatement(
SqlStatementFactory sqlStatementFactory, SqlStatementFactory sqlStatementFactory,
SqlQueryPlus sqlRequest, SqlQueryPlus sqlQueryPlus,
final long maxRowCount) final long maxRowCount)
{ {
final int statementId = statementCounter.incrementAndGet(); final int statementId = statementCounter.incrementAndGet();
@ -127,7 +127,7 @@ public class DruidConnection
@SuppressWarnings("GuardedBy") @SuppressWarnings("GuardedBy")
final PreparedStatement statement = sqlStatementFactory.preparedStatement( final PreparedStatement statement = sqlStatementFactory.preparedStatement(
sqlRequest.withContext(context) sqlQueryPlus.withContext(context.copy())
); );
final DruidJdbcPreparedStatement jdbcStmt = new DruidJdbcPreparedStatement( final DruidJdbcPreparedStatement jdbcStmt = new DruidJdbcPreparedStatement(
connectionId, connectionId,