diff --git a/src/Functions/toMinute.cpp b/src/Functions/toMinute.cpp index a928925156e..27a79bb0e53 100644 --- a/src/Functions/toMinute.cpp +++ b/src/Functions/toMinute.cpp @@ -12,6 +12,8 @@ using FunctionToMinute = FunctionDateOrDateTimeToSomething(); + /// MysQL compatibility alias. + factory.registerFunction("MINUTE", FunctionFactory::CaseInsensitive); } } diff --git a/tests/queries/0_stateless/01673_test_toMinute_mysql_dialect.reference b/tests/queries/0_stateless/01673_test_toMinute_mysql_dialect.reference new file mode 100644 index 00000000000..573541ac970 --- /dev/null +++ b/tests/queries/0_stateless/01673_test_toMinute_mysql_dialect.reference @@ -0,0 +1 @@ +0 diff --git a/tests/queries/0_stateless/01673_test_toMinute_mysql_dialect.sql b/tests/queries/0_stateless/01673_test_toMinute_mysql_dialect.sql new file mode 100644 index 00000000000..4ac7106158a --- /dev/null +++ b/tests/queries/0_stateless/01673_test_toMinute_mysql_dialect.sql @@ -0,0 +1 @@ +SELECT MINUTE(toDateTime('2016-06-15 23:00:00')); \ No newline at end of file