-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MariaDB programming error after upgrading to 11.0.3 #2732
Comments
Hi, given that it's not recommended to have hyphens in the database name, can you rename the database to |
Renaming the database to a single word would probably work, as mentioned. But in my opinion this isn't a structural solution. The current documentation still lists the hyphen-version as the default database name
But even when this would be resolved, I would expect a warning or similar for any user that is upgrading from a previous version and have a hyphen in their database names. Maybe when running the migration script, maybe when reading the db table name from config. Or by actually fixing the queries. Given that this happens with the default settings I noticed that there are also other users affected. |
Hello, we will carefully examine the code to see how to avoid this issue at the code level. |
The problem has been fixed in the latest release. |
The problem has been fixed in the latest release. |
looks good, thanks |
I am running 11.0.3 on Debian and I am using MariaDB 11.2.2 as database. After upgrading to v11 I noticed the following exception in seahub.log.
(1064, "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 '-db.SharedRepo s\n WHERE\n repo_id = '<myId>...' at line 4")
which can be triggered by calling this endpoint
https://my.tld/api/v2.1/repo-folder-share-info/?repo_id=<myId>
digging a bit further I noticed that the following query gets generated for MariaDB
which fails because my database name contains a hyphen (seafile-db). Adding backticks (
seafile-db
) to the query works (db_api.py#45), but then the next query fails with the same issue.Two workarounds
seafile.conf
and adding backticks thereWould it be possible to get a structural solution? Patching all queries could be avoided by adding backticks automatically when parsing the
seafile.conf
file.Best Regards
The text was updated successfully, but these errors were encountered: