-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Database Versioncheck syntax error #26526
Labels
Comments
@ZitronePlus mind to create a PR with your fix for this? |
ZitronePlus
added a commit
to ZitronePlus/server-1
that referenced
this issue
Jun 30, 2021
fix for sql query replaced double quotes with single quotes. Query should now also work for dbs with sql_mode including "ANSI" and "ANSI_QUOTES"
ZitronePlus
added a commit
to ZitronePlus/server-1
that referenced
this issue
Jun 30, 2021
Merged
ZitronePlus
added a commit
to ZitronePlus/server-1
that referenced
this issue
Jul 1, 2021
Fix for nextcloud#26526 Signed-off-by: Tobias <scharft@hochschule-trier.de>
ZitronePlus
added a commit
to ZitronePlus/server-1
that referenced
this issue
Jul 1, 2021
fix for sql query replaced double quotes with single quotes. Query should now also work for dbs with sql_mode including "ANSI" and "ANSI_QUOTES" Signed-off-by: Tobias <scharft@hochschule-trier.de>
ZitronePlus
added a commit
to ZitronePlus/server-1
that referenced
this issue
Jul 1, 2021
fix for sql query replaced double quotes with single quotes. Query should now also work for dbs with sql_mode including "ANSI" and "ANSI_QUOTES" Signed-off-by: Tobias <scharft@hochschule-trier.de>
ZitronePlus
added a commit
to ZitronePlus/server-1
that referenced
this issue
Jul 1, 2021
fix for sql query replaced double quotes with single quotes. Query should now also work for dbs with sql_mode including "ANSI" and "ANSI_QUOTES" Signed-off-by: Tobias <scharft@hochschule-trier.de>
ZitronePlus
added a commit
to ZitronePlus/server-1
that referenced
this issue
Jul 1, 2021
fix for sql query replaced double quotes with single quotes. Query should now also work for dbs with sql_mode including "ANSI" and "ANSI_QUOTES" Signed-off-by: Tobias <scharft@hochschule-trier.de>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using Nextcloud v.20.0.8 and MariaDB v.10.5.9
Issue:
Nextcloud systemcheck returns syntax error:
Doctrine\DBAL\Exception\SyntaxErrorException: An exception occurred while executing 'SHOW VARIABLES LIKE "version";': SQLSTATE[42000]: Syntax error or access violation: 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 '"version"' at line 1
I suspect the error in line 65
NEXTCLOUD_DIR/apps/settings/lib/SetupChecks/SupportedDatabase.php
$result = $this->connection->prepare('SHOW VARIABLES LIKE "version";');
It seems that quotes and double quotes should be switched in this case.
As every other sql call also uses single quotes for sql variables.
Changing this manually to:
$result = $this->connection->prepare("SHOW VARIABLES LIKE 'version';");
has resolved the issue for me.
The text was updated successfully, but these errors were encountered: