Skip to content

SQL Syntax Error in log cleanup when dbPrefix contains a hyphen (MariaDB/MySQL) #7056

@technikamateur

Description

@technikamateur

Description

When using the QMYSQL driver with a dbPrefix that includes a hyphen (e.g., mumble-server_), the server fails to prune the slog table. This is because the internal SQL query for log cleanup does not wrap the table name in backticks, causing MariaDB/MySQL to interpret the hyphen as a subtraction operator.

Steps to reproduce

  1. Configure mumble-server.ini to use MariaDB/MySQL:
dbDriver=QMYSQL
dbPrefix=mumble-server_
  1. Start the server and allow it to run until a log maintenance/cleanup cycle triggers.
  2. Check the server logs.

Mumble version

1.5.735

Mumble component

Server

OS

Linux

Reproducible?

Yes

Additional information

No response

Relevant log output

Jan 21 22:17:37 mumble-server[319583]: <F>2026-01-21 22:17:37.797 SQL Prepare Error [DELETE FROM mumble-server_slog WHERE msgtime < now() - INTERVAL 30 day]: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-server_slog WHERE msgtime < now() - INTERVAL 30 day' at line 1 QMYSQL3: Unable to prepare statement
Jan 21 22:17:37 mumble-server[319583]: !! 01/21/2026 22:17:37.805 error: communicator not destroyed during global destruction.
Jan 21 22:17:37 systemd[1]: mumble.service: Main process exited, code=exited, status=1/FAILURE
Jan 21 22:17:37 systemd[1]: mumble.service: Failed with result 'exit-code'.

Screenshots

No response

Metadata

Metadata

Assignees

Labels

bugA bug (error) in the softwareneeds-more-inputtriageThis issue is waiting to be triaged by one of the project members

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions