Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
12.0.2
-
mysql> select version();
+------------------------+
| version() |
+------------------------+
| 12.0.2-MariaDB-ubu2404 |
+------------------------+
1 row in set (0.00 sec)
-
Unexpected results
-
Q1/2026 Server Maintenance
Description
the AVG function returns decimal type,when union between the decimal type and the date type ,the decimal type and the date type become the blob type.But the decimal type should perfome like the int type becoming string type,and the date type shouldn't change
mysql> (SELECT MAX(1) as col FROM t1) UNION ALL (SELECT CURDATE() as col);
|
+------------+
|
| col |
|
+------------+
|
| 1 |
|
| 2025-10-17 |
|
+------------+
|
2 rows in set (0.00 sec)
|
 |
mysql> (SELECT AVG(1) as col FROM t1) UNION ALL (SELECT CURDATE() as col);
|
+------------------------+
|
| col |
|
+------------------------+
|
| 0x312E3030303030303030 |
|
| 0x323032352D31302D3137 |
|
+------------------------+
|
2 rows in set (0.00 sec)
|