mirror of
https://github.com/Wisser/Jailer.git
synced 2026-05-24 11:39:31 -05:00
stream result sets row-by-row on MySQL/MariaDB
This commit is contained in:
@@ -390,7 +390,7 @@ union all
|
||||
<value>true</value>
|
||||
</entry>
|
||||
</jdbcProperties>
|
||||
<!-- <fetchSize>-2147483648</fetchSize> --> <!-- setFetchSize(Integer.MIN_VALUE) should enable result set streaming -->
|
||||
<fetchSize>-2147483648</fetchSize> <!-- setFetchSize(Integer.MIN_VALUE) enables result set streaming -->
|
||||
<statisticRenovator>
|
||||
<scriptFileName>script/mysql/update_statistics.sql</scriptFileName>
|
||||
</statisticRenovator>
|
||||
@@ -597,7 +597,7 @@ union all
|
||||
<value>true</value>
|
||||
</entry>
|
||||
</jdbcProperties>
|
||||
<!-- <fetchSize>-2147483648</fetchSize> --> <!-- setFetchSize(Integer.MIN_VALUE) should enable result set streaming -->
|
||||
<fetchSize>4096</fetchSize>
|
||||
<statisticRenovator>
|
||||
<scriptFileName>script/mysql/update_statistics.sql</scriptFileName>
|
||||
</statisticRenovator>
|
||||
@@ -1282,7 +1282,7 @@ Select CNAME, TNAME, COLNAME, CTYPE, DETAIL From
|
||||
</entry>
|
||||
</typeReplacement>
|
||||
<sqlLimitSuffix>LIMIT %s</sqlLimitSuffix>
|
||||
<fetchSize>1000</fetchSize>
|
||||
<fetchSize>4096</fetchSize>
|
||||
|
||||
<!-- NOLOGGING, TABLESPACE-spec., etc. -->
|
||||
<tableProperties>CREATE UNLOGGED TABLE</tableProperties>
|
||||
@@ -1434,7 +1434,7 @@ union all
|
||||
</entry>
|
||||
</typeReplacement>
|
||||
<sqlLimitSuffix>LIMIT %s</sqlLimitSuffix>
|
||||
<fetchSize>1000</fetchSize>
|
||||
<fetchSize>4096</fetchSize>
|
||||
|
||||
<!-- NOLOGGING, TABLESPACE-spec., etc. -->
|
||||
<tableProperties>CREATE UNLOGGED TABLE</tableProperties>
|
||||
|
||||
@@ -522,7 +522,11 @@ public class Session {
|
||||
statement = theConnection.createStatement();
|
||||
if (dbms != null) {
|
||||
if (dbms.getFetchSize() != null) {
|
||||
statement.setFetchSize(dbms.getFetchSize());
|
||||
try {
|
||||
statement.setFetchSize(dbms.getFetchSize());
|
||||
} catch (Throwable t) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
CancellationHandler.begin(statement, context);
|
||||
|
||||
@@ -98,7 +98,7 @@ public class JobManager {
|
||||
incrementJobsInExecutionCounter();
|
||||
job.run();
|
||||
incrementJobsDoneCounter();
|
||||
} catch (Exception e) {
|
||||
} catch (Throwable e) {
|
||||
setException(e);
|
||||
} finally {
|
||||
decrementJobsInExecutionCounter();
|
||||
@@ -277,8 +277,8 @@ public class JobManager {
|
||||
/**
|
||||
* Sets an exception.
|
||||
*/
|
||||
private synchronized void setException(Exception e) {
|
||||
exception = e == null? null : (e instanceof CancellationException || e instanceof SQLException)? e
|
||||
private synchronized void setException(Throwable e) {
|
||||
exception = e == null? null : (e instanceof CancellationException || e instanceof SQLException)? (Exception) e
|
||||
: new RuntimeException(Thread.currentThread().getName() + " failed", e);
|
||||
jobs = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user