mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2024-11-28 12:55:34 +01:00
Enabled write-ahead logging for SQLite
This commit is contained in:
parent
1c476408e9
commit
1aaff4e2b0
@ -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…
Reference in New Issue
Block a user