Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008175TestLinkSystem Managementpublic2018-01-05 09:562018-01-09 07:57
ReporterLimo 
Assigned To 
PriorityhighSeveritymajorReproducibilityalways
StatusnewResolutionopen 
PlatformOSOS Version
Product Version1.9.16 (2016 Q4) 
Fixed in Version 
Summary0008175: DB Access Error - debug_print_backtrace() OUTPUT START
Description
Hi,

This message appears when I create an new test form from another test form.
Also when I create just a new test form I find the same problem that the similar Issue ID : 0008150.

What do I have to check?

==============================================================================
 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 tcversions (id,version,tc_external_id,author_id,creation_ts,summary, importance,execution_type,preconditions,estimated_exec_duration) SELECT 163064 AS id, 3 AS version, tc_external_id, 40 AS author_id, '2018-01-04 11:44:12' AS creation_ts, summary,importance,execution_type, preconditions,estimated_exec_duration FROM tcversions WHERE id=162995 ) called at [C:\xampp\htdocs\testlink\lib\functions\testcase.class.php:1993]
#1 testcase->copy_tcversion(161445, 162995, 163064, 3, 40) called at [C:\xampp\htdocs\testlink\lib\functions\testcase.class.php:1876]
0000002 testcase->create_new_version(161445, 40, 162995) called at [C:\xampp\htdocs\testlink\lib\testcases\tcEdit.php:293]
Steps To ReproduceIf you create an new test form from another test form.
If you create just a new test form (ID similar Issue : 0008150).
Additional InformationPHP version : 7.2
Xampp 5.6.32
TagsNo tags attached.
Database (MySQL,Postgres,etc)MySQL
BrowserChrome, Firefox
PHP Version7.2
TestCaseID
QA Team - Task Workflow Status
Attached Files

- Relationships

-  Notes
(0027137)
fman (administrator)
2018-01-08 18:55

please get latest code from github, do fresh install, retest and provide feedback
(0027138)
Limo (reporter)
2018-01-09 07:42
edited on: 2018-01-09 07:57

Hi,

When I execute the "SELECT" in phpmyadmin, this is ok.
When I execute the "INSERT INTO" in phpmyadmin, this is not ok. I've an error that say "0001978 - Incorrect default value '0000-00-00 00:00:00' for column 'modification_ts'.

If I do an "INSERT INTO" specifying "modification_ts" (for exemple : '2018-01-08 12:00:00'), there it works.


I've so change in C:\xampp\htdocs\testlink\lib\functions\testcase.class.php the sql variable (lign 1983), and add 'modification_ts' in the 'INSERT INTO' and in the 'SELECT'.


    $sql = "/* $debugMsg */ " .
           " INSERT INTO {$this->tables['tcversions']} (id,version,tc_external_id,author_id,creation_ts,summary,importance,execution_type,preconditions,estimated_exec_duration,modification_ts) " .
           " SELECT {$to_tcversion_id} AS id,{$as_version_number} AS version,tc_external_id,{$user_id} AS author_id,{$now} AS creation_ts,summary,importance,execution_type,preconditions,estimated_exec_duration,{$now} AS modification_ts" .
           " FROM {$this->tables['tcversions']} " .
           " WHERE id={$from_tcversion_id} ";
    $result = $this->db->exec_query($sql);


With this change, I do not have issue when I select 'Create a new version' in a Test Case.



And for the other issue (nb : when I want create a new "Test Case Operations"), it's the "same" solution

I've change this 2 variables (lign 629), and add 'modification_ts' and ', " . $this->db->db_now();'

 $sql = "/* $debugMsg */ INSERT INTO {$this->tables['tcversions']} " .
           " (id,tc_external_id,version,summary,preconditions," .
           " author_id,creation_ts,execution_type,importance,modification_ts ";

    $sqlValues = " VALUES({$tcase_version_id},{$item->externalID},{$item->version},'" .
                 $this->db->prepare_string($item->summary) . "','" .
                 $this->db->prepare_string($item->preconditions) . "'," .
                 $this->db->prepare_int($item->authorID) . "," . $this->db->db_now() .
                 ", {$item->executionType},{$item->importance}, " . $this->db->db_now();


The new version of Mysql (10.1.29-MariaDB) apparently do not like that 'modification_ts' be empty or null ?

Thanks.


- Issue History
Date Modified Username Field Change
2018-01-05 09:56 Limo New Issue
2018-01-08 18:54 fman Relationship added related to 0008150
2018-01-08 18:55 fman Relationship deleted related to 0008150
2018-01-08 18:55 fman Note Added: 0027137
2018-01-09 07:42 Limo Note Added: 0027138
2018-01-09 07:57 Limo Note Edited: 0027138 View Revisions



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker