You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lyrion Music Server added some new database queries using named parameters in the statement. This is supported by SQLite (via DBD-SQLite) but this is not available to DBD-mysql/MySQL (or MariaDB). When the query is executed the reported error is:
[25-05-02 18:47:27.2333] Slim::Schema::Storage::throw_exception (122) Error: DBI Exception: DBD::mysql::st bind_param failed: Illegal parameter number [for Statement "
SELECT contributor_album.role AS role, contributors.name AS name, contributors.id AS id
FROM contributor_album
JOIN contributors ON contributors.id = contributor_album.contributor
WHERE contributor_album.album = :album
AND contributor_album.role IN (5,1)
ORDER BY contributor_album.role, contributors.namesort
"]
[25-05-02 18:47:27.2343] Slim::Schema::Storage::throw_exception (122) Backtrace:
It took a bit of digging to discover this. It seems possible to add a more helpful error message which turns the error in to:
[25-05-06 20:46:04.2629] Slim::Schema::Storage::throw_exception (122) Error: DBI Exception: DBD::mysql::st bind_param failed: named parameters are unsupported: :album [for Statement "
SELECT contributor_album.role AS role, contributors.name AS name, contributors.id AS id
FROM contributor_album
JOIN contributors ON contributors.id = contributor_album.contributor
WHERE contributor_album.album = :album
AND contributor_album.role IN (5,1)
ORDER BY contributor_album.role, contributors.namesort
"]
Lyrion Music Server added some new database queries using named parameters in the statement. This is supported by SQLite (via DBD-SQLite) but this is not available to DBD-mysql/MySQL (or MariaDB). When the query is executed the reported error is:
Full report: LMS-Community/slimserver#1265
It took a bit of digging to discover this. It seems possible to add a more helpful error message which turns the error in to:
The change is based on the named parameter handling in DBD-SQLite: https://github.com/DBD-SQLite/DBD-SQLite/blob/60515b30f8b816cb09e9f40f2f0a5829af031899/dbdimp.c#L1559
The text was updated successfully, but these errors were encountered: