mirror of
https://github.com/GeorgH93/Minepacks.git
synced 2024-11-24 12:25:25 +01:00
Bugfix SQLITE_BUSY error
This commit is contained in:
parent
55943e65f7
commit
8e0e866b4d
2
.gitignore
vendored
2
.gitignore
vendored
@ -45,6 +45,8 @@ Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
# Temp files
|
||||
*.tmp
|
||||
|
||||
|
||||
# =========================
|
||||
|
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>at.pcgamingfreaks</groupId>
|
||||
<artifactId>MinePacks</artifactId>
|
||||
<version>1.17.2</version>
|
||||
<version>1.17.3-SNAPSHOT</version>
|
||||
|
||||
<scm>
|
||||
<connection>scm:git:git@github.com:GeorgH93/Bukkit_Minepacks.git</connection>
|
||||
|
@ -70,6 +70,7 @@ protected HikariConfig getPoolConfig()
|
||||
return null;
|
||||
}
|
||||
HikariConfig poolConfig = new HikariConfig();
|
||||
poolConfig.setMaximumPoolSize(1);
|
||||
poolConfig.setJdbcUrl("jdbc:sqlite:" + plugin.getDataFolder().getAbsolutePath() + File.separator + "backpack.db");
|
||||
poolConfig.setConnectionTestQuery("SELECT 1;");
|
||||
return poolConfig;
|
||||
@ -83,7 +84,7 @@ protected void updateQuerysForDialect()
|
||||
queryInsertBP = queryInsertBP.replaceAll("\\) VALUES \\(\\?,\\?,\\?", "{FieldBPLastUpdate}) VALUES (?,?,?,DATE('now')");
|
||||
}
|
||||
queryDeleteOldBackpacks = "DELETE FROM `{TableBackpacks}` WHERE `{FieldBPLastUpdate}` < DATE('now', '-{VarMaxAge} days')";
|
||||
queryUpdateBP = queryUpdateBP.replaceAll("\\{NOW\\}", "DATE('now')");
|
||||
queryUpdateBP = queryUpdateBP.replaceAll("\\{NOW}", "DATE('now')");
|
||||
if(useUUIDs)
|
||||
{
|
||||
queryUpdatePlayerAdd = "INSERT OR IGNORE INTO `{TablePlayers}` (`{FieldName}`,`{FieldUUID}`) VALUES (?,?);";
|
||||
@ -122,9 +123,7 @@ protected void checkDB()
|
||||
rs.next();
|
||||
stmt.execute("ALTER TABLE `backpacks` ADD COLUMN `lastupdate` DATE DEFAULT '" + rs.getString(1) + "';");
|
||||
}
|
||||
catch(SQLException ignored)
|
||||
{
|
||||
}
|
||||
catch(SQLException ignored) {}
|
||||
}
|
||||
}
|
||||
catch(SQLException e)
|
||||
|
Loading…
Reference in New Issue
Block a user