Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008630TestLinkDatabase MySQLpublic2019-04-11 07:402019-04-26 18:14
Reporterilopezd 
Assigned Tofman 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformLinuxOSOpenSuse OS Version42.3
Product Version1.9.19 (2019 Q1) 
Fixed in Version 
Summary0008630: AFTER UPGRADE TP 1.9.19 - DB access error Login Query
DescriptionWhen login to testlink with LDAP AUTH show,DB access error display
Steps To ReproduceLogin 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]
Additional InformationThe 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
TagsNo tags attached.
Database (MySQL,Postgres,etc)MARIADB 10.1
Browser
PHP Version7.0
TestCaseID
QA Team - Task Workflow StatusTBD
Attached Filespng file icon git_checkout_branch.PNG [^] (7,776 bytes) 2019-04-15 08:03


png file icon testlink_db_error.PNG [^] (43,504 bytes) 2019-04-15 08:07


png file icon testlnk_login.PNG [^] (18,349 bytes) 2019-04-15 08:44

- Relationships

-  Notes
(0028701)
fman (administrator)
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 (reporter)
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 (administrator)
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 (reporter)
2019-04-15 11:46

Ok

Can you close this issue?

Greetings ;)

- Issue History
Date Modified Username Field Change
2019-04-11 07:40 ilopezd New Issue
2019-04-11 20:56 fman Note Added: 0028701
2019-04-11 20:57 fman Assigned To => fman
2019-04-11 20:57 fman Status new => feedback
2019-04-15 08:03 ilopezd File Added: git_checkout_branch.PNG
2019-04-15 08:07 ilopezd File Added: testlink_db_error.PNG
2019-04-15 08:10 ilopezd Note Added: 0028719
2019-04-15 08:10 ilopezd Status feedback => assigned
2019-04-15 08:44 ilopezd File Added: testlnk_login.PNG
2019-04-15 08:44 ilopezd Note Deleted: 0028719
2019-04-15 09:15 ilopezd Note Added: 0028720
2019-04-15 09:24 fman Note Added: 0028721
2019-04-15 11:46 ilopezd Note Added: 0028722
2019-04-26 18:14 fman QA Team - Task Workflow Status => TBD
2019-04-26 18:14 fman Status assigned => closed
2019-04-26 18:14 fman Resolution open => fixed



Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker