Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
N/A
-
None
-
Can result in unexpected behaviour
-
Q1/2026 Server Maintenance
Description
MariaDB [test]> select b + 1 from t1;
|
ERROR 4078 (HY000): Illegal parameter data types xmltype and int for operation '+'
|
|
|
MariaDB [test]> CREATE or replace TABLE t2 (a INT, b xmltype as (a+1));
|
ERROR 4078 (HY000): Cannot cast 'bigint' as 'xmltype' in assignment of `test`.`t2`.`b`
|
but it is allowed as a default:
MariaDB [test]> CREATE or replace TABLE t2 (a INT, b xmltype default (a+1));
|
Query OK, 0 rows affected (0,039 sec)
|
|
|
MariaDB [test]> insert into t2(a) select 5;
|
Query OK, 1 row affected (0,016 sec)
|
Records: 1 Duplicates: 0 Warnings: 0
|
|
|
MariaDB [test]> select * from t2;
|
+------+------+
|
| a | b |
|
+------+------+
|
| 5 | 6 |
|
+------+------+
|
1 row in set (0,003 sec)
|
MariaDB [test]> create sequence s;
|
Query OK, 0 rows affected (0,043 sec)
|
|
|
MariaDB [test]> create table t ( a xmltype default nextval(s));
|
Query OK, 0 rows affected (0,038 sec)
|
|
|
MariaDB [test]> insert into t select nextval(s);
|
ERROR 4078 (HY000): Cannot cast 'bigint' as 'xmltype' in assignment of `test`.`t`.`a`
|
|
|
MariaDB [test]> insert into t values ();
|
Query OK, 1 row affected (0,015 sec)
|
Attachments
Issue Links
- is caused by
-
MDEV-37261 Basic XML data type
-
- In Testing
-