Skip to content

Purge fails with MySQL #325

@PeterTerpe

Description

@PeterTerpe

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

  • I am running the latest version of the mod.
  • My version of Minecraft is supported.
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions