Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Not a Bug
-
Affects Version/s: 10.1.1
-
Fix Version/s: N/A
-
Component/s: Data Definition - Alter Table
-
Labels:None
Description
One test case:
-- source include/have_innodb.inc --disable_query_log let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`; let $innodb_file_format_orig = `SELECT @@innodb_file_format`; let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; --enable_query_log SET GLOBAL innodb_file_format = `Barracuda`; SET GLOBAL innodb_file_per_table = ON; # zlib set global innodb_compression_algorithm = 1; create table innodb_1(c1 bigint not null, b char(200)) engine=innodb page_compressed=1; create table innodb_2(c1 bigint not null, b char(200)) engine=innodb row_format=compact page_compressed=1; create table innodb_3(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic page_compressed=1; show create table innodb_1; show create table innodb_2; show create table innodb_3; --source include/restart_mysqld.inc SET GLOBAL innodb_file_format = `Barracuda`; SET GLOBAL innodb_file_per_table = ON; # zlib set global innodb_compression_algorithm = 1; alter table innodb_1 engine=innodb; alter table innodb_2 engine=innodb; alter table innodb_3 engine=innodb; show create table innodb_1; show create table innodb_2; show create table innodb_3; drop table innodb_1; drop table innodb_2; drop table innodb_3; # reset system --disable_query_log EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig; EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; --enable_query_log
I would assume if alter table engine=innodb is issued all engine specific options are not inherited. Currently, this is not true:
SET GLOBAL innodb_file_format = `Barracuda`; SET GLOBAL innodb_file_per_table = ON; set global innodb_compression_algorithm = 1; create table innodb_1(c1 bigint not null, b char(200)) engine=innodb page_compressed=1; create table innodb_2(c1 bigint not null, b char(200)) engine=innodb row_format=compact page_compressed=1; create table innodb_3(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic page_compressed=1; show create table innodb_1; Table Create Table innodb_1 CREATE TABLE `innodb_1` ( `c1` bigint(20) NOT NULL, `b` char(200) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 show create table innodb_2; Table Create Table innodb_2 CREATE TABLE `innodb_2` ( `c1` bigint(20) NOT NULL, `b` char(200) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT `page_compressed`=1 show create table innodb_3; Table Create Table innodb_3 CREATE TABLE `innodb_3` ( `c1` bigint(20) NOT NULL, `b` char(200) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC `page_compressed`=1 SET GLOBAL innodb_file_format = `Barracuda`; SET GLOBAL innodb_file_per_table = ON; set global innodb_compression_algorithm = 1; alter table innodb_1 engine=innodb; alter table innodb_2 engine=innodb; alter table innodb_3 engine=innodb; show create table innodb_1; Table Create Table innodb_1 CREATE TABLE `innodb_1` ( `c1` bigint(20) NOT NULL, `b` char(200) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 show create table innodb_2; Table Create Table innodb_2 CREATE TABLE `innodb_2` ( `c1` bigint(20) NOT NULL, `b` char(200) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT `page_compressed`=1 show create table innodb_3; Table Create Table innodb_3 CREATE TABLE `innodb_3` ( `c1` bigint(20) NOT NULL, `b` char(200) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC `page_compressed`=1 drop table innodb_1; drop table innodb_2; drop table innodb_3;
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Also 5.5/10.0 may be affected (but not above example).