mariadb/mysql-test/innodb-zip.result
marko 633fc05300 branches/zip: Fix a bug in the retrieval of old versions of records containing
externally stored columns.

innodb-zip.test: Correct the test case.  Without the fixes, the test
would fail, because the BLOB would be prepended with a 768-byte prefix
of the data.

row_upd_index_replace_new_col_vals_index_pos(),
row_upd_index_replace_new_col_vals(): Use only one "heap"
parameter that must be non-NULL.  When fetching externally
stored columns, use upd_field_t::orig_len.

upd_get_field_by_field_no(): New accessor function, for retrieving
an field from an update vector by field_no.

row_upd_index_replace_new_col_val(): New function, for replacing the
value from an update vector.  This used to be duplicated code in
row_upd_index_replace_new_col_vals_index_pos() and
row_upd_index_replace_new_col_vals().
2008-03-13 12:49:34 +00:00

70 lines
2.6 KiB
Text

set global innodb_file_per_table=off;
set global innodb_file_format=0;
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'
create table t1(a int primary key) engine=innodb row_format=redundant;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
drop table t1;
create table t1(a int primary key) engine=innodb row_format=compact;
show create table t1;
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;
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
set global innodb_file_per_table=on;
create table t1(a int primary key) engine=innodb
key_block_size=1 row_format=redundant;
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
set global innodb_file_format=1;
create table t1(a int primary key) engine=innodb
key_block_size=1 row_format=redundant;
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
create table t1(a int primary key) engine=innodb
key_block_size=1 row_format=compact;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1
drop table t1;
create table t1(a int primary key) engine=innodb
key_block_size=1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1
drop table t1;
create table t1(a int not null, b text, index(b(10))) engine=innodb
key_block_size=1;
create table t2(b text)engine=innodb;
insert into t2 values(concat('1abcdefghijklmnopqrstuvwxyz', repeat('A',5000)));
insert into t1 select 1, b from t2;
commit;
begin;
update t1 set b=repeat('B',100);
select a,left(b,40) from t1 natural join t2;
a left(b,40)
1 1abcdefghijklmnopqrstuvwxyzAAAAAAAAAAAAA
rollback;
select a,left(b,40) from t1 natural join t2;
a left(b,40)
1 1abcdefghijklmnopqrstuvwxyzAAAAAAAAAAAAA
drop table t1;
drop table t2;
set global innodb_file_per_table=0;
set global innodb_file_format=0;