[MDEV-19930] Since MariaDB 10.1 aggregate functions return different field type for columns with date values Created: 2019-07-02 Updated: 2019-07-05 Resolved: 2019-07-05 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data types, Temporal Types |
| Affects Version/s: | 10.1.40 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Stefan Langenmaier | Assignee: | Alexander Barkov |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | 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. |
| Comments |
| Comment by Alexander Barkov [ 2019-07-05 ] |
|
Old versions returned a wrong data type in the result set metadata, see this bug report: This bug was fixed in 10.1.8. I'm afraid we cannot do anything here. Adding an sql_mode flag like EMULATE_BUG8875 does not sound like a reasonable idea. |