mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-28552 Assertion `inited==RND' failed in handler::ha_rnd_end
We cannot permanently change bits in read_partitions in the middle of processing because ha_rnd_init()/ha_rnd_end() depends on that.
This commit is contained in:
committed by
Sergei Golubchik
parent
8609254f4f
commit
107623c5c5
@ -1133,5 +1133,17 @@ select count(*) from t1 partition (p1);
|
|||||||
count(*)
|
count(*)
|
||||||
100
|
100
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
#
|
||||||
|
# MDEV-28552 Assertion `inited==RND' failed in handler::ha_rnd_end
|
||||||
|
#
|
||||||
|
create table tcount (c int unsigned);
|
||||||
|
insert into tcount values (0);
|
||||||
|
create table t (f int) with system versioning
|
||||||
|
partition by system_time limit 1000
|
||||||
|
(partition p1 history, partition pn current);
|
||||||
|
insert into t values (1),(2);
|
||||||
|
create trigger tr before insert on t for each row update tcount set c = c + 1;
|
||||||
|
insert into t select * from t;
|
||||||
|
drop table tcount, t;
|
||||||
# End of 10.3 tests
|
# End of 10.3 tests
|
||||||
set global innodb_stats_persistent= @save_persistent;
|
set global innodb_stats_persistent= @save_persistent;
|
||||||
|
@ -1080,6 +1080,24 @@ replace t1 select * from t1;
|
|||||||
select count(*) from t1 partition (p0);
|
select count(*) from t1 partition (p0);
|
||||||
select count(*) from t1 partition (p1);
|
select count(*) from t1 partition (p1);
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-28552 Assertion `inited==RND' failed in handler::ha_rnd_end
|
||||||
|
--echo #
|
||||||
|
create table tcount (c int unsigned);
|
||||||
|
insert into tcount values (0);
|
||||||
|
|
||||||
|
create table t (f int) with system versioning
|
||||||
|
partition by system_time limit 1000
|
||||||
|
(partition p1 history, partition pn current);
|
||||||
|
insert into t values (1),(2);
|
||||||
|
create trigger tr before insert on t for each row update tcount set c = c + 1;
|
||||||
|
|
||||||
|
insert into t select * from t;
|
||||||
|
|
||||||
|
# cleanup
|
||||||
|
drop table tcount, t;
|
||||||
|
|
||||||
--echo # End of 10.3 tests
|
--echo # End of 10.3 tests
|
||||||
|
|
||||||
set global innodb_stats_persistent= @save_persistent;
|
set global innodb_stats_persistent= @save_persistent;
|
||||||
|
@ -1608,7 +1608,6 @@ public:
|
|||||||
for (; part_id < part_id_end; ++part_id)
|
for (; part_id < part_id_end; ++part_id)
|
||||||
{
|
{
|
||||||
handler *file= m_file[part_id];
|
handler *file= m_file[part_id];
|
||||||
DBUG_ASSERT(bitmap_is_set(&(m_part_info->read_partitions), part_id));
|
|
||||||
file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK | HA_STATUS_OPEN);
|
file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK | HA_STATUS_OPEN);
|
||||||
part_recs+= file->stats.records;
|
part_recs+= file->stats.records;
|
||||||
}
|
}
|
||||||
|
@ -904,8 +904,6 @@ void partition_info::vers_check_limit(THD *thd)
|
|||||||
uint32 part_id= vers_info->hist_part->id * sub_factor;
|
uint32 part_id= vers_info->hist_part->id * sub_factor;
|
||||||
const uint32 part_id_end= part_id + sub_factor;
|
const uint32 part_id_end= part_id + sub_factor;
|
||||||
DBUG_ASSERT(part_id_end <= num_parts * sub_factor);
|
DBUG_ASSERT(part_id_end <= num_parts * sub_factor);
|
||||||
for (; part_id < part_id_end; ++part_id)
|
|
||||||
bitmap_set_bit(&read_partitions, part_id);
|
|
||||||
|
|
||||||
ha_partition *hp= (ha_partition*)(table->file);
|
ha_partition *hp= (ha_partition*)(table->file);
|
||||||
ha_rows hist_rows= hp->part_records(vers_info->hist_part);
|
ha_rows hist_rows= hp->part_records(vers_info->hist_part);
|
||||||
|
Reference in New Issue
Block a user