Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007159TestLinkDatabase Generalpublic2015-06-12 05:192015-09-19 08:49
ReporterStephenP 
Assigned Tofman 
PriorityhighSeveritymajorReproducibilityunable to reproduce
StatusclosedResolutionfixed 
PlatformMySQLOSWindowsOS Version7
Product Version1.9.13 (2015 #1) 
Fixed in Version1.9.14 (2015 Q3) 
Summary0007159: Projects disappeared
DescriptionIn our TestLink installation we observed that two test projects had disappeared. Unfortunately we do not know what sequence of actions led to this. We think it occurred when someone was working on a different project, not one of the disappearing projects.

On investigation we found that the first two records of table node_hierarchy (ids 1 and 2) had been deleted. On recreating these two records manually, the projects were once again available, including all test suites and test cases. (To me this implies a software bug, not a user error; in any case no-one has the rights to delete projects).

On investigating the code, there are several lines of the general form:
$sql = "DELETE FROM {$this->tables['nodes_hierarchy']} WHERE parent_id IN ( {$implosion} ) ";
It seems likely that one of these lines has been invoked with incorrect ids, in our case 1 and 2.

Tracking this bug down is not easy. HOWEVER it is possible - and very desirable - to mitigate it (and also potential similar bugs in future). This is done by adjusting the SQL used to delete records from node_hierarchy to only delete records of the correct node_type_id. Thus for example the routine delete_step_by_id should be adjusted to only delete records of node_type 'testcase_step'.

This could well be the same as issue 7041.
Steps To ReproduceBug itself: not known.

Mitigation: see code lines containing "DELETE FROM {$this->tables['nodes_hierarchy']}"
Additional InformationIt may be useful to know that we have not yet made any use of the Requirements feature in TestLink. This would appear to limit the number of places where this could go wrong to four: testcase.class.php, testplan.class.php, testproject.class.php or testsuite.class.php.
TagsNo tags attached.
Database (MySQL,Postgres,etc)MySQL
BrowserMultiple browsers
PHP Version
TestCaseID
QA Team - Task Workflow StatusREADY FOR TESTING
Attached Files

- Relationships
child of 0006830closedfman Availables hot-fixes for 1.9.13 & How To get full fixed package from GitHub 

-  Notes
(0023493)
fman (administrator)
2015-06-13 09:34

https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/566c8732057329ce9de55a04177e752595c59e9b [^]

https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/ae192dea3bddf7385b8284306aef2dd5d051675c [^]

https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/9f20e079e8f0b9864f64bc9fd421ffe3905c3a31 [^]
(0023494)
fman (administrator)
2015-06-13 09:56

https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/0b6758c2a8bddcf8e2fa28c23b42e56061762a47 [^]
(0023495)
fman (administrator)
2015-06-13 10:48

https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/feee7f983ca7849e08dd5f043e64d22fb13d38fc [^]

https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/a9d33601b5edd16be9139608d42cc52ffabc42b8 [^]
(0023924)
fman (administrator)
2015-09-19 08:49

1.9.14 Padawan - released - 2015-09-19

- Issue History
Date Modified Username Field Change
2015-06-12 05:19 StephenP New Issue
2015-06-13 08:27 fman Assigned To => fman
2015-06-13 08:27 fman Status new => assigned
2015-06-13 08:27 fman QA Team - Task Workflow Status => TBD
2015-06-13 09:34 fman Note Added: 0023493
2015-06-13 09:56 fman Note Added: 0023494
2015-06-13 10:48 fman Note Added: 0023495
2015-06-13 10:48 fman QA Team - Task Workflow Status TBD => READY FOR TESTING
2015-06-13 10:48 fman Status assigned => resolved
2015-06-13 10:48 fman Fixed in Version => 1.9.14 (2015 Q3)
2015-06-13 10:48 fman Resolution open => fixed
2015-06-13 10:48 fman Relationship added child of 0006830
2015-09-19 08:49 fman Note Added: 0023924
2015-09-19 08:49 fman Status resolved => closed



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker