MantisBT - TestLink
View Issue Details
0008584TestLinkInstallerpublic2019-03-04 08:222019-03-04 11:14
gcd0318 
 
highblockalways
newopen 
linuxcent os 64 bit7
1.9.19 (2019 Q1) 
 
mariadb-5.5.56-2.el7.x86_64
chrome
7.0
0008584: DB Access Error - debug_print_backtrace() OUTPUT START
when TestLink setup will now attempt to setup the database:
got error:
TestLink setup will now attempt to setup the database:

Creating connection to Database Server:OK!

Connecting to database `testlink`:OK!
Creating Testlink DB user `testlink`:OK! (ok - user_exists ok - grant assignment)
Dropping all TL existent tables:
Droping assignment_status
Droping assignment_types
Droping attachments
Droping builds
Droping cfield_build_design_values
Droping cfield_design_values
Droping cfield_execution_values
Droping cfield_node_types
Droping cfield_testplan_design_values
Droping cfield_testprojects
Droping custom_fields
Droping db_version
Droping events
Droping execution_bugs
Droping execution_tcsteps
Droping executions
Droping testcase_script_links
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(CREATE TABLE /*prefix*/inventory (
  id int(10) unsigned NOT NULL auto_increment,
    `testproject_id` INT( 10 ) UNSIGNED NOT NULL ,
    `owner_id` INT(10) UNSIGNED NOT NULL ,
    `name` VARCHAR(255) NOT NULL ,
    `ipaddress` VARCHAR(255) NOT NULL ,
    `content` TEXT NULL ,
    `creation_ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `modification_ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    PRIMARY KEY (`id`),
    KEY /*prefix*/inventory_idx1 (`testproject_id`)
) DEFAULT CHARSET=utf8) called at [/var/www/testlink/install/sqlParser.class.php:98]
#1 SqlParser->process(sql/mysql/testlink_create_tables.sql) called at [/var/www/testlink/install/installNewDB.php:459]
also execute the sql from mysql console, got:

ERROR 1293 (HY000): Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
installation
Issue History
2019-03-04 08:22gcd0318New Issue
2019-03-04 08:38gcd0318Note Added: 0028561
2019-03-04 09:15gcd0318Tag Attached: installation
2019-03-04 09:15gcd0318Note Edited: 0028561bug_revision_view_page.php?bugnote_id=28561#r5754
2019-03-04 10:07gcd0318Note Added: 0028562
2019-03-04 11:14fmanNote Added: 0028563

Notes
(0028561)
gcd0318   
2019-03-04 08:38   
(edited on: 2019-03-04 09:15)
As my study to mariadb, this should only happen to mariadb (mysql) 5.5 or earlier.

Quote from doc of mysql 5.5:
One TIMESTAMP column in a table can have the current timestamp as the default value for initializing the column, as the auto-update value, or both. It is not possible to have the current timestamp be the default value for one column and the auto-update value for another column.

while quote from doc of mysql 5.6:
Previously, at most one TIMESTAMP column per table could be automatically initialized or updated to the current date and time. This restriction has been lifted. Any TIMESTAMP column definition can have any combination of DEFAULT CURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP clauses. In addition, these clauses now can be used with DATETIME column definitions. For more information, see Automatic Initialization and Updating for TIMESTAMP and DATETIME.

Do you think it necessary to be compatable to older mysql?

(0028562)
gcd0318   
2019-03-04 10:07   
updated to mariadb 10 and installed successfully
(0028563)
fman   
2019-03-04 11:14   
thanks this is a now issue, that affects different MySQL and MariaDB OLDER versions.