Fixed maximum file size change. Now it flush buffer after
switching to new one which prevent deadlock. mysql-test/r/maria-purge.result: Fixed test which use setting maria_checkpoint_interval to force checkpoint now. mysql-test/t/maria-purge.test: Fixed test which use setting maria_checkpoint_interval to force checkpoint now.
This commit is contained in:
parent
ebafe3e4db
commit
77e08a745b
@ -9,8 +9,6 @@ STRING_DATA char(255) default NULL
|
||||
CREATE TABLE t2 (
|
||||
STRING_DATA char(255) default NULL
|
||||
);
|
||||
set global maria_log_file_size=16777216;
|
||||
set global maria_checkpoint_interval=30;
|
||||
INSERT INTO t1 VALUES ('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA');
|
||||
INSERT INTO t1 VALUES ('DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD');
|
||||
insert into t2 select * from t1;
|
||||
@ -35,12 +33,17 @@ insert into t2 select * from t1;
|
||||
insert into t1 select * from t2;
|
||||
insert into t2 select * from t1;
|
||||
insert into t1 select * from t2;
|
||||
set global maria_log_file_size=16777216;
|
||||
set global maria_checkpoint_interval=30;
|
||||
SHOW ENGINE maria logs;
|
||||
Type Name Status
|
||||
maria master-data/maria_log.00000002 in use
|
||||
insert into t2 select * from t1;
|
||||
insert into t1 select * from t2;
|
||||
set global maria_checkpoint_interval=30;
|
||||
SHOW ENGINE maria logs;
|
||||
Type Name Status
|
||||
maria master-data/maria_log.00000005 in use
|
||||
maria master-data/maria_log.00000004 in use
|
||||
set global maria_log_file_size=16777216;
|
||||
select @@global.maria_log_file_size;
|
||||
@@global.maria_log_file_size
|
||||
@ -48,7 +51,7 @@ select @@global.maria_log_file_size;
|
||||
set global maria_checkpoint_interval=30;
|
||||
SHOW ENGINE maria logs;
|
||||
Type Name Status
|
||||
maria master-data/maria_log.00000005 in use
|
||||
maria master-data/maria_log.00000004 in use
|
||||
set global maria_log_file_size=8388608;
|
||||
select @@global.maria_log_file_size;
|
||||
@@global.maria_log_file_size
|
||||
@ -58,6 +61,7 @@ insert into t1 select * from t2;
|
||||
set global maria_checkpoint_interval=30;
|
||||
SHOW ENGINE maria logs;
|
||||
Type Name Status
|
||||
maria master-data/maria_log.00000004 free
|
||||
maria master-data/maria_log.00000005 free
|
||||
maria master-data/maria_log.00000006 free
|
||||
maria master-data/maria_log.00000007 free
|
||||
|
@ -20,8 +20,6 @@ CREATE TABLE t2 (
|
||||
STRING_DATA char(255) default NULL
|
||||
);
|
||||
|
||||
set global maria_log_file_size=16777216;
|
||||
eval set global maria_checkpoint_interval=$def_checkinterval;
|
||||
|
||||
INSERT INTO t1 VALUES ('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA');
|
||||
INSERT INTO t1 VALUES ('DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD');
|
||||
@ -47,6 +45,12 @@ insert into t2 select * from t1;
|
||||
insert into t1 select * from t2;
|
||||
insert into t2 select * from t1;
|
||||
insert into t1 select * from t2;
|
||||
|
||||
set global maria_log_file_size=16777216;
|
||||
eval set global maria_checkpoint_interval=$def_checkinterval;
|
||||
--replace_regex /Size +[0-9]+ ; .+master-data/master-data/
|
||||
SHOW ENGINE maria logs;
|
||||
|
||||
insert into t2 select * from t1;
|
||||
insert into t1 select * from t2;
|
||||
|
||||
|
@ -2113,7 +2113,6 @@ static my_bool translog_buffer_flush(struct st_translog_buffer *buffer)
|
||||
It is possible for single request for flush and destroying the
|
||||
loghandler.
|
||||
*/
|
||||
translog_buffer_unlock(buffer);
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
}
|
||||
@ -7223,6 +7222,7 @@ uint32 translog_get_file_size()
|
||||
|
||||
void translog_set_file_size(uint32 size)
|
||||
{
|
||||
struct st_translog_buffer *old_buffer= NULL;
|
||||
DBUG_ENTER("translog_set_file_size");
|
||||
translog_lock();
|
||||
DBUG_PRINT("enter", ("Size: %lu", (ulong) size));
|
||||
@ -7232,11 +7232,17 @@ void translog_set_file_size(uint32 size)
|
||||
/* if current file longer then finish it*/
|
||||
if (LSN_OFFSET(log_descriptor.horizon) >= log_descriptor.log_file_max_size)
|
||||
{
|
||||
struct st_translog_buffer *old_buffer= log_descriptor.bc.buffer;
|
||||
old_buffer= log_descriptor.bc.buffer;
|
||||
translog_buffer_next(&log_descriptor.horizon, &log_descriptor.bc, 1);
|
||||
translog_buffer_unlock(old_buffer);
|
||||
}
|
||||
translog_unlock();
|
||||
if (old_buffer)
|
||||
{
|
||||
translog_buffer_lock(old_buffer);
|
||||
translog_buffer_flush(old_buffer);
|
||||
translog_buffer_unlock(old_buffer);
|
||||
}
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user