Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
12.0.2
-
None
-
None
-
mysql> select version();
+------------------------+
| version() |
+------------------------+
| 12.0.2-MariaDB-ubu2404 |
+------------------------+
1 row in set (0.00 sec)
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)
|