From 971e1d8677be58cd51e558ef80042c76a5c21e1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 26 Nov 2018 16:39:36 +0200 Subject: 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. --- sql/table.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'sql/table.cc') diff --git a/sql/table.cc b/sql/table.cc index 2b278288784..0cf88aed4f6 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -3830,6 +3830,7 @@ void update_create_info_from_table(HA_CREATE_INFO *create_info, TABLE *table) create_info->table_options= share->db_create_options; create_info->avg_row_length= share->avg_row_length; create_info->row_type= share->row_type; + create_info->key_block_size= share->key_block_size; create_info->default_table_charset= share->table_charset; create_info->table_charset= 0; create_info->comment= share->comment; -- cgit v1.2.1