1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-17831 TRUNCATE TABLE removes ROW_FORMAT=COMPRESSED

If a table had a KEY_BLOCK_SIZE attribute, but no ROW_FORMAT,
it would be created as ROW_FORMAT=COMPRESSED in InnoDB.
However, TRUNCATE TABLE would lose the KEY_BLOCK_SIZE attribute
and create the table with the innodb_default_row_format (DYNAMIC).

This is a regression that was introduced by MDEV-13564.

update_create_info_from_table(): Copy also KEY_BLOCK_SIZE.
This commit is contained in:
Marko Mäkelä
2018-11-26 16:39:36 +02:00
parent 9669536c23
commit 971e1d8677
3 changed files with 19 additions and 0 deletions

View File

@ -18,3 +18,12 @@ SELECT * FROM t1;
c
character
DROP TABLE t1;
#
# MDEV-17831 TRUNCATE TABLE removes ROW_FORMAT=COMPRESSED
#
CREATE TABLE t1 (a SERIAL) ENGINE=InnoDB KEY_BLOCK_SIZE=4;
TRUNCATE TABLE t1;
SHOW TABLE STATUS;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 InnoDB # Compressed # # # # # # 1 # # NULL latin1_swedish_ci NULL key_block_size=4
DROP TABLE t1;