Ledger icon indicating copy to clipboard operation
Ledger copied to clipboard

Purge fails with MySQL

Open PeterTerpe opened this issue 7 months ago • 2 comments

Expected behavior

Selected entries would be deleted when a purge command is executed with sufficient permission level.

Observed/actual behavior

Purge failed, error messages returned:

[DefaultDispatcher-worker-12/WARN]: Transaction attempt #5 failed: java.sql.SQLException: You can't specify target table 'actions' for update in FROM clause. Statement(s): DELETE FROM actions WHERE actions.id IN (SELECT actions.id FROM actions WHERE TRUE AND ((actions.object_id = ?) OR (actions.old_object_id = ?))) [Server] org.jetbrains.exposed.exceptions.ExposedSQLException: java.sql.SQLException: You can't specify target table 'actions' for update in FROM clause [Server] at org.jetbrains.exposed.sql.statements.Statement.executeIn$exposed_core(Statement.kt:94) ~[ledger-1.3.5.jar:?] (See complete error message and stack trace in log) [Server] [04:40:51] [DefaultDispatcher-worker-12/WARN]: Wait 782524 milliseconds before retrying

Steps/models to reproduce

  1. Setup ledger 1.3.5 with MySQL
  2. Run a purge command

What operating system are you running

Linux

Minecraft version

1.21

Ledger version

1.3.5

Logs

https://shabbyserver.com/shared/LedgerPurgeFail.log

Agreements

  • [x] I am running the latest version of the mod.
  • [x] My version of Minecraft is supported.
  • [x] I have searched for and ensured there isn't already an open issue regarding this.

Other

Recently switched from SQLite to MySQL, added the mod Ledger Databases, logging worked fine.

PeterTerpe avatar May 20 '25 00:05 PeterTerpe

I am also getting this same error, is there any update? thanks

Saxostevesaxo avatar Sep 26 '25 23:09 Saxostevesaxo

Now I just live with it: setup filters and purge manually if ever needed

PeterTerpe avatar Sep 27 '25 01:09 PeterTerpe