MantisBT - TestLink
View Issue Details
0008630TestLinkDatabase MySQLpublic2019-04-11 07:402019-04-26 18:14
ilopezd 
fman 
normalmajoralways
closedfixed 
LinuxOpenSuse 42.3
1.9.19 (2019 Q1) 
 
MARIADB 10.1
7.0
TBD
0008630: AFTER UPGRADE TP 1.9.19 - DB access error Login Query
When login to testlink with LDAP AUTH show,DB access error display
Login to testlink with LDAP auth

DB Access Error - debug_print_backtrace() OUTPUT START
 ATTENTION: Enabling more debug info will produce path disclosure weakness (CWE-200)
            Having this additional Information could be useful for reporting
            issue to development TEAM.
 ==============================================================================
#0 database->exec_query( /* Class:tlUser- Method:getAccessibleTestPlans- */ SELECT NH.id, NH.name, TPLAN.is_public, COALESCE(USER_TPLAN_ROLES.testplan_id,0) AS has_role, USER_TPLAN_ROLES.role_id AS user_testplan_role, TPLAN.active, 0 AS selected FROM nodes_hierarchy NH JOIN testplans TPLAN ON NH.id=TPLAN.id LEFT OUTER JOIN user_testplan_roles USER_TPLAN_ROLES ON TPLAN.id = USER_TPLAN_ROLES.testplan_id AND USER_TPLAN_ROLES.user_id = 107 WHERE testproject_id = 4681 AND active = 1 AND ORDER BY name, -1, -1) called at [/srv/www/htdocs/testlink/lib/functions/database.class.php:759]
#1 database->get_recordset( /* Class:tlUser- Method:getAccessibleTestPlans- */ SELECT NH.id, NH.name, TPLAN.is_public, COALESCE(USER_TPLAN_ROLES.testplan_id,0) AS has_role, USER_TPLAN_ROLES.role_id AS user_testplan_role, TPLAN.active, 0 AS selected FROM nodes_hierarchy NH JOIN testplans TPLAN ON NH.id=TPLAN.id LEFT OUTER JOIN user_testplan_roles USER_TPLAN_ROLES ON TPLAN.id = USER_TPLAN_ROLES.testplan_id AND USER_TPLAN_ROLES.user_id = 107 WHERE testproject_id = 4681 AND active = 1 AND ORDER BY name) called at [/srv/www/htdocs/testlink/lib/functions/tlUser.class.php:1046]
0000002 tlUser->getAccessibleTestPlans(, 4681, ) called at [/srv/www/htdocs/testlink/lib/functions/common.php:442]
0000003 initProject(, Array ([tproject_id] => 0,[tplan_id] => 0,[updateMainPage] => 1)) called at [/srv/www/htdocs/testlink/lib/functions/common.php:508]
0000004 testlinkInitPage(, 1) called at [/srv/www/htdocs/testlink/lib/general/navBar.php:13]
The error log show the nex result

 ERROR ON exec_query() - database.class.php
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 'ORDER BY name' at line 1 - /* Class:tlUser- Method:getAccessibleTestPlans- */ SELECT NH.id, NH.name, TPLAN.is_public, COALESCE(USER_TPLAN_ROLES.testplan_id,0) AS has_role, USER_TPLAN_ROLES.role_id AS user_testplan_role, TPLAN.active, 0 AS selected FROM nodes_hierarchy NH JOIN testplans TPLAN ON NH.id=TPLAN.id LEFT OUTER JOIN user_testplan_roles USER_TPLAN_ROLES ON TPLAN.id = USER_TPLAN_ROLES.testplan_id AND USER_TPLAN_ROLES.user_id = 107 WHERE testproject_id = 4681 AND active = 1 AND ORDER BY name
THE MESSAGE : /* Class:tlUser- Method:getAccessibleTestPlans- */ SELECT NH.id, NH.name, TPLAN.is_public, COALESCE(USER_TPLAN_ROLES.testplan_id,0) AS has_role, USER_TPLAN_ROLES.role_id AS user_testplan_role, TPLAN.active, 0 AS selected FROM nodes_hierarchy NH JOIN testplans TPLAN ON NH.id=TPLAN.id LEFT OUTER JOIN user_testplan_roles USER_TPLAN_ROLES ON TPLAN.id = USER_TPLAN_ROLES.testplan_id AND USER_TPLAN_ROLES.user_id = 107 WHERE testproject_id = 4681 AND active = 1 AND ORDER BY name

Is correct syntax active = 1 AND ORDER BY name?
This query show syntax error in anywhere mariadb client but if remove the final AND its work
No tags attached.
png git_checkout_branch.PNG (7,776) 2019-04-15 08:03
http://mantis.testlink.org/file_download.php?file_id=5134&type=bug
png

png testlink_db_error.PNG (43,504) 2019-04-15 08:07
http://mantis.testlink.org/file_download.php?file_id=5135&type=bug
png

png testlnk_login.PNG (18,349) 2019-04-15 08:44
http://mantis.testlink.org/file_download.php?file_id=5136&type=bug
png
Issue History
2019-04-11 07:40ilopezdNew Issue
2019-04-11 20:56fmanNote Added: 0028701
2019-04-11 20:57fmanAssigned To => fman
2019-04-11 20:57fmanStatusnew => feedback
2019-04-15 08:03ilopezdFile Added: git_checkout_branch.PNG
2019-04-15 08:07ilopezdFile Added: testlink_db_error.PNG
2019-04-15 08:10ilopezdNote Added: 0028719
2019-04-15 08:10ilopezdStatusfeedback => assigned
2019-04-15 08:44ilopezdFile Added: testlnk_login.PNG
2019-04-15 08:44ilopezdNote Deleted: 0028719
2019-04-15 09:15ilopezdNote Added: 0028720
2019-04-15 09:24fmanNote Added: 0028721
2019-04-15 11:46ilopezdNote Added: 0028722
2019-04-26 18:14fmanQA Team - Task Workflow Status => TBD
2019-04-26 18:14fmanStatusassigned => closed
2019-04-26 18:14fmanResolutionopen => fixed

Notes
(0028701)
fman   
2019-04-11 20:56   
sql is wrong.


please get from github 1.9.19.01, do fresh install in sandbox, retest and provide feedback

thanks
(0028720)
ilopezd   
2019-04-15 09:15   
Hi

Thanks for your reply, i make a fresh install and upgrade Bd 19.9.20, and now have problems with LDAP auth, attach screenshots.

Thnx
(0028721)
fman   
2019-04-15 09:24   
if issue is different => you need to open a new issue and close this

This is the only way to work in ordered way

regards
(0028722)
ilopezd   
2019-04-15 11:46   
Ok

Can you close this issue?

Greetings ;)