summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb_plugin/t
diff options
context:
space:
mode:
authorunknown <kevin.lewis@oracle.com>2011-07-07 16:29:30 -0500
committerunknown <kevin.lewis@oracle.com>2011-07-07 16:29:30 -0500
commit6cc0f6a22bb70fb1473c4fbe4aaea9e5f6732ef6 (patch)
treee0982aa6adf1f90275628b9a1c70384ea92cab89 /mysql-test/suite/innodb_plugin/t
parentc6669b46d6b3bc885e6dc30916314476def75cf9 (diff)
downloadmariadb-git-6cc0f6a22bb70fb1473c4fbe4aaea9e5f6732ef6.tar.gz
Bug#12637786 was fixed with rb:692 by marko. But that fix has a remaining
bug. It added this assert; ut_ad(ind_field->prefix_len); before a section of code that assumes there is a prefix_len. The patch replaced code that explicitly avoided this with a check for prefix_len. It turns out that the purge thread can get to that assert without a prefix_len because it does not use a row_ext_t* . When UNIV_DEBUG is not defined, the affect of this is that the purge thread sets the dfield->len to zero and then cannot find the entry in the index to purge. So secondary index entries remain unpurged. This patch does not do the assert. Instead, it uses 'if (ind_field->prefix_len) {...}' around the section of code that assumes a prefix_len. This is the way the patch I provided to Marko did it. The test case is simply modified to do a sleep(10) in order to give the purge thread a chance to run. Without the code change to row0row.c, this modified testcase will assert if InnoDB was compiled with UNIV_DEBUG. I tried to sleep(5), but it did not always assert.
Diffstat (limited to 'mysql-test/suite/innodb_plugin/t')
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb-index.test3
1 files changed, 3 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb_plugin/t/innodb-index.test b/mysql-test/suite/innodb_plugin/t/innodb-index.test
index 28393553ec2..52f94990b15 100644
--- a/mysql-test/suite/innodb_plugin/t/innodb-index.test
+++ b/mysql-test/suite/innodb_plugin/t/innodb-index.test
@@ -475,6 +475,9 @@ CREATE TABLE t1(a INT,
CREATE INDEX idx1 ON t1(a,v1);
INSERT INTO t1 VALUES(9,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
UPDATE t1 SET a=1000;
+DELETE FROM t1;
+# Let the purge thread clean up this file.
+-- sleep 10
DROP TABLE t1;
eval set global innodb_file_per_table=$per_table;