- fix for segfault in rpl_trigger/rpl_found_rows with default engine=maria
(fix is keeping the real TRN through a disable_logging/reenable cycle)
- fix for pagecache assertion failure in ps/type_ranges with default
engine=maria (fix is in sql_insert.cc)
- when reenabling logging we must either flush all dirty pages,
or at least verify (in debug build) that there are none. For example
a bulk insert with single UNDO_BULK_INSERT must flush them, no matter
if it uses repair or not (bugfix)
- UNDO_BULK_INSERT_WITH_REPAIR is also used with repair, changes name
mysql-test/r/maria.result:
tests for bugs fixed
mysql-test/t/maria.test:
tests for bugs fixed
sql/sql_insert.cc:
Bugfix: even if select_create::prepare() failed to create the 'table' object
we still have to re-enable logging.
storage/maria/ha_maria.cc:
Bugfix: when a transactional table does a bulk insert without
repair, it still sometimes skips logging of REDOs thus needs a full
flush and sync at the end. Not if repair is done, as repair does
it internally already (see end of maria_repair*()).
storage/maria/ha_maria.h:
variable now can have 3 states not 2
storage/maria/ma_bitmap.c:
name change
storage/maria/ma_blockrec.c:
name change
storage/maria/ma_blockrec.h:
name change
storage/maria/ma_check.c:
* When maria_repair() re-enables logging it does not need to ask for
a flush&sync as it did it by itself already a few lines before.
* the log record of bulk insert can be used even without repair
* disable logging in maria_zerofill(): without that, it puts LSN pages
in the cache, so when it flushes them it flushes the log; the change
makes auto-ha_maria::zerofill-if-moved faster (no log flush).
storage/maria/ma_key_recover.c:
name change
storage/maria/ma_loghandler.c:
name change
storage/maria/ma_loghandler.h:
name change
storage/maria/ma_pagecache.c:
A function, to check in debug builds that no dirty pages exist for a file.
storage/maria/ma_pagecache.h:
new function (nothing in non-debug)
storage/maria/ma_recovery.c:
_ma_tmp_disable_logging() sets info->trn to dummy_transaction_object
when needed now. The changes done here about info->trn are to allow
a table to retain its original, real TRN through a disable/reenable
cycle (see replication scenario in _ma_reenable_logging_for_table()).
When we reenable, we offer the caller to flush and sync the table;
if the caller doesn't accept our offer, we verify that it's ok
(no REDOs => no dirty pages are allowed to exist).
storage/maria/maria_chk.c:
comment
storage/maria/maria_def.h:
new names
mysql-test/suite/rpl/r/rpl_stm_maria.result:
result (it used to crash)
mysql-test/suite/rpl/t/rpl_stm_maria.test:
Test of replication-specific Maria bug fixed
2008-01-20 05:25:26 +01:00
|
|
|
stop slave;
|
|
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
|
|
reset master;
|
|
|
|
reset slave;
|
|
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
|
|
start slave;
|
2010-03-04 09:03:07 +01:00
|
|
|
CALL mtr.add_suppression('Statement may not be safe to log in statement format.');
|
- fix for segfault in rpl_trigger/rpl_found_rows with default engine=maria
(fix is keeping the real TRN through a disable_logging/reenable cycle)
- fix for pagecache assertion failure in ps/type_ranges with default
engine=maria (fix is in sql_insert.cc)
- when reenabling logging we must either flush all dirty pages,
or at least verify (in debug build) that there are none. For example
a bulk insert with single UNDO_BULK_INSERT must flush them, no matter
if it uses repair or not (bugfix)
- UNDO_BULK_INSERT_WITH_REPAIR is also used with repair, changes name
mysql-test/r/maria.result:
tests for bugs fixed
mysql-test/t/maria.test:
tests for bugs fixed
sql/sql_insert.cc:
Bugfix: even if select_create::prepare() failed to create the 'table' object
we still have to re-enable logging.
storage/maria/ha_maria.cc:
Bugfix: when a transactional table does a bulk insert without
repair, it still sometimes skips logging of REDOs thus needs a full
flush and sync at the end. Not if repair is done, as repair does
it internally already (see end of maria_repair*()).
storage/maria/ha_maria.h:
variable now can have 3 states not 2
storage/maria/ma_bitmap.c:
name change
storage/maria/ma_blockrec.c:
name change
storage/maria/ma_blockrec.h:
name change
storage/maria/ma_check.c:
* When maria_repair() re-enables logging it does not need to ask for
a flush&sync as it did it by itself already a few lines before.
* the log record of bulk insert can be used even without repair
* disable logging in maria_zerofill(): without that, it puts LSN pages
in the cache, so when it flushes them it flushes the log; the change
makes auto-ha_maria::zerofill-if-moved faster (no log flush).
storage/maria/ma_key_recover.c:
name change
storage/maria/ma_loghandler.c:
name change
storage/maria/ma_loghandler.h:
name change
storage/maria/ma_pagecache.c:
A function, to check in debug builds that no dirty pages exist for a file.
storage/maria/ma_pagecache.h:
new function (nothing in non-debug)
storage/maria/ma_recovery.c:
_ma_tmp_disable_logging() sets info->trn to dummy_transaction_object
when needed now. The changes done here about info->trn are to allow
a table to retain its original, real TRN through a disable/reenable
cycle (see replication scenario in _ma_reenable_logging_for_table()).
When we reenable, we offer the caller to flush and sync the table;
if the caller doesn't accept our offer, we verify that it's ok
(no REDOs => no dirty pages are allowed to exist).
storage/maria/maria_chk.c:
comment
storage/maria/maria_def.h:
new names
mysql-test/suite/rpl/r/rpl_stm_maria.result:
result (it used to crash)
mysql-test/suite/rpl/t/rpl_stm_maria.test:
Test of replication-specific Maria bug fixed
2008-01-20 05:25:26 +01:00
|
|
|
DROP TABLE IF EXISTS t1;
|
|
|
|
DROP TABLE IF EXISTS t2;
|
|
|
|
DROP TABLE IF EXISTS t3;
|
|
|
|
create table t1 (a int auto_increment, primary key (a), b int,
|
|
|
|
rand_value double not null) engine=maria;
|
|
|
|
create table t2 (a int auto_increment, primary key (a), b int) engine=maria;
|
|
|
|
create table t3 (a int auto_increment, primary key (a), name
|
|
|
|
varchar(64) not null, old_a int, old_b int, rand_value double not
|
|
|
|
null) engine=maria;
|
|
|
|
create trigger t1 before insert on t1 for each row
|
|
|
|
begin
|
|
|
|
insert into t3 values (NULL, "t1", new.a, new.b, rand());
|
|
|
|
end|
|
|
|
|
create trigger t2 after insert on t2 for each row
|
|
|
|
begin
|
|
|
|
insert into t3 values (NULL, "t2", new.a, new.b, rand());
|
|
|
|
end|
|
|
|
|
insert into t3 values(100,"log",0,0,0);
|
|
|
|
SET @@RAND_SEED1=658490765, @@RAND_SEED2=635893186;
|
|
|
|
insert into t1 values(1,1,rand()),(NULL,2,rand());
|
|
|
|
insert into t2 (b) values(last_insert_id());
|
|
|
|
insert into t2 values(3,0),(NULL,0);
|
|
|
|
insert into t2 values(NULL,0),(500,0);
|
|
|
|
select a,b, truncate(rand_value,4) from t1;
|
|
|
|
a b truncate(rand_value,4)
|
|
|
|
1 1 0.4320
|
|
|
|
2 2 0.3055
|
|
|
|
select * from t2;
|
|
|
|
a b
|
|
|
|
1 2
|
|
|
|
3 0
|
|
|
|
4 0
|
|
|
|
5 0
|
|
|
|
500 0
|
|
|
|
select a,name, old_a, old_b, truncate(rand_value,4) from t3;
|
|
|
|
a name old_a old_b truncate(rand_value,4)
|
|
|
|
100 log 0 0 0.0000
|
|
|
|
101 t1 1 1 0.3203
|
|
|
|
102 t1 0 2 0.5666
|
|
|
|
103 t2 1 2 0.9164
|
|
|
|
104 t2 3 0 0.8826
|
|
|
|
105 t2 4 0 0.6635
|
|
|
|
106 t2 5 0 0.6699
|
|
|
|
107 t2 500 0 0.3593
|
|
|
|
drop table t1,t2,t3;
|