Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.5
-
None
Description
create or replace table t1 (a inet6 not null) engine=csv; |
insert into t1 values ('2001:db8::ff00:42:8329'); |
select * from t1; |
10.5 b37386d8 |
MariaDB [test]> create or replace table t1 (a inet6 not null) engine=csv; |
Query OK, 0 rows affected (0.062 sec) |
|
MariaDB [test]> insert into t1 values ('2001:db8::ff00:42:8329'); |
Query OK, 1 row affected (0.017 sec)
|
|
MariaDB [test]> select * from t1; |
ERROR 1194 (HY000): Table 't1' is marked as crashed and should be repaired |
MariaDB [test]> repair table t1; |
+---------+--------+----------+-------------------------------------------------------------------------------------+ |
| Table | Op | Msg_type | Msg_text | |
+---------+--------+----------+-------------------------------------------------------------------------------------+ |
| test.t1 | repair | Warning | Incorrect inet6 value: '2001:db8::ff00:42:8329' for column `test`.`t1`.`a` at row 1 | |
| test.t1 | repair | status | OK |
|
+---------+--------+----------+-------------------------------------------------------------------------------------+ |
2 rows in set (0.017 sec) |
|
MariaDB [test]> select * from t1; |
Empty 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
-
The problem happens because ha_tina write data to the CSV file using text notation for INET6:
"2001:db8::ff00:42:8329"
but when it further reads a row in this statement:
is_enum ? CHECK_FIELD_IGNORE : CHECK_FIELD_WARN))
Field_inet6::store() considers the data to be in the binary format, because buffer.charset() points to &my_charset_bin.