Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008960TestLinkInstallerpublic2020-07-10 20:312020-09-12 07:11
Reporterenderlen 
Assigned Tofman 
PriorityhighSeverityblockReproducibilityalways
StatusclosedResolutionno change required 
PlatformscalewayOSLinuxOS Version5.5.53-0ubuntu0
Product Version1.9.20 
Fixed in Version 
Summary0008960: Blocking error while installing "there can be only one TIMESTAMP column with CURRENT_TIMESTAMP"
DescriptionHere are the logs when installing, it always fails while trying to create tables:

[>>][5f08cb93340c1454859038][DEFAULT][/install/installNewDB.php][20/Jul/10 20:12:03]
    [20/Jul/10 20:13:12][ERROR][<nosession>][DATABASE]
        ERROR ON exec_query() - database.class.php
1293 - Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause - 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
THE MESSAGE : 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
Query failed: errorcode[1293]
    errormsg:Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
[<<][5f08cb93340c1454859038][DEFAULT][/install/installNewDB.php][20/Jul/10 20:12:03][20/Jul/10 20:13:12][took 69.606053 secs]
TagsNo tags attached.
Database (MySQL,Postgres,etc)mysqlnd 5.0.12
BrowserOpera
PHP Version7.3.16
TestCaseID
QA Team - Task Workflow StatusTBD
Attached Fileslog file icon testlinklog.log [^] (1,589 bytes) 2020-07-10 20:31

- Relationships

-  Notes
(0029907)
fman (administrator)
2020-09-08 14:42
edited on: 2020-09-12 07:08

mysql 5 is not supported anymore

here
https://stackoverflow.com/questions/4489548/why-there-can-be-only-one-timestamp-column-with-current-timestamp-in-default-cla#:~:text=9%20Answers&text=Previously%2C%20at%20most%20one%20TIMESTAMP,and%20ON%20UPDATE%20CURRENT_TIMESTAMP%20clauses. [^]

from the link:
This is the limitation in MYSQL 5.5 version. You need to update the version to 5.6.

(0029909)
fman (administrator)
2020-09-12 07:09
edited on: 2020-09-12 07:11

No change required on TestLink code.

The issue is caused by legacy code in MySQL/MariaDB. It has been resolved in MariaDB 10.0 and MySQL 5.6.5.

(similar issues on other products
https://support.plesk.com/hc/en-us/articles/115001174653-Database-import-fails-There-can-be-only-one-TIMESTAMP-column [^])


- Issue History
Date Modified Username Field Change
2020-07-10 20:31 enderlen New Issue
2020-07-10 20:31 enderlen File Added: testlinklog.log
2020-09-08 14:42 fman Note Added: 0029907
2020-09-12 07:08 fman Note Edited: 0029907 View Revisions
2020-09-12 07:09 fman QA Team - Task Workflow Status => TBD
2020-09-12 07:09 fman Note Added: 0029909
2020-09-12 07:09 fman Status new => closed
2020-09-12 07:09 fman Assigned To => fman
2020-09-12 07:09 fman Resolution open => no change required
2020-09-12 07:11 fman Note Edited: 0029909 View Revisions



Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker