mirror of
https://github.com/MariaDB/server.git
synced 2025-02-13 17:05:35 +01:00
![Marko Mäkelä](/assets/img/avatar_default.png)
Simplify the tests that are present in MySQL 5.7. Make the table smaller while generating enough undo log. Do not unnecessarily drop tables. trx_purge_initiate_truncate(): Remove two crash injection points (before and after normal redo log checkpoint), because they are not adding any value. Clarify some messages. trx_sys_create_rsegs(): Display the number of active undo tablespaces. srv_undo_tablespaces_init(): When initializing the data files, do not leave srv_undo_tablespaces_active at 0. Do not display that number; let trx_sys_create_rsegs() display it once the final number is known. innodb_params_adjust(): Adjust parameters after startup. innobase_init(): Do not allow innodb_max_undo_size to be less than SRV_UNDO_TABLESPACE_SIZE_IN_PAGES. This avoids unnecessary repeated truncation of undo tablespaces when using innodb_page_size=32k or innodb_page_size=64k.
51 lines
1.2 KiB
Text
51 lines
1.2 KiB
Text
SET GLOBAL innodb_fast_shutdown=0;
|
|
create table t1(keyc int primary key, c char(100)) engine = innodb;
|
|
create table t2(keyc int primary key, c char(100)) engine = innodb;
|
|
CREATE PROCEDURE populate_t1()
|
|
BEGIN
|
|
DECLARE i INT DEFAULT 1;
|
|
while (i <= 20000) DO
|
|
insert into t1 values (i, 'a');
|
|
SET i = i + 1;
|
|
END WHILE;
|
|
END |
|
|
CREATE PROCEDURE populate_t2()
|
|
BEGIN
|
|
DECLARE i INT DEFAULT 1;
|
|
while (i <= 20000) DO
|
|
insert into t2 values (i, 'a');
|
|
SET i = i + 1;
|
|
END WHILE;
|
|
END |
|
|
connect con1,localhost,root,,;
|
|
begin;
|
|
call populate_t1();
|
|
connect con2,localhost,root,,;
|
|
begin;
|
|
call populate_t2();
|
|
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;
|
|
commit;
|
|
disconnect con1;
|
|
connection con2;
|
|
commit;
|
|
disconnect con2;
|
|
connection default;
|
|
drop table t1, t2;
|
|
drop PROCEDURE populate_t1;
|
|
drop PROCEDURE populate_t2;
|
|
SET GLOBAL innodb_fast_shutdown=0;
|
|
SET GLOBAL innodb_undo_log_truncate=1;
|
|
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
|
|
FOUND 1 /Truncating UNDO tablespace 1/ in mysqld.1.err
|