From 5d5d1a814dbfe46a80ed36890d10442968f14086 Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Wed, 20 Aug 2008 17:29:14 +0200 Subject: Backport of patch for Bug#34604 (from 6.0) post push fix for bug#20129, test failed due to non existing source files. mysql-test/Makefile.am: Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that partition is corrupt Test parts.partition_repair_myisam failed because the corrupted pre fabricated files was not included in the dist-file. mysql-test/suite/parts/r/partition_special_innodb.result: Bug#34604: hander::ha_rnd_end(): Assertion inited==RND failed updated result file mysql-test/suite/parts/t/partition_special_innodb-master.opt: Bug#34604: hander::ha_rnd_end(): Assertion inited==RND failed Added parameter to speed up the test. Set to 2 seconds to be working on slow machines. mysql-test/suite/parts/t/partition_special_innodb.test: Bug#34604: hander::ha_rnd_end(): Assertion inited==RND failed Added test for verifying the bug (without the patch in ha_partition.cc, this crashes a debug compiled server) sql/ha_partition.cc: Bug#34604: hander::ha_rnd_end(): Assertion inited==RND failed In some cases error was not properly propagated through ha_partition::rnd_next. Will now return the error code from the partitions rnd_next and update m_part_spec.start_part and m_last_part properly. This makes the inited state to be correct. --- sql/ha_partition.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sql/ha_partition.cc') diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index d2497081893..34cd160e7e4 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -3389,6 +3389,8 @@ int ha_partition::rnd_next(uchar *buf) result= HA_ERR_END_OF_FILE; break; } + m_last_part= part_id; + m_part_spec.start_part= part_id; file= m_file[part_id]; DBUG_PRINT("info", ("rnd_init on partition %d", part_id)); if ((result= file->ha_rnd_init(1))) -- cgit v1.2.1