Browse Source

#172 simplify test case for -30994 leak

pull/73/head
Rich Prohaska 12 years ago
parent
commit
8e26447aa3
  1. 496800
      mysql-test/std_data/leak172_t2.data
  2. 3
      mysql-test/suite/tokudb.bugs/r/leak172.result
  3. 10
      mysql-test/suite/tokudb.bugs/t/leak172.test
  4. 6
      storage/tokudb/ha_tokudb.cc

496800
mysql-test/std_data/leak172_t2.data
File diff suppressed because it is too large
View File

3
mysql-test/suite/tokudb.bugs/r/leak172.result

@ -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;

10
mysql-test/suite/tokudb.bugs/t/leak172.test

@ -1,4 +1,8 @@
# 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';

6
storage/tokudb/ha_tokudb.cc

@ -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) {

Loading…
Cancel
Save