Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008507TestLinkDatabase Generalpublic2018-12-17 11:072018-12-17 20:56
Reportermraurelien 
Assigned Tofman 
PriorityhighSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformLinux OSCentOS OS Versionrelease 7.5
Product Version1.9.18 (2018 Q3) 
Fixed in Version 
Summary0008507: New version on a test use a bad timestamp (db access error)
DescriptionWhen I click on "new version" of a test in the Test Specification, i got a database access error. Edit on actual version is fine.

==============================================================================
 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:testcase - Method: copy_tcversion */ INSERT INTO t_tcversions (id,version,tc_external_id,author_id,creation_ts,summary, importance,execution_type,preconditions,estimated_exec_duration) SELECT 7339 AS id, 7 AS version, tc_external_id, 3 AS author_id, '2018-12-17 11:31:42' AS creation_ts, summary,importance,execution_type, preconditions,estimated_exec_duration FROM t_tcversions WHERE id=4617 ) called at [/var/www/html/testlink-1.9.18/lib/functions/testcase.class.php:2107]
#1 testcase->copy_tcversion(2856, 4617, 7339, 7, 3) called at [/var/www/html/testlink-1.9.18/lib/functions/testcase.class.php:1960]
0000002 testcase->create_new_version(2856, 3, 4617) called at [/var/www/html/testlink-1.9.18/lib/testcases/tcEdit.php:276]
Steps To Reproduce# Go to Test Specification
# Select a Test in the tree
# Click on the Test Case Version Operations > "New Version" button
-> DB Access Error

Additional InformationSome more logs :
[18/Dec/17 09:47:11][ERROR][2cbdf1d5ed22c49ed4949d84ab3559bd][DATABASE]

                ERROR ON exec_query() - database.class.php
1292 - Incorrect datetime value: '0000-00-00 00:00:00' for column 'modification_ts' at row 1 - /* Class:testcase - Method: copy_tcversion */ INSERT INTO t_tcversions (id,version,tc_external_id,author_id,creation_ts,summary, importance,execution_type,preconditions,estimated_exec_duration) SELECT 7336 AS id, 7 AS version, tc_external_id, 3 AS author_id, '2018-12-17 10:47:11' AS creation_ts, summary,importance,execution_type, preconditions,estimated_exec_duration FROM t_tcversions WHERE id=4617
THE MESSAGE : /* Class:testcase - Method: copy_tcversion */ INSERT INTO t_tcversions (id,version,tc_external_id,author_id,creation_ts,summary, importance,execution_type,preconditions,estimated_exec_duration) SELECT 7336 AS id, 7 AS version, tc_external_id, 3 AS author_id, '2018-12-17 10:47:11' AS creation_ts, summary,importance,execution_type, preconditions,estimated_exec_duration FROM t_tcversions WHERE id=4617

Query failed: errorcode[1292]
TagsNo tags attached.
Database (MySQL,Postgres,etc)MySQL 14.14
BrowserChrome Version 71.0.3578.80 (Build officiel) (64 bits)
PHP Version7.2.12
TestCaseID
QA Team - Task Workflow StatusREADY FOR TESTING
Attached Files

- Relationships

-  Notes
(0028332)
fman (administrator)
2018-12-17 20:56

>> Incorrect datetime value: '0000-00-00 00:00:00' for column 'modification_ts'
this has happened and continue to happen due to the changes that has been made on new MySQL versions since 5.7

You need to change the columns definition for each timestamp column that has '0000-00-00 00:00:00', with CURRENT_TIMESTAMP or the right default for your MySQL DB version

- Issue History
Date Modified Username Field Change
2018-12-17 11:07 mraurelien New Issue
2018-12-17 20:56 fman Note Added: 0028332
2018-12-17 20:56 fman QA Team - Task Workflow Status => READY FOR TESTING
2018-12-17 20:56 fman Status new => resolved
2018-12-17 20:56 fman Resolution open => fixed
2018-12-17 20:56 fman Assigned To => fman



Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker