mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 05:09:53 +01:00
Fixed an ambiguous column name, removed some logging.
This commit is contained in:
@@ -9,7 +9,6 @@ import static net.sf.briar.api.messaging.MessagingConstants.RETENTION_MODULUS;
|
|||||||
import static net.sf.briar.api.messaging.Rating.UNRATED;
|
import static net.sf.briar.api.messaging.Rating.UNRATED;
|
||||||
import static net.sf.briar.db.ExponentialBackoff.calculateExpiry;
|
import static net.sf.briar.db.ExponentialBackoff.calculateExpiry;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
@@ -382,12 +381,7 @@ abstract class JdbcDatabase implements Database<Connection> {
|
|||||||
|
|
||||||
protected boolean open(String driverClass) throws DbException, IOException {
|
protected boolean open(String driverClass) throws DbException, IOException {
|
||||||
boolean reopen = config.databaseExists();
|
boolean reopen = config.databaseExists();
|
||||||
File dir = config.getDatabaseDirectory();
|
if(!reopen) config.getDatabaseDirectory().mkdirs();
|
||||||
if(LOG.isLoggable(INFO)) {
|
|
||||||
LOG.info("Database directory: " + dir.getPath());
|
|
||||||
if(reopen) for(File f : dir.listFiles()) LOG.info(f.getPath());
|
|
||||||
}
|
|
||||||
if(!reopen) dir.mkdirs();
|
|
||||||
// Load the JDBC driver
|
// Load the JDBC driver
|
||||||
try {
|
try {
|
||||||
Class.forName(driverClass);
|
Class.forName(driverClass);
|
||||||
@@ -1630,7 +1624,7 @@ abstract class JdbcDatabase implements Database<Connection> {
|
|||||||
+ " AND cg.contactId = s.contactId"
|
+ " AND cg.contactId = s.contactId"
|
||||||
+ " WHERE cg.contactId = ?"
|
+ " WHERE cg.contactId = ?"
|
||||||
+ " AND timestamp >= retention"
|
+ " AND timestamp >= retention"
|
||||||
+ " AND seen = FALSE AND expiry < ?"
|
+ " AND seen = FALSE AND s.expiry < ?"
|
||||||
+ " AND sendability > ZERO()"
|
+ " AND sendability > ZERO()"
|
||||||
+ " ORDER BY timestamp DESC LIMIT ?";
|
+ " ORDER BY timestamp DESC LIMIT ?";
|
||||||
ps = txn.prepareStatement(sql);
|
ps = txn.prepareStatement(sql);
|
||||||
|
|||||||
Reference in New Issue
Block a user