mariadb/mysql-test/innodb-zip.test
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

72 lines
1.8 KiB
Text

-- source include/have_innodb.inc
let $per_table=`select @@innodb_file_per_table`;
let $format=`select @@innodb_file_format`;
set global innodb_file_per_table=off;
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
key_block_size=1 row_format=redundant;
set global innodb_file_per_table=on;
--error 1478
create table t1(a int primary key) engine=innodb
key_block_size=1 row_format=redundant;
set global innodb_file_format=1;
--error 1478
create table t1(a int primary key) engine=innodb
key_block_size=1 row_format=redundant;
create table t1(a int primary key) engine=innodb
key_block_size=1 row_format=compact;
show create table t1;
drop table t1;
create table t1(a int primary key) engine=innodb
key_block_size=1;
show create table t1;
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;
connect (a,localhost,root,,);
connect (b,localhost,root,,);
connection a;
begin;
update t1 set b=repeat('B',100);
connection b;
select a,left(b,40) from t1 natural join t2;
connection a;
rollback;
connection b;
select a,left(b,40) from t1 natural join t2;
connection default;
disconnect a;
disconnect b;
drop table t1;
drop table t2;
eval set global innodb_file_per_table=$per_table;
eval set global innodb_file_format=$format;