Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-19930

Since MariaDB 10.1 aggregate functions return different field type for columns with date values

    Details

      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.

        Attachments

          Activity

            People

            • Assignee:
              bar Alexander Barkov
              Reporter:
              makandra-stefan-langenmaier Stefan Langenmaier
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: