Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.11, 11.1(EOL), 11.2(EOL), 11.3(EOL), 11.4, 11.5(EOL)
-
None
Description
Some string functions cut the result length up to @@max_allowed_packet. A change in the variable value leads to the table corruption:
SET GLOBAL max_allowed_packet=16777216*2; |
KILL CONNECTION_ID();
|
CREATE OR REPLACE TABLE t1 ( |
a VARCHAR(64), |
v INT GENERATED ALWAYS AS (LENGTH(REPEAT(a,16777216*2))), |
KEY(v) |
) ENGINE=MyISAM;
|
INSERT INTO t1 (a) VALUES ('a'); |
SELECT * FROM t1; |
KILL CONNECTION_ID();
|
|
SET GLOBAL max_allowed_packet=16777216; |
KILL CONNECTION_ID();
|
|
CHECK TABLE t1; |
+---------+-------+----------+------------------------------------------------------------------------------+
|
| Table | Op | Msg_type | Msg_text |
|
+---------+-------+----------+------------------------------------------------------------------------------+
|
| test.t1 | check | error | Checksum for key: 1 doesn't match checksum for records |
|
| test.t1 | check | Warning | Result of repeat() was larger than max_allowed_packet (16777216) - truncated |
|
| test.t1 | check | error | Corrupt |
|
+---------+-------+----------+------------------------------------------------------------------------------+
|
Attachments
Issue Links
- relates to
-
MDEV-20610 Assertion failed or btr_validate_index(..) in row_upd_sec_index_entry on a time_zone change
- Stalled
-
MDEV-34037 DATETIME <-> TIMESTAMP conversion in a virtual column corrups the table on @@time_zone change
- In Review
-
MDEV-34038 A division in an indexed virtual column corrupts the table on @@dev_precision_increment change
- Open