Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
12.3
-
None
Description
MariaDB [test]> set @x=CAST('<a/>' AS XMLTYPE);
|
Query OK, 0 rows affected (0,001 sec)
|
|
|
MariaDB [test]> select @x+1;
|
+------+
|
| @x+1 |
|
+------+
|
| 1 |
|
+------+
|
1 row in set (0,001 sec)
|
|
|
MariaDB [test]> create table tb as select @x;
|
Query OK, 1 row affected (0,060 sec)
|
Records: 1 Duplicates: 0 Warnings: 0
|
|
|
MariaDB [test]> show create table tb;
|
+-------+------------------------------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+------------------------------------------------------------------------------------------------------------------------+
|
| tb | CREATE TABLE `tb` (
|
`@x` longtext DEFAULT NULL
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci |
|
+-------+------------------------------------------------------------------------------------------------------------------------+
|
1 row in set (0,001 sec)
|
compare with geometry:
MariaDB [test]> set @x= PointFromText('POINT(10 10)');
|
Query OK, 0 rows affected (0,010 sec)
|
|
|
MariaDB [test]> select @x;
|
+---------------------------+
|
| @x |
|
+---------------------------+
|
| $@ $@ |
|
+---------------------------+
|
1 row in set (0,001 sec)
|
|
|
MariaDB [test]> select @x+1;
|
ERROR 4078 (HY000): Illegal parameter data types geometry and int for operation '+'
|
|
|
MariaDB [test]> create table tb2 as select @x;
|
Query OK, 1 row affected (0,058 sec)
|
Records: 1 Duplicates: 0 Warnings: 0
|
|
|
MariaDB [test]> show create table tb2;
|
+-------+-------------------------------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+-------------------------------------------------------------------------------------------------------------------------+
|
| tb2 | CREATE TABLE `tb2` (
|
`@x` geometry DEFAULT NULL
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci |
|
+-------+-------------------------------------------------------------------------------------------------------------------------+
|
1 row in set (0,001 sec)
|
Attachments
Issue Links
- relates to
-
MDEV-39124 XMLTYPE: allow only well-formed XML
-
- Closed
-