Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008876TestLinkDatabase MySQLpublic2020-02-28 16:462020-03-08 11:26
Reporterjnam 
Assigned Tofman 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionno change required 
PlatformOSUbuntuOS Version
Product Version1.9.20 
Fixed in Version 
Summary0008876: INSTALL - DB Access Error - table: baseline_l1l2_context
DescriptionAfter I follow the Steps To Reproduce, I got this message
[UI]
TestLink setup will now attempt to setup the database:

Creating connection to Database Server:OK!

Connecting to database `testlink`:OK!
Creating Testlink DB user `admin`:OK! (ok - user_exists ok - grant assignment)
Dropping all TL existent tables:
Droping
... (tables names omitted)
Done!
Processing:sql/mysql/testlink_create_tables.sql

 ==============================================================================
 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() called at [/var/www/html/testlink/install/sqlParser.class.php:98]
#1 SqlParser->process() called at [/var/www/html/testlink/install/installNewDB.php:469]

[userlog0.log]
Creating default object from empty value - in /var/www/html/testlink/install/installUtils.php - Line 555
    [20/Feb/27 23:52:50][ERROR][<nosession>][DATABASE]
        ERROR ON exec_query() - database.class.php
1067 - Invalid default value for 'end_exec_ts' - CREATE TABLE /*prefix*/baseline_l1l2_context (
  id int(10) unsigned NOT NULL AUTO_INCREMENT,
  testplan_id int(10) unsigned NOT NULL DEFAULT '0',
  platform_id int(10) unsigned NOT NULL DEFAULT '0',
  being_exec_ts timestamp NOT NULL,
  end_exec_ts timestamp NOT NULL, /*NOT NULL DEFAULT '2100-01-01 00:00:01',*/
  creation_ts timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (id),
  UNIQUE KEY udx1 (testplan_id,platform_id,creation_ts)
) DEFAULT CHARSET=utf8
THE MESSAGE : CREATE TABLE /*prefix*/baseline_l1l2_context (
  id int(10) unsigned NOT NULL AUTO_INCREMENT,
  testplan_id int(10) unsigned NOT NULL DEFAULT '0',
  platform_id int(10) unsigned NOT NULL DEFAULT '0',
  being_exec_ts timestamp NOT NULL,
  end_exec_ts timestamp NOT NULL, /*NOT NULL DEFAULT '2100-01-01 00:00:01',*/
  creation_ts timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (id),
  UNIQUE KEY udx1 (testplan_id,platform_id,creation_ts)
) DEFAULT CHARSET=utf8
Query failed: errorcode[1067]
    errormsg:Invalid default value for 'end_exec_ts'
Steps To Reproduce1. <<IP Address>>/testlink/install/index.php (I am running this in remote server)
2. 'Definition of DB Access' -> Enter data into fields
3. Click 'Process Tesklink Set-up!' button
Additional Information* install/sql/mysql/testlink_create_tables.sql :
CREATE TABLE /*prefix*/baseline_l1l2_context (
  id int(10) unsigned NOT NULL AUTO_INCREMENT,
  testplan_id int(10) unsigned NOT NULL DEFAULT '0',
  platform_id int(10) unsigned NOT NULL DEFAULT '0',
  begin_exec_ts timestamp NOT NULL,
  end_exec_ts timestamp NOT NULL,
  creation_ts timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (id),
  UNIQUE KEY udx1 (testplan_id,platform_id,creation_ts)
) DEFAULT CHARSET=utf8;

==> I changed "end_exec_ts timestamp NOT NULL," to "end_exec_ts timestamp NOT NULL DEFAULT '2038-01-01 00:00:01'," and the issue was fixed.
==> My primary guess here is, default value for end_exec_ts field is either zero-date or invalid format since MySql 5.7~ does not allow zero-date for timestamp field.
==> I found github commits that might be related to this issue: https://github.com/TestLinkOpenSourceTRMS/testlink-code/pull/253/commits/9f25ed4429f14dc4f5d22caa261abeb9711d68e3 [^]
Tagsmysql compatibility, mysql configuration
Database (MySQL,Postgres,etc)MySQL 5.7
BrowserChrome
PHP Version7.3
TestCaseID
QA Team - Task Workflow StatusTBD
Attached Files

- Relationships

-  Notes
(0029513)
fman (administrator)
2020-02-28 17:15

The issue depends on your MySQL configuration, then IMHO can not be considered an issue
(0029515)
jnam (reporter)
2020-02-28 17:40

Thank you for the note :)
Do you think the change I made on 'end_exec_ts' field would impact the functionality of application in serious manner? Rather than taking any risks by changing MySQL configuration, I would like to stick to this code until new version is released.
(0029516)
fman (administrator)
2020-02-28 18:08

These tables are used to save baselines, do not think the feature will suffer for your changes.
(0029517)
jnam (reporter)
2020-02-28 18:27

Thanks a lot again fman.

- Issue History
Date Modified Username Field Change
2020-02-28 16:46 jnam New Issue
2020-02-28 17:15 fman Note Added: 0029513
2020-02-28 17:40 jnam Note Added: 0029515
2020-02-28 18:08 fman Note Added: 0029516
2020-02-28 18:27 jnam Note Added: 0029517
2020-03-08 11:25 fman QA Team - Task Workflow Status => TBD
2020-03-08 11:25 fman Summary DB Access Error - debug_print_backtrace() OUTPUT START => INSTALL - DB Access Error - table: baseline_l1l2_context
2020-03-08 11:25 fman Tag Attached: mysql compatibility
2020-03-08 11:25 fman Tag Attached: mysql configuration
2020-03-08 11:26 fman Status new => resolved
2020-03-08 11:26 fman Resolution open => no change required
2020-03-08 11:26 fman Assigned To => fman



Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker