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

Open
opened 2026-02-20 22:17:58 -05:00 by deekerman · 4 comments
Owner

Originally created by @technikamateur on GitHub (Jan 22, 2026).

Originally assigned to: @Krzmbrzl on GitHub.

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

Originally created by @technikamateur on GitHub (Jan 22, 2026). Originally assigned to: @Krzmbrzl on GitHub. ### 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: ```ini dbDriver=QMYSQL dbPrefix=mumble-server_ ``` 2. Start the server and allow it to run until a log maintenance/cleanup cycle triggers. 3. Check the server logs. ### Mumble version 1.5.735 ### Mumble component Server ### OS Linux ### Reproducible? Yes ### Additional information _No response_ ### Relevant log output ```shell 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_
Author
Owner

@Hartmnt commented on GitHub (Jan 22, 2026):

@Krzmbrzl This will probably be fixed in 1.6, right?

Do we care about a patch for the 1.5 series for this specific issue?

@Hartmnt commented on GitHub (Jan 22, 2026): @Krzmbrzl This will probably be fixed in 1.6, right? Do we care about a patch for the 1.5 series for this specific issue?
Author
Owner

@Krzmbrzl commented on GitHub (Jan 22, 2026):

I would hope that this issue does not exist in the new DB implementation. I'll double-check though… (probably over the weekend)

@Krzmbrzl commented on GitHub (Jan 22, 2026): I would hope that this issue does not exist in the new DB implementation. I'll double-check though… (probably over the weekend)
Author
Owner

@github-actions[bot] commented on GitHub (Feb 5, 2026):

This issue has been marked as stale, because our request for more information has thus far not been fulfilled.

If no further action occurs, this issue will be closed within 7 days.

@github-actions[bot] commented on GitHub (Feb 5, 2026): This issue has been marked as stale, because our request for more information has thus far not been fulfilled. If no further action occurs, this issue will be closed within 7 days.
Author
Owner

@Krzmbrzl commented on GitHub (Feb 6, 2026):

Still on my TODO list

@Krzmbrzl commented on GitHub (Feb 6, 2026): Still on my TODO list
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mumble-mumble-voip#3093
No description provided.