Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008409TestLinkDatabase Generalpublic2018-10-11 07:162018-10-13 18:09
Reporterandreea.biosan 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusnewResolutionopen 
PlatformOSOS Version
Product Version 
Fixed in Version 
Summary0008409: Database error is received when adding relation between test cases
Description
Database error it's received when trying to establish a relation in the "Relations" section between two Test Cases.

 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.
Steps To ReproduceGo to:
Test Case -> Relations Section

In the "Prefix Add" add the ID of a Test Case and press button "ADD".
The attached error appears:
TagsNo tags attached.
Database (MySQL,Postgres,etc)MySQL
Browser
PHP Version
TestCaseID
QA Team - Task Workflow Status
Attached Filesdocx file icon DB Access Error -relations.docx [^] (35,967 bytes) 2018-10-11 07:16

- Relationships

-  Notes
(0027988)
fman (administrator)
2018-10-11 09:49

ok, going to check
(0027989)
fman (administrator)
2018-10-11 09:51

are you able to run this sql on a mysql client, and provide me the message you get?
INSERT INTO testcase_relations (source_id, destination_id, relation_type, author_id, creation_ts) values (79907,78870, 3, 11, '2018-10-11 00:03:24')

thanks
(0027995)
hughkay (reporter)
2018-10-12 10:52
edited on: 2018-10-12 10:53

@fman
When I try to execute your query on the mysql client with the latest code, I get following error:
 1364 - Field 'tcase_source_id' doesn't have a default value

Seems that the there's no default value defined for this field.
Maybe you should define a default value inside the following file:
"install/sql/alter_tables/1.9.18/mysql/DB.1.9.18/step1/db_schema_update.sql"

Furthermore, I wonder why the fields "tcase_source_id" and "tcase_destination_id" are not defined in file "install/sql/mysql/testlink_create_tables.sql" for table "testcase_relations"?

This means, if you upgrade from 1.9.17 to 1.9.18 those two columns are added to "testcase_relations" DB table, but if you do a fresh install of 1.9.18 those two columns do not exist...weird!

The question is now: are those two columns really necessary or were they added by mistake in the update script?

(0027996)
hughkay (reporter)
2018-10-12 10:58

One additional thought:
The two added columns also do only exist for mySQL database version. They're not added for PostGres.
Furthermore, for MSSQL the file "install/sql/alter_tables/1.9.18/mssql/DB.1.9.18/step1/db_schema_update.sql" does not exist at all.
(0027997)
fman (administrator)
2018-10-12 18:04

some mistake, because IMHO I've added these colums into a BACKUP TABLE to manage migration
going to check.
Thanks a lot for your help.
(0027999)
fman (administrator)
2018-10-13 08:05

@andreea.biosan
1. Fresh install with gitlab.com branch releas04CR
2. create test project
3. create test suite TS-100
4. create 4 test cases: with titles: TC-1A,TC-1B,TC-1C,TC-1D
5. create relation between TC-1B e TC-1A with default settings
6. no errors
(0028012)
fman (administrator)
2018-10-13 18:09

@hughkay
Going to fix 1.9.18, meanwhile
get 1.9.17 and use it's migration sql from 1.9.16 to 1.9.17
the get 1.9.18 and use migration sql from 1.9.17 to 1.9.18
all will work.

next time please does not use a ticket that does not have same context that your problem

- Issue History
Date Modified Username Field Change
2018-10-11 07:16 andreea.biosan New Issue
2018-10-11 07:16 andreea.biosan File Added: DB Access Error -relations.docx
2018-10-11 09:49 fman Note Added: 0027988
2018-10-11 09:51 fman Note Added: 0027989
2018-10-12 10:52 hughkay Note Added: 0027995
2018-10-12 10:53 hughkay Note Edited: 0027995 View Revisions
2018-10-12 10:58 hughkay Note Added: 0027996
2018-10-12 18:04 fman Note Added: 0027997
2018-10-13 08:05 fman Note Added: 0027999
2018-10-13 18:09 fman Note Added: 0028012



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker