mariadb/mysql-test/suite/innodb/r/undo_truncate.result
Marko Mäkelä 53c6c823dc MDEV-33464 Crash when innodb_max_undo_log_size is set to innodb_page_size*4294967296
purge_sys_t::truncating_tablespace(): Clamp the
innodb_max_undo_log_size to the maximum number of pages
before converting the result into a 32-bit unsigned integer.

This fixes up commit f8c88d905b (MDEV-33213).

In later major versions, we would use 32-bit unsigned integer here
due to commit ca501ffb04
and the code would crash also on 64-bit processors.

Reviewed by: Debarun Banerjee
2024-02-15 12:34:04 +02:00

41 lines
1.3 KiB
Text

SET GLOBAL innodb_undo_log_truncate = 0;
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
Space_Name Page_Size Zip_Size Path
innodb_undo001 DEFAULT DEFAULT MYSQLD_DATADIR//undo001
innodb_undo002 DEFAULT DEFAULT MYSQLD_DATADIR//undo002
innodb_temporary DEFAULT DEFAULT MYSQLD_DATADIR/ibtmp1
create table t1(keyc int primary key, c char(100)) engine = innodb;
create table t2(keyc int primary key, c char(100)) engine = innodb;
connect con1,localhost,root,,;
begin;
insert into t1 select seq,'a' from seq_1_to_20000;
connect con2,localhost,root,,;
begin;
insert into t2 select seq,'a' from seq_1_to_20000;
connection con1;
update t1 set c = 'mysql';
connection con2;
update t2 set c = 'mysql';
connection con1;
update t1 set c = 'oracle';
connection con2;
update t2 set c = 'oracle';
connection con1;
delete from t1;
connection con2;
delete from t2;
connection con1;
SET GLOBAL innodb_max_undo_log_size = @@GLOBAL.innodb_page_size * 4294967296;
SET GLOBAL innodb_undo_log_truncate = 1;
commit;
disconnect con1;
connection con2;
commit;
disconnect con2;
connection default;
SET GLOBAL innodb_max_purge_lag_wait=0;
SET GLOBAL innodb_max_undo_log_size=DEFAULT;
SET GLOBAL innodb_max_purge_lag_wait=0;
set global innodb_fast_shutdown=0;
# restart
drop table t1, t2;