forked from LogBlock/LogBlock
Fixed path for dumb.
This commit is contained in:
@@ -36,7 +36,7 @@ public class ClearLog implements Runnable
|
|||||||
int deleted = rs.getInt(1);
|
int deleted = rs.getInt(1);
|
||||||
if (deleted > 0) {
|
if (deleted > 0) {
|
||||||
if (LogBlock.config.dumpDroppedLog)
|
if (LogBlock.config.dumpDroppedLog)
|
||||||
state.execute("SELECT * FROM `" + table + "` WHERE date < '" + time + "' INTO OUTFILE '" + dumbFolder.getAbsolutePath().replace("\\", "\\\\") + "\\\\" + table + "-" + time + ".csv' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\n'");
|
state.execute("SELECT * FROM `" + table + "` WHERE date < '" + time + "' INTO OUTFILE '" + new File(dumbFolder, table + "-" + time + ".csv").getAbsolutePath().replace("\\", "\\\\") + "' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\n'");
|
||||||
state.execute("DELETE FROM `" + table + "` WHERE date < '" + time + "'");
|
state.execute("DELETE FROM `" + table + "` WHERE date < '" + time + "'");
|
||||||
LogBlock.log.info("[LogBlock] Cleared out table " + table + ". Deleted " + deleted + " entries.");
|
LogBlock.log.info("[LogBlock] Cleared out table " + table + ". Deleted " + deleted + " entries.");
|
||||||
}
|
}
|
||||||
@@ -45,7 +45,7 @@ public class ClearLog implements Runnable
|
|||||||
deleted = rs.getInt(1);
|
deleted = rs.getInt(1);
|
||||||
if (deleted > 0) {
|
if (deleted > 0) {
|
||||||
if (LogBlock.config.dumpDroppedLog)
|
if (LogBlock.config.dumpDroppedLog)
|
||||||
state.execute("SELECT * FROM `" + table + "-sign` LEFT JOIN `" + table + "` USING (id) WHERE `" + table + "`.id IS NULL INTO OUTFILE '" + dumbFolder.getAbsolutePath().replace("\\", "\\\\") + "\\\\" + table + "-sign-" + time + ".csv' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\n'");
|
state.execute("SELECT * FROM `" + table + "-sign` LEFT JOIN `" + table + "` USING (id) WHERE `" + table + "`.id IS NULL INTO OUTFILE '" + new File(dumbFolder, table + "-sign" + time + ".csv").getAbsolutePath().replace("\\", "\\\\") + "' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\n'");
|
||||||
state.execute("DELETE `" + table + "-sign` FROM `" + table + "-sign` LEFT JOIN `" + table + "` USING (id) WHERE `" + table + "`.id IS NULL;");
|
state.execute("DELETE `" + table + "-sign` FROM `" + table + "-sign` LEFT JOIN `" + table + "` USING (id) WHERE `" + table + "`.id IS NULL;");
|
||||||
LogBlock.log.info("[LogBlock] Cleared out table " + table + "-sign. Deleted " + deleted + " entries.");
|
LogBlock.log.info("[LogBlock] Cleared out table " + table + "-sign. Deleted " + deleted + " entries.");
|
||||||
}
|
}
|
||||||
@@ -54,7 +54,7 @@ public class ClearLog implements Runnable
|
|||||||
deleted = rs.getInt(1);
|
deleted = rs.getInt(1);
|
||||||
if (deleted > 0) {
|
if (deleted > 0) {
|
||||||
if (LogBlock.config.dumpDroppedLog)
|
if (LogBlock.config.dumpDroppedLog)
|
||||||
state.execute("SELECT * FROM `" + table + "-chest` LEFT JOIN `" + table + "` USING (id) WHERE `" + table + "`.id IS NULL INTO OUTFILE '" + dumbFolder.getAbsolutePath().replace("\\", "\\\\") + "\\\\" + table + "-chest-" + time + ".csv' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\n'");
|
state.execute("SELECT * FROM `" + table + "-chest` LEFT JOIN `" + table + "` USING (id) WHERE `" + table + "`.id IS NULL INTO OUTFILE ''" + new File(dumbFolder, table + "-chest" + time + ".csv").getAbsolutePath().replace("\\", "\\\\") + "'' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\n'");
|
||||||
state.execute("DELETE `" + table + "-chest` FROM `" + table + "-chest` LEFT JOIN `" + table + "` USING (id) WHERE `" + table + "`.id IS NULL;");
|
state.execute("DELETE `" + table + "-chest` FROM `" + table + "-chest` LEFT JOIN `" + table + "` USING (id) WHERE `" + table + "`.id IS NULL;");
|
||||||
LogBlock.log.info("[LogBlock] Cleared out table " + table + "-chest. Deleted " + deleted + " entries.");
|
LogBlock.log.info("[LogBlock] Cleared out table " + table + "-chest. Deleted " + deleted + " entries.");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user