Mantis Bugtracker 

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007781TestLinkDatabase MySQLpublic2016-12-08 09:132017-01-20 18:46
Assigned Tofman 
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version1.9.15 (2015 Q4) 
Fixed in Version 
Summary0007781: DB Upgrade to 1.9.15 fails for MySQL 5.6 and older
DescriptionAccroding to your README:

Server environment should consists from:
- web-server: Apache 2.x
- PHP > 5.4
- DBMS: MySQL 5.6.x , Postgres 9.x , MS-SQL 2008/2012

But the update script to 1.9.15 fails with all MySQL versions lower than 5.7. The problem is the two new plugins directory. There you define two datetime fields like this:

   `creation_ts` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,

But up to MySQL 5.6 datetime can only have NULL as a default value. Only 5.7 and newer can have CURRENT_TIMESTAMP as a default value.
TagsNo tags attached.
Database (MySQL,Postgres,etc)mysql
PHP Version
QA Team - Task Workflow StatusTBD
Attached Files

- Relationships

-  Notes
fman (administrator)
2016-12-11 14:40

This issues has been reported several times and the only easy way to solve it is when you hit it, you change date or timestamp default definition according to your db version
modir (reporter)
2016-12-11 15:51

Yes, and no. You could write as well in the README file that you only support MySQL 5.7 and newer. Then your login script would work in all of your supported cases.

Or if you set the DEFAULT NULL and not CURRENT_TIMESTAMP then it will work with 5.6 and 5.7. The problem is that you use a feature which was added with 5.7. But the old parameters from 5.6 are still valid in 5.7. So this would be the best solution.
fman (administrator)
2016-12-11 16:05

Because new XAMPP versions support only MARIADB, i'm not sure about compatibility issues between MARIADB, MySQL 5.6, and MySQL 5.7
I do not want to force people to use MySQL 5.7.
On next versions I will try to put some notice on README but as usual I think people is going to ignore it.

Maybe for 1.9.16 I'm going to review a little bit date and timestamp fields, to assign right defaults, and right again some notice for people that has to upgrade for old TestLink versions.
I do not want to use too much time and effort on automatic migration, when a couple of simple SQL commands can do the trick
anton7811 (reporter)
2017-01-04 11:12

I don't agree that people don't read README.
I'm always read them, especially if I'm about to upgrade production server.

Modifying of upgrade scripts also may be dangerous as I have no idea how and when that tables are used.

Personally for me this is a blocker issue. I'm using RedHat based Linux which aren't updated frequently. And mysql/mariadb with support of CURRENT_TIMESTAMP isn't a nearest future for CentOS/ScientificLinux users. Using of 3d party repositories also could be forbidden by IT.

Having a support of marriadb(mysql) v5.5 in 1.9.16 will unblock me.
fman (administrator)
2017-01-19 06:39

1.9.16 DB requirements will be MySQL 5.6+, MariaDB 10.+
fman (administrator)
2017-01-20 18:46

Tested on MAC OS using MAMP PRO with MySQL 5.6.34 => no issue upgrading 1.9.14 to 1.9.15

- Issue History
Date Modified Username Field Change
2016-12-08 09:13 modir New Issue
2016-12-11 14:40 fman Note Added: 0025705
2016-12-11 15:51 modir Note Added: 0025711
2016-12-11 16:05 fman Note Added: 0025713
2017-01-04 11:12 anton7811 Note Added: 0025819
2017-01-19 06:39 fman Note Added: 0025853
2017-01-20 18:46 fman Note Added: 0025857
2017-01-20 18:46 fman QA Team - Task Workflow Status => TBD
2017-01-20 18:46 fman Status new => closed
2017-01-20 18:46 fman Assigned To => fman
2017-01-20 18:46 fman Resolution open => no change required

Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker