mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed bug: lp:887051 ; Error in recovery with LOAD DATA + DELETE
mysql-test/suite/maria/r/maria-recovery3.result: Added test case for recovery bug mysql-test/suite/maria/t/maria-recovery3.test: Added test case for recovery bug storage/maria/ha_maria.cc: Don't print query twice to log storage/maria/ma_delete.c: More DBUG_PRINT storage/maria/ma_key_recover.c: Added new asserts to detect errors earlier storage/maria/ma_recovery.c: Update all states when moving a non-transactional file to transactional. This fixes lp:887051
This commit is contained in:
2
mysql-test/std_data/bug887051.txt
Normal file
2
mysql-test/std_data/bug887051.txt
Normal file
@ -0,0 +1,2 @@
|
||||
saved1
|
||||
saved2
|
@ -89,6 +89,28 @@ check table t1 extended;
|
||||
Table Op Msg_type Msg_text
|
||||
mysqltest.t1 check status OK
|
||||
drop table t1;
|
||||
CREATE TABLE t1 ( word VARCHAR(255) PRIMARY KEY ) ENGINE=Aria;
|
||||
LOAD DATA INFILE '../../std_data/bug887051.txt' INTO TABLE t1;
|
||||
SET AUTOCOMMIT=0;
|
||||
DELETE FROM t1;
|
||||
LOAD DATA INFILE '../../std_data/bug887051.txt' INTO TABLE t1 IGNORE 1 LINES;
|
||||
COMMIT;
|
||||
SET SESSION debug="+d,maria_flush_whole_log,maria_crash";
|
||||
* crashing mysqld intentionally
|
||||
set global aria_checkpoint_interval=1;
|
||||
ERROR HY000: Lost connection to MySQL server during query
|
||||
* recovery happens
|
||||
check table t1 extended;
|
||||
Table Op Msg_type Msg_text
|
||||
mysqltest.t1 check status OK
|
||||
* testing that checksum after recovery is as expected
|
||||
Checksum-check
|
||||
failure
|
||||
use mysqltest;
|
||||
select * from t1;
|
||||
word
|
||||
saved2
|
||||
drop table t1;
|
||||
drop database mysqltest_for_feeding_recovery;
|
||||
drop database mysqltest_for_comparison;
|
||||
drop database mysqltest;
|
||||
|
@ -109,6 +109,24 @@ truncate table t1;
|
||||
check table t1 extended;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Test for BUG#887051; Failure in recovery with delete
|
||||
#
|
||||
|
||||
let $mvr_restore_old_snapshot=0;
|
||||
let $mms_compare_physically=0;
|
||||
let $mvr_debug_option="+d,maria_flush_whole_log,maria_crash";
|
||||
let $mvr_crash_statement= set global aria_checkpoint_interval=1;
|
||||
CREATE TABLE t1 ( word VARCHAR(255) PRIMARY KEY ) ENGINE=Aria;
|
||||
LOAD DATA INFILE '../../std_data/bug887051.txt' INTO TABLE t1;
|
||||
SET AUTOCOMMIT=0;
|
||||
DELETE FROM t1;
|
||||
LOAD DATA INFILE '../../std_data/bug887051.txt' INTO TABLE t1 IGNORE 1 LINES;
|
||||
COMMIT;
|
||||
-- source include/maria_verify_recovery.inc
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
# clean up everything
|
||||
let $mms_purpose=feeding_recovery;
|
||||
eval drop database mysqltest_for_$mms_purpose;
|
||||
|
Reference in New Issue
Block a user