diff --git a/Changes b/Changes index 83bb4cfb5..05e3545f0 100644 --- a/Changes +++ b/Changes @@ -19,6 +19,9 @@ Revision history for Perl extension App::Sqitch - Fix issue where, on first deploy, the MySQL engine would fail to notice that the server was not the right version of MySQL. Thanks to Luke Young for the report (Issue #158). + - Made the `checkit()` MySQL function DETERMINISTIC, to improve + compatability with MariaDB. Thanks to Jesse Luehrs for the report + (Issue #158). 0.992 2014-03-05T00:34:49Z - Fixed target test failures on Windows. diff --git a/lib/App/Sqitch/Engine/mysql.sql b/lib/App/Sqitch/Engine/mysql.sql index 8ecf4f032..97faecf55 100644 --- a/lib/App/Sqitch/Engine/mysql.sql +++ b/lib/App/Sqitch/Engine/mysql.sql @@ -137,7 +137,7 @@ CREATE TABLE events ( DELIMITER | -CREATE FUNCTION checkit(doit INTEGER, message VARCHAR(256)) RETURNS INTEGER +CREATE FUNCTION checkit(doit INTEGER, message VARCHAR(256)) RETURNS INTEGER DETERMINISTIC BEGIN IF doit IS NULL OR doit = 0 THEN SIGNAL SQLSTATE 'ERR0R' SET MESSAGE_TEXT = message;