Menu

#60 SQL syntax error

v1.0 (example)
closed-fixed
None
9
2020-07-14
2019-08-07
No

Hi, I installed the latest version, and I receive next error message when I want to set the repository access.

A database error occured:

Errormessage:

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 'recursive, svn_access_rights.user_id, svn_access_rights.group_id, repopath' at line 1

Query:

SELECT svn_access_rights.id AS id, svnmodule, modulepath, svnrepos. reponame, valid_from, valid_until, path, access_right, recursive, svn_access_rights.user_id, svn_access_rights.group_id, repopath FROM svn_access_rights, svnprojects, svnrepos WHERE (svnprojects.id = svn_access_rights.project_id) AND (svnprojects.id IN (3)) AND (svnprojects.repo_id = svnrepos.id) AND (svn_access_rights.deleted = '00000000000000') ORDER BY LOWER(svnmodule) ASC

Discussion

  • Major Ruben Zsolt

    Hi,
    I installed again but same issue, with php 7.3.4-2 and MariaDB 10.3.15,
    Please, some solution.
    BR,

     
  • Tiago Corrêa

    Tiago Corrêa - 2020-07-13

    Hi,

    I had the same issue (after migrate to a different server and updated the database to mysql server 8.0.20), it was necessary to scape the reserved word recursive, so your query sould be like that:

    SELECT svn_access_rights.id AS id, svnmodule, modulepath, svnrepos. reponame, valid_from, valid_until, path, access_right, 'recursive', svn_access_rights.user_id, svn_access_rights.group_id, repopath FROM svn_access_rights, svnprojects, svnrepos WHERE (svnprojects.id = svn_access_rights.project_id) AND (svnprojects.id IN (3)) AND (svnprojects.repo_id = svnrepos.id) AND (svn_access_rights.deleted = '00000000000000') ORDER BY LOWER(svnmodule) ASC

    You could update list_access_rights.php and add the quotes at line 86:

    $query = "SELECT svn_access_rights.id AS id, svnmodule, modulepath, svnrepos." .
    " reponame, valid_from, valid_until, path, access_right, 'recursive', " .
    " svn_access_rights.user_id, svn_access_rights.group_id, repopath " .
    " FROM ".$schema."svn_access_rights, ".$schema."svnprojects, ".$schema."svnrepos " .

    Regards,
    Tiago

     
  • Thomas Krieger

    Thomas Krieger - 2020-07-14

    Hi all,

    this issue is fixed in version 0.6.0.12.

    Best regards,
    Thomas

     
  • Thomas Krieger

    Thomas Krieger - 2020-07-14
    • status: open --> closed-fixed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.