TL 1.9.15 New Installation DB Access Error

Ask community to help.

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
TestLink user
Posts: 7
Joined: Thu Nov 17, 2005 1:42 pm
Location: Hosur, India

TL 1.9.15 New Installation DB Access Error

Post by scorpfromhell »

Hi All,

I am making a come back to TL after about eight years and trying to install the latest and greatest version of TL - 1.9.15 on a Ubuntu 14.04.5 LTS VM with MySQL 5.5.52-0ubuntu0.14.04.1 - (Ubuntu) version and I am getting the following 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 tl_assignment_status
Droping tl_assignment_types

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 tl_attachments (
`id` int(10) unsigned NOT NULL auto_increment,
`fk_id` int(10) unsigned NOT NULL default '0',
`fk_table` varchar(250) default '',
`title` varchar(250) default '',
`description` varchar(250) default '',
`file_name` varchar(250) NOT NULL default '',
`file_path` varchar(250) default '',
`file_size` int(11) NOT NULL default '0',
`file_type` varchar(250) NOT NULL default '',
`date_added` datetime NOT NULL default CURRENT_TIMESTAMP,
`content` longblob,
`compression_type` int(11) NOT NULL default '0',
KEY tl_attachments_idx1(fk_id)
) DEFAULT CHARSET=utf8) called at [/var/www/html/testlink/install/sqlParser.class.php:103]
#1 SqlParser->process(sql/mysql/testlink_create_tables.sql) called at [/var/www/html/testlink/install/installNewDB.php:427]
I tried to run the SQL from the testlink_create_tables.sql file in phpmyadmin and got to know that the problem is with the default CURRENT_TIMESTAMP for the datetime field.

Upon digging into the issue I found that this is because of a known error in MySQL which go resolved only in version 5.6.5. To quote:
CURRENT_TIMESTAMP is only acceptable on TIMESTAMP fields. DATETIME fields must be left either with a null default value, or no default value at all - default values must be a constant value, not the result of an expression.
Now I either have to figure out if I can upgrade the MySQL version or edit the SQL to use a default value of null. :(

Hope this helps someone facing the same error.
Member of TestLink Community
Posts: 343
Joined: Sun Dec 10, 2006 4:51 am

Re: TL 1.9.15 New Installation DB Access Error

Post by TurboPT »

Thanks for posting your findings!

That is very useful info for those that might have the same MySQL version.
Post Reply