Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006193TestLinkDatabase Postgrespublic2014-02-07 17:312014-04-25 17:38
Reporternutek 
Assigned Tofman 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.9.9 (2013 Q4 - bug fixing) 
Fixed in Version1.9.10 (2014 Q1 - bug fixing) 
Summary0006193: DB Access Error after upgrade 1.9.7->1.9.8->1.9.9
DescriptionAs show on screenshot as i attached
TagsNo tags attached.
Database (MySQL,Postgres,etc)Potgres 9.2.4
BrowserAll
PHP Version5.4
TestCaseID
QA Team - Task Workflow StatusREADY FOR TESTING
Attached Filespng file icon snapshot1.png [^] (177,515 bytes) 2014-02-07 17:31


png file icon snapshot2.png [^] (69,568 bytes) 2014-02-07 17:33


? file icon fix_pgsql_db_1.9.8_db_schema_update.sql [^] (1,950 bytes) 2014-02-11 17:41

- Relationships
related to 0006197closedfman 1.9.8 Upgrade - req_coverage table 
child of 0006048closedfman Availables hot-fixes for 1.9.9 & How To get full fixed package from gitorious 

-  Notes
(0020392)
nutek (reporter)
2014-02-07 17:32

Add logs from userlog24.log
(0020398)
fman (administrator)
2014-02-07 19:27
edited on: 2014-02-07 19:28

unfortunately level of details provided is not enough.
(see forum for our guidelines). I do not work only with screenshots.

To do this kind of migration you have to follow the advice we have provided on forum:

1. migrate form 1.9.7 to 1.9.8 => test that everything is OK
2. migrate form 1.9.8 to 1.9.9 + apply latest available fixes (see issue on mantis regarding how to proceed) => test that everything is OK

have you looked for similar issues (i.e. regarding crash on requirements) before reporting ?

(0020416)
lczub (reporter)
2014-02-10 20:09

I could reproduce this problem with an equal postgresql environment, upgraded from 1.9.7 via 1.9.8 to 1.9.9.

additional information:
DB Access Error already occurs with TL 1.9.8 and still exists with latest TL 1.9.10-DEV code from GITORIOUS (without performing additional upgrade steps)
With TL 1.9.8 it was possible to assign requirements to test cases, while DB Access Error are occurs.
With TL 1.9.10-DEV it is not possible any more.

Reproduction
Test Project Management
- Create new Project ProjA
  - Enabled Requirements Features
  - Active, Public
Requirement Specification
- Create Requirements Specification SRS-01 for Test Project ProjA
  - Type = User Specification
- Create Requirement REQ-01 for Req-Spec SRS01
  - Type Use Case
- select Requirement REQ-01
  - Requirement details are shown, but also presents the error message
      
 ==============================================================================
 DB Access Error - debug_print_backtrace() OUTPUT START
 ==============================================================================
#0 database->exec_query() called at [/usr/local/www/testlink-git/lib/functions/database.class.php:750]
#1 database->get_recordset() called at [/usr/local/www/testlink-git/lib/functions/requirement_mgr.class.php:687]
0000002 requirement_mgr->get_coverage() called at [/usr/local/www/testlink-git/lib/requirements/reqView.php:115]
0000003 initialize_gui() called at [/usr/local/www/testlink-git/lib/requirements/reqView.php:27]
 ==============================================================================

Test Specification
- create Test Suite TS-01 for Test Project ProjA
- create Test Case TC-01 for Test Suite TS-01

Assign Requirements
- expand tree, select Test Case TC-01
 
Behaviour TL 1.9.10-GIT
  - available requirements are shown, NO error message
  - assign requirement REQ-01 does not work, error message is presented
 ==============================================================================
 DB Access Error - debug_print_backtrace() OUTPUT START
 ==============================================================================
#0 database->exec_query() called at [/usr/local/www/testlink-git/lib/functions/requirement_mgr.class.php:1006]
#1 requirement_mgr->assign_to_tcase() called at [/usr/local/www/testlink-git/lib/requirements/reqTcAssign.php:235]
0000002 doSingleTestCaseOperation() called at [/usr/local/www/testlink-git/lib/requirements/reqTcAssign.php:54]
 ==============================================================================
   
Behaviour TL 1.9.8
  - available requirements are shown, but also presents the error message
  
 ==============================================================================
 DB Access Error - debug_print_backtrace() OUTPUT START
 ==============================================================================
#0 database->exec_query() called at [/usr/local/www/testlink-1.9.8/lib/functions/database.class.php:639]
#1 database->fetchRowsIntoMap() called at [/usr/local/www/testlink-1.9.8/lib/functions/requirement_spec_mgr.class.php:2239]
0000002 requirement_spec_mgr->getAssignedCoverage() called at [/usr/local/www/testlink-1.9.8/lib/requirements/reqTcAssign.php:305]
0000003 processTestCase() called at [/usr/local/www/testlink-1.9.8/lib/requirements/reqTcAssign.php:74]
 ==============================================================================
 
- assign and unassign the requirement REQ-01 works, but also presents the error message

 ==============================================================================
 DB Access Error - debug_print_backtrace() OUTPUT START
 ==============================================================================
#0 database->exec_query() called at [/usr/local/www/testlink-1.9.8/lib/functions/requirement_mgr.class.php:1000]
#1 requirement_mgr->assign_to_tcase() called at [/usr/local/www/testlink-1.9.8/lib/requirements/reqTcAssign.php:225]
0000002 doSingleTestCaseOperation() called at [/usr/local/www/testlink-1.9.8/lib/requirements/reqTcAssign.php:54]
 ==============================================================================
(0020417)
lczub (reporter)
2014-02-10 20:55

The userlog files includes more details:
...
pg_query(): Query failed: FEHLER: Spalte author_id von Relation req_coverage existiert nicht
LINE 1: INSERT INTO req_coverage (req_id,testcase_id,author_id,creat...
                                                     ^ - in /usr/local/www/testlink-git/third_party/adodb/drivers/adodb-postgres7.inc.php - Line 167
...

Checking the structure of table req_coverage shows, it only has two fields
- req_id, testcase_id

The other fields
- author_id, creation_ts, review_requester_id, review_request_ts
defined in sql\postgres\testlink_create_tables.sql, does not exist.
(0020419)
fman (administrator)
2014-02-10 21:53

just tested with latest code from gitoriuos worked as expected

1. create test project TPRJ01, with req management enabled
2. create test suite TS100
3. create inside TS100, TC-A and TC-B
4. create req spec - RSPEC-100
5. create inside RSPEC-100, REQ-01, REQ-02
6. assign REQ-01 and REQ-02 to TC-A
(0020420)
fman (administrator)
2014-02-10 21:57

sql script that creates req_coverage table on 1.9.8 is wrong (there is a merge request on gitorious),
fields:
- author_id, creation_ts, review_requester_id, review_request_ts

are missing, and have bein added to a wrong table
(0020423)
lczub (reporter)
2014-02-11 16:51

Hello fman,
your change https://gitorious.org/testlink-ga/testlink-code/commit/81fe9f55343a9785da9e637b3cfb6b981f6f1e2e [^] fixes the postgresql 1.9.8 upgrade.

Taking a look into the mssql 1.9.8 upgrade shows, that there are also no ALTER TABLE for the req_coverage table. Mustn't it be changed in an equal way like postgresql and mysql?
Luiko
(0020424)
lczub (reporter)
2014-02-11 17:46

Hello fman,
I have added the script fix_pgsql_db_1.9.8_db_schema_update.sql, which removes the fields from the executions table and add them to the req_coverage table.

Hope that helps people like me, who has still capture new data and could not redo the 1.9.8 upgrade with the latest gitorious code.
After this fix, I was able to capture and assign requirements.
Luiko
(0020425)
fman (administrator)
2014-02-11 19:13
edited on: 2014-02-11 19:15

@Luiko
thanks for your help

>> Taking a look into the mssql 1.9.8 upgrade shows, that there are also no
>> ALTER TABLE for the req_coverage table. Mustn't it be changed in an equal way >> like postgresql and mysql?
I'm going to fix it, but as you can understand if someone report issue on postgres due to available time I can only focus on this db.

(0020429)
nutek (reporter)
2014-02-12 17:13

Thank You fman! Im add your sql code to database. Now everythink works ok!
(0020839)
fman (administrator)
2014-04-25 17:38

1.9.10 released

- Issue History
Date Modified Username Field Change
2014-02-07 17:31 nutek New Issue
2014-02-07 17:31 nutek File Added: snapshot1.png
2014-02-07 17:32 nutek Note Added: 0020392
2014-02-07 17:33 nutek File Added: snapshot2.png
2014-02-07 19:27 fman Note Added: 0020398
2014-02-07 19:28 fman Note Edited: 0020398 View Revisions
2014-02-07 19:28 fman Note Edited: 0020398 View Revisions
2014-02-10 20:09 lczub Note Added: 0020416
2014-02-10 20:55 lczub Note Added: 0020417
2014-02-10 21:53 fman Note Added: 0020419
2014-02-10 21:55 fman Note View State: 0020419: public
2014-02-10 21:57 fman Note Added: 0020420
2014-02-10 21:57 fman QA Team - Task Workflow Status => READY FOR TESTING
2014-02-10 21:57 fman Status new => resolved
2014-02-10 21:57 fman Fixed in Version => 1.9.10 (2014 Q1 - bug fixing)
2014-02-10 21:57 fman Resolution open => fixed
2014-02-10 21:57 fman Assigned To => fman
2014-02-10 21:58 fman Relationship added child of 0006048
2014-02-11 16:51 lczub Note Added: 0020423
2014-02-11 17:41 lczub File Added: fix_pgsql_db_1.9.8_db_schema_update.sql
2014-02-11 17:46 lczub Note Added: 0020424
2014-02-11 19:13 fman Note Added: 0020425
2014-02-11 19:15 fman Note Edited: 0020425 View Revisions
2014-02-11 19:20 fman Issue cloned: 0006197
2014-02-11 19:20 fman Relationship added related to 0006197
2014-02-12 17:13 nutek Note Added: 0020429
2014-04-25 17:38 fman Note Added: 0020839
2014-04-25 17:38 fman Status resolved => closed



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker