ARTEMIS-986 fix int overflow
This commit is contained in:
parent
f7a9ba4f65
commit
4e92b63de7
|
@ -35,7 +35,7 @@ public class DerbySQLProvider extends GenericSQLProvider {
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getMaxBlobSize() {
|
||||
public long getMaxBlobSize() {
|
||||
return MAX_BLOB_SIZE;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ import org.apache.activemq.artemis.jdbc.store.sql.SQLProvider;
|
|||
|
||||
public class MySQLSQLProvider extends GenericSQLProvider {
|
||||
|
||||
private static final int MAX_BLOB_SIZE = 4 * 1024 * 1024 * 1024; // 4GB
|
||||
private static final long MAX_BLOB_SIZE = 4 * 1024 * 1024 * 1024; // 4GB
|
||||
|
||||
private final String createFileTableSQL;
|
||||
|
||||
|
@ -46,7 +46,7 @@ public class MySQLSQLProvider extends GenericSQLProvider {
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getMaxBlobSize() {
|
||||
public long getMaxBlobSize() {
|
||||
return MAX_BLOB_SIZE;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ import org.apache.activemq.artemis.jdbc.store.sql.SQLProvider;
|
|||
public class PostgresSQLProvider extends GenericSQLProvider {
|
||||
|
||||
// BYTEA Size used in Journal
|
||||
private static final int MAX_BLOB_SIZE = 1024 * 1024 * 1024; // 1GB
|
||||
private static final long MAX_BLOB_SIZE = 1024 * 1024 * 1024; // 1GB
|
||||
|
||||
private final String createFileTableSQL;
|
||||
|
||||
|
@ -50,7 +50,7 @@ public class PostgresSQLProvider extends GenericSQLProvider {
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getMaxBlobSize() {
|
||||
public long getMaxBlobSize() {
|
||||
return MAX_BLOB_SIZE;
|
||||
}
|
||||
|
||||
|
|
|
@ -342,7 +342,7 @@ public class JDBCSequentialFileFactoryDriver extends AbstractJDBCDriver {
|
|||
}
|
||||
}
|
||||
|
||||
public int getMaxSize() {
|
||||
public long getMaxSize() {
|
||||
return sqlProvider.getMaxBlobSize();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ package org.apache.activemq.artemis.jdbc.store.sql;
|
|||
public class GenericSQLProvider implements SQLProvider {
|
||||
|
||||
// Default to lowest (MYSQL = 64k)
|
||||
private static final int MAX_BLOB_SIZE = 64512;
|
||||
private static final long MAX_BLOB_SIZE = 64512;
|
||||
|
||||
protected final String tableName;
|
||||
|
||||
|
@ -101,7 +101,7 @@ public class GenericSQLProvider implements SQLProvider {
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getMaxBlobSize() {
|
||||
public long getMaxBlobSize() {
|
||||
return MAX_BLOB_SIZE;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ package org.apache.activemq.artemis.jdbc.store.sql;
|
|||
|
||||
public interface SQLProvider {
|
||||
|
||||
int getMaxBlobSize();
|
||||
long getMaxBlobSize();
|
||||
|
||||
String[] getCreateJournalTableSQL();
|
||||
|
||||
|
|
Loading…
Reference in New Issue