Debian Codegraph @

mysql-test/suite/maria/bulk_insert_crash.test

raw
1 --source include/not_embedded.inc
2 --source include/not_valgrind.inc
3 # Avoid CrashReporter popup on Mac
4 --source include/not_crashrep.inc
5 # Binary must be compiled with debug for crash to occur
6 --source include/have_debug.inc
7 --source include/have_sequence.inc
8
9 #
10 # MDEV-20578 Got error 126 when executing undo undo_key_delete upon Aria crash
11 # recovery
12 #
13
14 # Write file to make mysql-test-run.pl expect crash and restart
15 --write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
16
17 create table t1 (a int primary key, b int, c int, unique key(b), key(c)) engine=aria transactional=1;
18 insert into t1 values (1000,1000,1000);
19 insert into t1 select seq,seq+100, seq+200 from seq_1_to_10;
20
21 select sum(a),sum(b),sum(c) from t1;
22
23 # Insert into t1 with batch insert where we get a rows replaced after
24 # a few sucessful inserts
25
26 SET GLOBAL debug_dbug="+d,crash_end_bulk_insert";
27
28 --error 2013
29 REPLACE into t1 select seq+20,seq+95, seq + 300 from seq_1_to_10;
30
31 # Wait until restarted
32 --enable_reconnect
33 --source include/wait_until_connected_again.inc
34 --disable_reconnect
35
36 check table t1;
37 select sum(a),sum(b),sum(c) from t1;
38 drop table t1;