mariadb/mysql-test/innodb-zip.result
marko 6523ce6fd8 branches/zip: When storing a longer prefix of an externally stored column
to the undo log, also store the original length of the column, so that the
changes will be correctly undone in transaction rollback or when fetching
previous versions of the row.

innodb-zip.test: New file, for tests of the compression.

upd_field_t: Add orig_len, the original length of new_val.

btr_push_update_extern_fields(): Restore the original prefix of the column.
Add the parameter heap where memory will be allocated if necessary.

trx_undo_rec_get_col_val(): Add the output parameter orig_len.

trx_undo_page_report_modify_ext(): New function: Write an externally
stored column to the undo log.  This is only called from
trx_undo_page_report_modify(), and this is the only caller of
trx_undo_page_fetch_ext().

trx_undo_update_rec_get_update(): Read the original length of the column
prefix to upd_field->orig_len.
2008-01-23 13:46:45 +00:00

14 lines
328 B
Text

create table t1(a int not null, b text, index(b(10))) engine=innodb
key_block_size=1;
insert into t1 values (1,1);
commit;
begin;
update t1 set b=repeat('B',100);
select a,left(b,40),b=1 is_equal from t1;
a left(b,40) is_equal
1 1 1
rollback;
select a,left(b,40),b=1 is_equal from t1;
a left(b,40) is_equal
1 1 1
drop table t1;