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.
This commit is contained in:
parent
fad69f17c1
commit
5d5d1a814d
@ -77,6 +77,7 @@ dist-hook:
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51_data_be/BACKUP* $(distdir)/std_data/ndb_backup51_data_be
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51_data_le/BACKUP* $(distdir)/std_data/ndb_backup51_data_le
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/parts/part_* $(distdir)/std_data/parts
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/parts/*.MY* $(distdir)/std_data/parts
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/funcs_1/* $(distdir)/std_data/funcs_1
|
||||
$(INSTALL_DATA) $(srcdir)/lib/*.pl $(distdir)/lib
|
||||
$(INSTALL_DATA) $(srcdir)/lib/My/*.pm $(distdir)/lib/My
|
||||
@ -132,6 +133,7 @@ install-data-local:
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51_data_be/BACKUP* $(DESTDIR)$(testdir)/std_data/ndb_backup51_data_be
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51_data_le/BACKUP* $(DESTDIR)$(testdir)/std_data/ndb_backup51_data_le
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/parts/part_* $(DESTDIR)$(testdir)/std_data/parts
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/parts/*.MY* $(DESTDIR)$(testdir)/std_data/parts
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/funcs_1/* $(DESTDIR)$(testdir)/std_data/funcs_1
|
||||
$(INSTALL_DATA) $(srcdir)/lib/*.pl $(DESTDIR)$(testdir)/lib
|
||||
$(INSTALL_DATA) $(srcdir)/lib/My/*.pm $(DESTDIR)$(testdir)/lib/My
|
||||
|
@ -180,3 +180,18 @@ a b c d e f g h a1 b1 c1 d1 e1 f1 g1 h1 a2 b2 c2 d2 e2 f2 g2 h2 a3 b3 c3 d3 e3 f
|
||||
1983-12-31 cdef srtbvsr w 45634 13452.56 3452346456 127 1983-12-31 cdef srtbvsr w 45634 13452.56 3452346456 127 1983-12-31 cdef srtbvsr w 45634 13452.56 3452346456 127 1983-12-31 cdef srtbvsr w 45634 13452.56 3452346456 127 liuugbzvdmrlti b itiortudirtfgtibm dfi
|
||||
1975-01-01 abcde abcde m 1234 123.45 32412341234 113 1975-01-01 abcde abcde m 1234 123.45 32412341234 113 1975-01-01 abcde abcde m 1234 123.45 32412341234 113 1975-01-01 abcde abcde m 1234 123.45 32412341234 113 tbhth nrzh ztfghgfh fzh ftzhj fztjh
|
||||
drop table t1;
|
||||
# Bug#34604 - Assertion 'inited==RND' failed in handler::ha_rnd_end
|
||||
CREATE TABLE t1 (
|
||||
a INT AUTO_INCREMENT,
|
||||
b VARCHAR(255),
|
||||
PRIMARY KEY (a))
|
||||
ENGINE = InnoDB
|
||||
PARTITION BY HASH (a)
|
||||
PARTITIONS 2;
|
||||
SET autocommit=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (NULL, 'first row t2');
|
||||
SET autocommit=OFF;
|
||||
ALTER TABLE t1 AUTO_INCREMENT = 10;
|
||||
INSERT INTO t1 VALUES (NULL, 'second row t2');
|
||||
DROP TABLE t1;
|
||||
|
@ -0,0 +1 @@
|
||||
--innodb_lock_wait_timeout=2
|
@ -1,5 +1,5 @@
|
||||
################################################################################
|
||||
# t/partition_special_innodb.test #
|
||||
# t/partition_special_innodb.test #
|
||||
# #
|
||||
# Purpose: #
|
||||
# different Tests #
|
||||
@ -8,9 +8,9 @@
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: HH #
|
||||
# Original Date: 2006-08-01 #
|
||||
# Change Author: #
|
||||
# Change Date: #
|
||||
# Change: #
|
||||
# Change Author: MattiasJ #
|
||||
# Change Date: 2008-08-20 #
|
||||
# Change: added test for bug#34604 #
|
||||
################################################################################
|
||||
|
||||
#
|
||||
@ -44,3 +44,35 @@ let $engine= 'InnoDB';
|
||||
--source suite/parts/inc/partition_key_8col.inc
|
||||
--source suite/parts/inc/partition_key_16col.inc
|
||||
--source suite/parts/inc/partition_key_32col.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Execute storage engine specific tests
|
||||
|
||||
--echo # Bug#34604 - Assertion 'inited==RND' failed in handler::ha_rnd_end
|
||||
|
||||
CREATE TABLE t1 (
|
||||
a INT AUTO_INCREMENT,
|
||||
b VARCHAR(255),
|
||||
PRIMARY KEY (a))
|
||||
ENGINE = InnoDB
|
||||
PARTITION BY HASH (a)
|
||||
PARTITIONS 2;
|
||||
|
||||
connect (con1,127.0.0.1,root,,test,$MASTER_MYPORT,);
|
||||
connect (con2,127.0.0.1,root,,test,$MASTER_MYPORT,);
|
||||
|
||||
--connection con1
|
||||
SET autocommit=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (NULL, 'first row t2');
|
||||
|
||||
--connection con2
|
||||
SET autocommit=OFF;
|
||||
ALTER TABLE t1 AUTO_INCREMENT = 10;
|
||||
|
||||
--connection con1
|
||||
INSERT INTO t1 VALUES (NULL, 'second row t2');
|
||||
--disconnect con2
|
||||
--disconnect con1
|
||||
--connection default
|
||||
DROP TABLE t1;
|
||||
|
@ -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)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user