Commit 8e26447a authored by Rich Prohaska's avatar Rich Prohaska

#172 simplify test case for -30994 leak

parent 47e6cc1f
This diff is collapsed.
......@@ -117,7 +117,8 @@ KEY `c27` (`c27`(255)),
KEY `c31` (`c31`)
);
LOAD DATA INFILE 'leak172_t1.data' INTO TABLE `t1` fields terminated by ',';
LOAD DATA INFILE 'leak172_t2.data' INTO TABLE `t2`;
set session debug="+d,tokudb_end_bulk_insert_sleep";
LOAD DATA INFILE 'leak172_t2.data' INTO TABLE `t2` fields terminated by ',';
UPDATE t1, t2 SET t1.`c5` = 4 WHERE t1.`c6` <= 'o';
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
drop table t1,t2;
# test case simplified from RQG run that forces a lock not granted error on an update with a
# concurrent load into the same table.
source include/have_tokudb.inc;
source include/have_debug.inc;
set default_storage_engine=tokudb;
disable_warnings;
......@@ -130,10 +134,12 @@ CREATE TABLE `t2` (
LOAD DATA INFILE 'leak172_t1.data' INTO TABLE `t1` fields terminated by ',';
connect(conn1,localhost,root,,);
send LOAD DATA INFILE 'leak172_t2.data' INTO TABLE `t2`;
set session debug="+d,tokudb_end_bulk_insert_sleep";
send LOAD DATA INFILE 'leak172_t2.data' INTO TABLE `t2` fields terminated by ',';
connection default;
sleep 1;
let $wait_condition= select count(*)=1 from information_schema.processlist where info like 'LOAD DATA INFILE%' and state like 'DBUG sleep';
source include/wait_condition.inc;
--error 1205
UPDATE t1, t2 SET t1.`c5` = 4 WHERE t1.`c6` <= 'o';
......
......@@ -3303,6 +3303,12 @@ int ha_tokudb::end_bulk_insert(bool abort) {
loader_error = 0;
if (loader) {
if (!abort_loader && !thd->killed) {
DBUG_EXECUTE_IF("tokudb_end_bulk_insert_sleep", {
const char *old_proc_info= thd->proc_info;
thd->proc_info= "DBUG sleep";
my_sleep(20000000);
thd->proc_info= old_proc_info;
});
error = loader->close(loader);
loader = NULL;
if (error) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment