Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.1.40
-
None
Description
If I execute the following query on MariaDB 10.1 or later, the result contains a column with a datetime field type (MYSQL_TYPE_DATETIME):
`SELECT MIN(NOW()) AS t`
On older versions or any version of MySQL this column is a text type (MYSQL_TYPE_VAR_STRING).
https://dev.mysql.com/doc/dev/mysql-server/latest/field__types_8h.html
I'm not aware of a sql_mode compatibility flag so I consider this a bug.
I see why it's preferable/reasonable to return a datetime, but this behavior breaks existing applications.