Browse Source
MDEV-21429 TRUNCATE and OPTIMIZE are being refused due to "row size too large"
MDEV-21429 TRUNCATE and OPTIMIZE are being refused due to "row size too large"
By default (innodb_strict_mode=ON), InnoDB attempts to guarantee
at DDL time that any INSERT to the table can succeed.
MDEV-19292 recently revised the "row size too large" check in InnoDB.
The check still is somewhat inaccurate;
that should be addressed in MDEV-20194.
Note: If a table contains multiple long string columns so that each column
is part of a column prefix index, then an UPDATE that attempts to modify
all those columns at once may fail, because the undo log record might
not fit in a single undo log page (of innodb_page_size). In the worst case,
the undo log record would grow by about 3KiB of for each updated column.
The DDL-time check (since the InnoDB Plugin for MySQL 5.1) is optional
in the sense that when the maximum B-tree record size or undo log
record size would be exceeded, the DML operation will fail and the
transaction will be properly rolled back.
create_table_info_t::row_size_is_acceptable(): Add the parameter
'bool strict' so that innodb_strict_mode=ON can be overridden during
TRUNCATE, OPTIMIZE and ALTER TABLE...FORCE (when the storage format
is not changing).
create_table_info_t::create_table(): Perform a sloppy check for
TRUNCATE TABLE (create_fk=false).
prepare_inplace_alter_table_dict(): Perform a sloppy check for
simple operations.
trx_is_strict(): Remove. The function became unused in
commit 98694ab0cb
(MDEV-20949).
bb-10.2-MDEV-18464
6 changed files with 69 additions and 47 deletions
-
26mysql-test/suite/innodb/r/row_size_error_log_warnings_3.result
-
10mysql-test/suite/innodb/t/row_size_error_log_warnings_3.test
-
40storage/innobase/handler/ha_innodb.cc
-
8storage/innobase/handler/ha_innodb.h
-
23storage/innobase/handler/handler0alter.cc
-
9storage/innobase/include/trx0trx.h
Write
Preview
Loading…
Cancel
Save
Reference in new issue