Commit 7afea563 authored by marko's avatar marko

branches/zip: Implement ROW_FORMAT=COMPRESSED and ROW_FORMAT=DYNAMIC.

Throw warnings, not errors for wrong ROW_FORMAT or KEY_BLOCK_SIZE,
so that any table dump can be loaded.

As of this change, InnoDB supports the following table formats:

ROW_FORMAT=REDUNDANT
	the only format before MySQL/InnoDB 5.0.3
ROW_FORMAT=COMPACT
	the new default format of MySQL/InnoDB 5.0.3
ROW_FORMAT=DYNAMIC
	uncompressed, no prefix in the clustered index record for BLOBs
ROW_FORMAT=COMPRESSED
	like ROW_FORMAT=DYNAMIC, but zlib compressed B-trees and BLOBs;
	the compressed page size is specified by KEY_BLOCK_SIZE in
	kilobytes (1, 2, 4, 8, or 16; default 8)

KEY_BLOCK_SIZE=1, 2, 4, 8, or 16: implies ROW_FORMAT=COMPRESSED;
ignored if ROW_FORMAT is not COMPRESSED

KEY_BLOCK_SIZE=anything else: ignored

The InnoDB row format is displayed in the 4th column (Row_format) of
the output of SHOW TABLE STATUS.  The Create_options column may show
ROW_FORMAT= and KEY_BLOCK_SIZE=, but they do not necessarily have
anything to do with InnoDB.

The table format can also be queried like this:

SELECT table_schema, table_name, row_format
FROM information_schema.tables
WHERE engine='innodb' and row_format in ('Compressed','Dynamic');

When Row_format='Compressed', KEY_BLOCK_SIZE should usually correspond
to the compressed page size.  But the .frm file could be manipulated
to show any KEY_BLOCK_SIZE.

For some reason, INFORMATION_SCHEMA.TABLES.CREATE_OPTIONS does not
include KEY_BLOCK_SIZE.  It does include row_format (spelled in
lowercase).  This looks like a MySQL bug, because the table
INFORMATION_SCHEMA.TABLES probably tries to replace SHOW TABLE STATUS.
I reported this as Bug #35275 <http://bugs.mysql.com/35275>.

ha_innobase::get_row_type(): Add ROW_TYPE_COMPRESSED, ROW_TYPE_DYNAMIC.

ha_innobase::create(): Implement ROW_FORMAT=COMPRESSED and
ROW_FORMAT=DYNAMIC.  Do not throw errors for wrong ROW_FORMAT or
KEY_BLOCK_SIZE, but issue warnings instead.

ha_innobase::check_if_incompatible_data(): Return COMPATIBLE_DATA_NO
if KEY_BLOCK_SIZE has been specified.

innodb.result: Adjust the result for the warning issued for ROW_FORMAT=FIXED.

innodb-zip.test: Add tests.  Query INFORMATION_SCHEMA.TABLES for ROW_FORMAT.
parent ec257218
...@@ -2327,13 +2327,33 @@ UNIV_INTERN ...@@ -2327,13 +2327,33 @@ UNIV_INTERN
enum row_type enum row_type
ha_innobase::get_row_type() const ha_innobase::get_row_type() const
/*=============================*/ /*=============================*/
/* out: ROW_TYPE_REDUNDANT or ROW_TYPE_COMPACT */ /* out: one of
ROW_TYPE_REDUNDANT,
ROW_TYPE_COMPACT,
ROW_TYPE_COMPRESSED,
ROW_TYPE_DYNAMIC */
{ {
if (prebuilt && prebuilt->table) { if (prebuilt && prebuilt->table) {
if (dict_table_is_comp(prebuilt->table)) { const ulint flags = prebuilt->table->flags;
if (UNIV_UNLIKELY(!flags)) {
return(ROW_TYPE_REDUNDANT);
}
ut_ad(flags & DICT_TF_COMPACT);
switch (flags & DICT_TF_FORMAT_MASK) {
case DICT_TF_FORMAT_51 << DICT_TF_FORMAT_SHIFT:
return(ROW_TYPE_COMPACT); return(ROW_TYPE_COMPACT);
case DICT_TF_FORMAT_ZIP << DICT_TF_FORMAT_SHIFT:
if (flags & DICT_TF_ZSSIZE_MASK) {
return(ROW_TYPE_COMPRESSED);
} else { } else {
return(ROW_TYPE_REDUNDANT); return(ROW_TYPE_DYNAMIC);
}
#if DICT_TF_FORMAT_ZIP != DICT_TF_FORMAT_MAX
# error "DICT_TF_FORMAT_ZIP != DICT_TF_FORMAT_MAX"
#endif
} }
} }
ut_ad(0); ut_ad(0);
...@@ -5231,6 +5251,8 @@ ha_innobase::create( ...@@ -5231,6 +5251,8 @@ ha_innobase::create(
THD* thd = ha_thd(); THD* thd = ha_thd();
ib_longlong auto_inc_value; ib_longlong auto_inc_value;
ulint flags; ulint flags;
/* Cache the value of innodb_file_format, in case it is
modified by another thread while the table is being created. */
const ulint file_format = srv_file_format; const ulint file_format = srv_file_format;
DBUG_ENTER("ha_innobase::create"); DBUG_ENTER("ha_innobase::create");
...@@ -5287,68 +5309,152 @@ ha_innobase::create( ...@@ -5287,68 +5309,152 @@ ha_innobase::create(
flags = 0; flags = 0;
if (create_info->key_block_size
|| (create_info->used_fields & HA_CREATE_USED_KEY_BLOCK_SIZE)) {
switch (create_info->key_block_size) { switch (create_info->key_block_size) {
case 0:
if (form->s->row_type != ROW_TYPE_REDUNDANT) {
flags |= DICT_TF_COMPACT;
}
goto key_block_size_ok;
case 1: case 1:
flags |= 1 << DICT_TF_ZSSIZE_SHIFT | DICT_TF_COMPACT; flags = 1 << DICT_TF_ZSSIZE_SHIFT
| DICT_TF_COMPACT
| DICT_TF_FORMAT_ZIP
<< DICT_TF_FORMAT_SHIFT;
break; break;
case 2: case 2:
flags |= 2 << DICT_TF_ZSSIZE_SHIFT | DICT_TF_COMPACT; flags = 2 << DICT_TF_ZSSIZE_SHIFT
| DICT_TF_COMPACT
| DICT_TF_FORMAT_ZIP
<< DICT_TF_FORMAT_SHIFT;
break; break;
case 4: case 4:
flags |= 3 << DICT_TF_ZSSIZE_SHIFT | DICT_TF_COMPACT; flags = 3 << DICT_TF_ZSSIZE_SHIFT
| DICT_TF_COMPACT
| DICT_TF_FORMAT_ZIP
<< DICT_TF_FORMAT_SHIFT;
break; break;
case 8: case 8:
flags |= 4 << DICT_TF_ZSSIZE_SHIFT | DICT_TF_COMPACT; flags = 4 << DICT_TF_ZSSIZE_SHIFT
| DICT_TF_COMPACT
| DICT_TF_FORMAT_ZIP
<< DICT_TF_FORMAT_SHIFT;
break; break;
case 16: case 16:
flags |= 5 << DICT_TF_ZSSIZE_SHIFT | DICT_TF_COMPACT; flags = 5 << DICT_TF_ZSSIZE_SHIFT
| DICT_TF_COMPACT
| DICT_TF_FORMAT_ZIP
<< DICT_TF_FORMAT_SHIFT;
break; break;
#if DICT_TF_ZSSIZE_MAX != 5 #if DICT_TF_ZSSIZE_MAX != 5
# error "DICT_TF_ZSSIZE_MAX != 5" # error "DICT_TF_ZSSIZE_MAX != 5"
#endif #endif
key_block_size_wrong:
default:
if (create_info->used_fields & HA_CREATE_USED_KEY_BLOCK_SIZE) {
my_error(ER_ILLEGAL_HA_CREATE_OPTION, MYF(0),
innobase_hton_name, "KEY_BLOCK_SIZE");
error = -1;
goto cleanup;
} else {
sql_print_warning("InnoDB: ignoring"
" KEY_BLOCK_SIZE=%lu\n",
create_info->key_block_size);
flags &= ~DICT_TF_ZSSIZE_MASK;
goto key_block_size_ok;
}
} }
if (!srv_file_per_table || file_format < DICT_TF_FORMAT_ZIP) { if (!srv_file_per_table) {
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_ILLEGAL_HA_CREATE_OPTION,
"InnoDB: KEY_BLOCK_SIZE"
" requires innodb_file_per_table.");
flags = 0;
}
goto key_block_size_wrong; if (file_format < DICT_TF_FORMAT_ZIP) {
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_ILLEGAL_HA_CREATE_OPTION,
"InnoDB: KEY_BLOCK_SIZE"
" requires innodb_file_format>0.");
flags = 0;
} }
key_block_size_ok: if (!flags) {
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_ILLEGAL_HA_CREATE_OPTION,
"InnoDB: ignoring"
" KEY_BLOCK_SIZE=%lu.",
create_info->key_block_size);
}
}
if (UNIV_EXPECT(flags & DICT_TF_COMPACT, DICT_TF_COMPACT)) { if (create_info->used_fields & HA_CREATE_USED_ROW_FORMAT) {
/* New formats are only available if ROW_FORMAT=COMPACT. */ if (flags) {
flags |= file_format << DICT_TF_FORMAT_SHIFT; /* KEY_BLOCK_SIZE was specified. */
if (form->s->row_type != ROW_TYPE_COMPRESSED) {
/* ROW_FORMAT other than COMPRESSED
ignores KEY_BLOCK_SIZE. It does not
make sense to reject conflicting
KEY_BLOCK_SIZE and ROW_FORMAT, because
such combinations can be obtained
with ALTER TABLE anyway. */
push_warning_printf(
thd,
MYSQL_ERROR::WARN_LEVEL_WARN,
ER_ILLEGAL_HA_CREATE_OPTION,
"InnoDB: ignoring KEY_BLOCK_SIZE=%lu"
" unless ROW_FORMAT=COMPRESSED.",
create_info->key_block_size);
flags = 0;
}
} else {
/* No KEY_BLOCK_SIZE */
if (form->s->row_type == ROW_TYPE_COMPRESSED) {
/* ROW_FORMAT=COMPRESSED without
KEY_BLOCK_SIZE implies
KEY_BLOCK_SIZE=8. */
flags = 4 << DICT_TF_ZSSIZE_SHIFT
| DICT_TF_COMPACT
| DICT_TF_FORMAT_ZIP
<< DICT_TF_FORMAT_SHIFT;
}
} }
if ((create_info->used_fields & HA_CREATE_USED_ROW_FORMAT) switch (form->s->row_type) {
&& form->s->row_type != ((flags & DICT_TF_COMPACT) const char* row_format_name;
? ROW_TYPE_COMPACT case ROW_TYPE_REDUNDANT:
: ROW_TYPE_REDUNDANT)) { break;
case ROW_TYPE_COMPRESSED:
case ROW_TYPE_DYNAMIC:
row_format_name
= form->s->row_type == ROW_TYPE_COMPRESSED
? "COMPRESSED"
: "DYNAMIC";
if (!srv_file_per_table) {
push_warning_printf(
thd,
MYSQL_ERROR::WARN_LEVEL_WARN,
ER_ILLEGAL_HA_CREATE_OPTION,
"InnoDB: ROW_FORMAT=%s"
" requires innodb_file_per_table.",
row_format_name);
} else if (file_format < DICT_TF_FORMAT_ZIP) {
push_warning_printf(
thd,
MYSQL_ERROR::WARN_LEVEL_WARN,
ER_ILLEGAL_HA_CREATE_OPTION,
"InnoDB: ROW_FORMAT=%s"
" requires innodb_file_format>0.",
row_format_name);
} else {
flags |= DICT_TF_COMPACT
| (DICT_TF_FORMAT_ZIP
<< DICT_TF_FORMAT_SHIFT);
break;
}
my_error(ER_ILLEGAL_HA_CREATE_OPTION, MYF(0), /* fall through */
innobase_hton_name, "ROW_FORMAT"); case ROW_TYPE_NOT_USED:
error = -1; case ROW_TYPE_FIXED:
goto cleanup; default:
push_warning(thd,
MYSQL_ERROR::WARN_LEVEL_WARN,
ER_ILLEGAL_HA_CREATE_OPTION,
"InnoDB: assuming ROW_FORMAT=COMPACT.");
case ROW_TYPE_DEFAULT:
case ROW_TYPE_COMPACT:
flags = DICT_TF_COMPACT;
break;
}
} else if (!flags) {
/* No KEY_BLOCK_SIZE or ROW_FORMAT specified:
use ROW_FORMAT=COMPACT by default. */
flags = DICT_TF_COMPACT;
} }
error = create_table_def(trx, form, norm_name, error = create_table_def(trx, form, norm_name,
...@@ -8313,12 +8419,17 @@ ha_innobase::check_if_incompatible_data( ...@@ -8313,12 +8419,17 @@ ha_innobase::check_if_incompatible_data(
} }
/* Check that row format didn't change */ /* Check that row format didn't change */
if ((info->used_fields & HA_CREATE_USED_AUTO) && if ((info->used_fields & HA_CREATE_USED_ROW_FORMAT) &&
get_row_type() != info->row_type) { get_row_type() != info->row_type) {
return(COMPATIBLE_DATA_NO); return(COMPATIBLE_DATA_NO);
} }
/* Specifying KEY_BLOCK_SIZE requests a rebuild of the table. */
if (info->used_fields & HA_CREATE_USED_KEY_BLOCK_SIZE) {
return(COMPATIBLE_DATA_NO);
}
return(COMPATIBLE_DATA_YES); return(COMPATIBLE_DATA_YES);
} }
......
set global innodb_file_per_table=off; set global innodb_file_per_table=off;
set global innodb_file_format=0; set global innodb_file_format=0;
create table t1(a int primary key) engine=innodb row_format=dynamic; create table t1(a int primary key) engine=innodb row_format=dynamic;
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT' Warnings:
create table t1(a int primary key) engine=innodb row_format=redundant; Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
show create table t1; Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
Table Create Table create table t2(a int primary key) engine=innodb row_format=redundant;
t1 CREATE TABLE `t1` ( create table t3(a int primary key) engine=innodb row_format=compact;
`a` int(11) NOT NULL, create table t4(a int primary key) engine=innodb key_block_size=9;
PRIMARY KEY (`a`) Warnings:
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
drop table t1; Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format>0.
create table t1(a int primary key) engine=innodb row_format=compact; Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=9.
show create table t1; create table t5(a int primary key) engine=innodb
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
drop table t1;
create table t1(a int primary key) engine=innodb key_block_size=9;
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
create table t1(a int primary key) engine=innodb
key_block_size=1 row_format=redundant; key_block_size=1 row_format=redundant;
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE' Warnings:
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format>0.
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1.
set global innodb_file_per_table=on; set global innodb_file_per_table=on;
create table t1(a int primary key) engine=innodb create table t6(a int primary key) engine=innodb
key_block_size=1 row_format=redundant; key_block_size=1 row_format=redundant;
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE' Warnings:
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format>0.
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1.
set global innodb_file_format=1; set global innodb_file_format=1;
create table t1(a int primary key) engine=innodb create table t7(a int primary key) engine=innodb
key_block_size=1 row_format=redundant; key_block_size=1 row_format=redundant;
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT' Warnings:
create table t1(a int primary key) engine=innodb Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
create table t8(a int primary key) engine=innodb
key_block_size=1 row_format=fixed;
Warnings:
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
create table t9(a int primary key) engine=innodb
key_block_size=1 row_format=compact; key_block_size=1 row_format=compact;
show create table t1; Warnings:
Table Create Table Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
t1 CREATE TABLE `t1` ( create table t10(a int primary key) engine=innodb
`a` int(11) NOT NULL, key_block_size=1 row_format=dynamic;
PRIMARY KEY (`a`) Warnings:
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1 Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
drop table t1; create table t11(a int primary key) engine=innodb
create table t1(a int primary key) engine=innodb key_block_size=1 row_format=compressed;
create table t12(a int primary key) engine=innodb
key_block_size=1; key_block_size=1;
show create table t1; create table t13(a int primary key) engine=innodb
Table Create Table row_format=compressed;
t1 CREATE TABLE `t1` ( create table t14(a int primary key) engine=innodb key_block_size=9;
`a` int(11) NOT NULL, Warnings:
PRIMARY KEY (`a`) Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=9.
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1 SELECT table_schema, table_name, row_format
FROM information_schema.tables WHERE engine='innodb';
table_schema table_name row_format
test t1 Compact
test t10 Dynamic
test t11 Compressed
test t12 Compressed
test t13 Compressed
test t14 Compact
test t2 Redundant
test t3 Compact
test t4 Compact
test t5 Redundant
test t6 Redundant
test t7 Redundant
test t8 Compact
test t9 Compact
drop table t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14;
alter table t1 key_block_size=0;
Warnings:
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=0.
alter table t1 row_format=dynamic;
SELECT table_schema, table_name, row_format
FROM information_schema.tables WHERE engine='innodb';
table_schema table_name row_format
test t1 Dynamic
alter table t1 row_format=compact;
SELECT table_schema, table_name, row_format
FROM information_schema.tables WHERE engine='innodb';
table_schema table_name row_format
test t1 Compact
alter table t1 row_format=redundant;
SELECT table_schema, table_name, row_format
FROM information_schema.tables WHERE engine='innodb';
table_schema table_name row_format
test t1 Redundant
drop table t1; drop table t1;
create table t1(a int not null, b text, index(b(10))) engine=innodb create table t1(a int not null, b text, index(b(10))) engine=innodb
key_block_size=1; key_block_size=1;
...@@ -64,7 +102,11 @@ rollback; ...@@ -64,7 +102,11 @@ rollback;
select a,left(b,40) from t1 natural join t2; select a,left(b,40) from t1 natural join t2;
a left(b,40) a left(b,40)
1 1abcdefghijklmnopqrstuvwxyzAAAAAAAAAAAAA 1 1abcdefghijklmnopqrstuvwxyzAAAAAAAAAAAAA
drop table t1; SELECT table_schema, table_name, row_format
drop table t2; FROM information_schema.tables WHERE engine='innodb';
table_schema table_name row_format
test t1 Compressed
test t2 Compact
drop table t1,t2;
set global innodb_file_per_table=0; set global innodb_file_per_table=0;
set global innodb_file_format=0; set global innodb_file_format=0;
...@@ -4,37 +4,48 @@ let $per_table=`select @@innodb_file_per_table`; ...@@ -4,37 +4,48 @@ let $per_table=`select @@innodb_file_per_table`;
let $format=`select @@innodb_file_format`; let $format=`select @@innodb_file_format`;
set global innodb_file_per_table=off; set global innodb_file_per_table=off;
set global innodb_file_format=0; set global innodb_file_format=0;
--error 1478
create table t1(a int primary key) engine=innodb row_format=dynamic;
create table t1(a int primary key) engine=innodb row_format=redundant;
show create table t1;
drop table t1;
create table t1(a int primary key) engine=innodb row_format=compact;
show create table t1;
drop table t1;
--error 1478
create table t1(a int primary key) engine=innodb key_block_size=9;
--error 1478 create table t1(a int primary key) engine=innodb row_format=dynamic;
create table t1(a int primary key) engine=innodb create table t2(a int primary key) engine=innodb row_format=redundant;
create table t3(a int primary key) engine=innodb row_format=compact;
create table t4(a int primary key) engine=innodb key_block_size=9;
create table t5(a int primary key) engine=innodb
key_block_size=1 row_format=redundant; key_block_size=1 row_format=redundant;
set global innodb_file_per_table=on; set global innodb_file_per_table=on;
--error 1478 create table t6(a int primary key) engine=innodb
create table t1(a int primary key) engine=innodb
key_block_size=1 row_format=redundant; key_block_size=1 row_format=redundant;
set global innodb_file_format=1; set global innodb_file_format=1;
--error 1478 create table t7(a int primary key) engine=innodb
create table t1(a int primary key) engine=innodb
key_block_size=1 row_format=redundant; key_block_size=1 row_format=redundant;
create table t8(a int primary key) engine=innodb
create table t1(a int primary key) engine=innodb key_block_size=1 row_format=fixed;
create table t9(a int primary key) engine=innodb
key_block_size=1 row_format=compact; key_block_size=1 row_format=compact;
show create table t1; create table t10(a int primary key) engine=innodb
drop table t1; key_block_size=1 row_format=dynamic;
create table t11(a int primary key) engine=innodb
create table t1(a int primary key) engine=innodb key_block_size=1 row_format=compressed;
create table t12(a int primary key) engine=innodb
key_block_size=1; key_block_size=1;
show create table t1; create table t13(a int primary key) engine=innodb
row_format=compressed;
create table t14(a int primary key) engine=innodb key_block_size=9;
SELECT table_schema, table_name, row_format
FROM information_schema.tables WHERE engine='innodb';
drop table t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14;
alter table t1 key_block_size=0;
alter table t1 row_format=dynamic;
SELECT table_schema, table_name, row_format
FROM information_schema.tables WHERE engine='innodb';
alter table t1 row_format=compact;
SELECT table_schema, table_name, row_format
FROM information_schema.tables WHERE engine='innodb';
alter table t1 row_format=redundant;
SELECT table_schema, table_name, row_format
FROM information_schema.tables WHERE engine='innodb';
drop table t1; drop table t1;
create table t1(a int not null, b text, index(b(10))) engine=innodb create table t1(a int not null, b text, index(b(10))) engine=innodb
...@@ -66,7 +77,9 @@ connection default; ...@@ -66,7 +77,9 @@ connection default;
disconnect a; disconnect a;
disconnect b; disconnect b;
drop table t1; SELECT table_schema, table_name, row_format
drop table t2; FROM information_schema.tables WHERE engine='innodb';
drop table t1,t2;
eval set global innodb_file_per_table=$per_table; eval set global innodb_file_per_table=$per_table;
eval set global innodb_file_format=$format; eval set global innodb_file_format=$format;
...@@ -2371,6 +2371,8 @@ t1 CREATE TABLE `t1` ( ...@@ -2371,6 +2371,8 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1; drop table t1;
create table t1 (v varchar(10), c char(10)) row_format=fixed; create table t1 (v varchar(10), c char(10)) row_format=fixed;
Warnings:
Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment