Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.5
-
None
Description
CAST from INET6 to CHAR(39) works fine, so one could expect that ALTER TABLE works too. It does, without a warning, but resulting contents looks like garbage:
CREATE OR REPLACE TABLE t1 (a INET6); |
INSERT INTO t1 VALUES ('2001:db8::ff00:42:8329'); |
SELECT CAST(a AS CHAR(39)) FROM t1; |
ALTER TABLE t1 MODIFY a CHAR(39); |
SELECT * FROM t1; |
MariaDB [test]> SELECT CAST(a AS CHAR(39)) FROM t1; |
+------------------------+ |
| CAST(a AS CHAR(39)) | |
+------------------------+ |
| 2001:db8::ff00:42:8329 |
|
+------------------------+ |
1 row in set (0.000 sec) |
|
MariaDB [test]> ALTER TABLE t1 MODIFY a CHAR(39); |
Query OK, 1 row affected (0.843 sec)
|
Records: 1 Duplicates: 0 Warnings: 0
|
|
MariaDB [test]> SELECT * FROM t1; |
+---------------------+ |
| a |
|
+---------------------+ |
¸ ÿ Bƒ) |
|
+---------------------+ |
1 row in set (0.001 sec) |
Attachments
Issue Links
- relates to
-
MDEV-274 The data type for IPv6/IPv4 addresses in MariaDB
- Closed
-
MDEV-20784 Testing for MDEV-274 (INET6, data type for IPv6/IPv4 addresses)
- Closed