Require at least MySQL version 5.6.5 #9
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The reason for this requirement is that the current codebase requires
more than one TIMESTAMP column in a table which uses either one of the
DEFAULT CURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP clauses. This
was a restriction in MySQL which was removed in version
5.6.5.
It seems that the versions of MariaDB after the 5.5 series (i.e. 10.x
and above) don't have this restriction, hence requiring a server version
number greater than or equal to 5.6.5 is sufficient to ensure that the
code works with the available MySQL server installation. A somewhat
confusing thing is that the MariaDB 5.5 and 10.0 series seem to be
compatible with the 5.5 series of MySQL as noted on the MariaDB versus
MySQL Compatibility
page,
however the 10.0 series doesn't show the TIMESTAMP restriction.
Nevertheless, this change should guard against users trying to use a
version of MySQL which doesn't support the required TIMESTAMP
functionality.
The background to this patch is that I noticed there were a few test failures on CPAN Testers and the error that kept cropping up was:
And after a bit of searching I found out that this was a restriction in MySQL which had been fixed in version 5.6.5. Hence, I thought one probably needs a guard in the test suite to make sure that a compatible version of MySQL or MariaDB is available before proceeding further. I've also updated the documentation to note that one requires at least version 5.6.5 of MySQL for the software to work. I know that the docs say that the code had been tested with version 5.5, however my guess is that some change in the past caused the code to no longer be compatible with the older version.
Anyway, have a look and see what you think. If anything needs to be updated or whatever, just let me know and I'll fix and resubmit.