? ?
avatar dmitriy-cloudaccess
dmitriy-cloudaccess
13 Aug 2018

Steps to reproduce the issue

Run DB installation script https://github.com/joomla/joomla-cms/blob/4.0-dev/installation/sql/mysql/joomla.sql on mysql 5.5

Actual result

Mysql fails with: ERROR 1067 (42000) at line 1943: Invalid default value for 'created'

System information (as much as possible)

Mysql version 5.5.59

Additional comments

Mysql 5.5 doesn't accept default value NOW() for datetime columns.
Like https://github.com/joomla/joomla-cms/blob/4.0-dev/installation/sql/mysql/joomla.sql#L1951
On mysql 5.7 it works correctly.

avatar dmitriy-cloudaccess dmitriy-cloudaccess - open - 13 Aug 2018
avatar joomla-cms-bot joomla-cms-bot - change - 13 Aug 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 13 Aug 2018
avatar brianteeman brianteeman - change - 13 Aug 2018
Labels Added: ?
avatar brianteeman brianteeman - labeled - 13 Aug 2018
avatar brianteeman
brianteeman - comment - 13 Aug 2018

A possible fix is to change the column type to timestamp not datetime and adding a trigger

avatar franz-wohlkoenig franz-wohlkoenig - change - 13 Aug 2018
Status New Discussion
avatar franz-wohlkoenig franz-wohlkoenig - change - 13 Aug 2018
Category com_installer com_workflow SQL
avatar alikon
alikon - comment - 13 Aug 2018

or simply use the normal default DEFAULT '0000-00-00 00:00:00',

avatar brianteeman
brianteeman - comment - 13 Aug 2018

@alikon I was assuming that there was a reason for the NOW() :)

avatar HLeithner
HLeithner - comment - 13 Aug 2018

Mysql 5.5 is EOL on release of J4 but I'm note sure if the minimum version is pumped to 5.6.

avatar HLeithner
HLeithner - comment - 13 Aug 2018

@alikon can you do this in you mysql PR?

avatar alikon
alikon - comment - 13 Aug 2018

yes i'll do when the state/stage will end

avatar brianteeman
brianteeman - comment - 13 Aug 2018

It may be EOL but the technical requirements are
https://docs.joomla.org/Potential_backward_compatibility_issues_in_Joomla_4

avatar HLeithner
HLeithner - comment - 13 Aug 2018

thx for the link

avatar wilsonge
wilsonge - comment - 13 Aug 2018

Mainly because over 50% of our user base still use MySQL 5.5 https://developer.joomla.org/stats/

avatar hvdmeer
hvdmeer - comment - 13 Aug 2018

From what time frame are those statistics? From the start of gathering or perhaps from the last year?

avatar mbabker
mbabker - comment - 13 Aug 2018

The API endpoint is all time. It is still 50% for data updated in the last 90 days.

avatar ReLater
ReLater - comment - 13 Aug 2018

See pr #21600

avatar brianteeman brianteeman - change - 14 Aug 2018
Labels Added: J4 Issue
avatar brianteeman brianteeman - labeled - 14 Aug 2018
avatar wilsonge
wilsonge - comment - 14 Aug 2018

Closing as we have the PR for testing

avatar wilsonge wilsonge - change - 14 Aug 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-08-14 08:26:19
Closed_By wilsonge
avatar wilsonge wilsonge - close - 14 Aug 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 20 Apr 2019
Labels Added: ?
Removed: J4 Issue ?
avatar franz-wohlkoenig franz-wohlkoenig - unlabeled - 20 Apr 2019

Add a Comment

Login with GitHub to post a comment