Enabled write-ahead logging for SQLite
This commit is contained in:
parent
1c476408e9
commit
1aaff4e2b0
1 changed files with 4 additions and 0 deletions
|
|
@ -294,6 +294,10 @@ public class Database extends Queue {
|
||||||
|
|
||||||
private static void initializeTables(String prefix, Statement statement) {
|
private static void initializeTables(String prefix, Statement statement) {
|
||||||
try {
|
try {
|
||||||
|
if (!Config.getGlobal().MYSQL) {
|
||||||
|
statement.executeUpdate("PRAGMA journal_mode=WAL;");
|
||||||
|
}
|
||||||
|
|
||||||
boolean lockInitialized = false;
|
boolean lockInitialized = false;
|
||||||
String query = "SELECT rowid as id FROM " + prefix + "database_lock WHERE rowid='1' LIMIT 1";
|
String query = "SELECT rowid as id FROM " + prefix + "database_lock WHERE rowid='1' LIMIT 1";
|
||||||
ResultSet rs = statement.executeQuery(query);
|
ResultSet rs = statement.executeQuery(query);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue