[MDEV-14830] Assertion `bitmap_is_set(&(m_part_info->read_partitions), part_id)' failed in ha_partition::part_records Created: 2017-12-31  Updated: 2018-01-28  Resolved: 2018-01-12

Status: Closed
Project: MariaDB Server
Component/s: Partitioning, Versioned Tables
Affects Version/s: N/A
Fix Version/s: 10.3.4

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Aleksey Midenkov
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates MDEV-14816 Assertion `join->best_read < double(1... Closed
Relates
relates to MDEV-15103 Assertion in ha_partition::part_recor... Closed

 Description   

--source include/have_partition.inc
 
CREATE OR REPLACE TABLE t1 (i INT) WITH SYSTEM VERSIONING PARTITION BY system_time LIMIT 10 (PARTITION p1 HISTORY, PARTITION pn CURRENT);
CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1;
INSERT INTO t1 VALUES (1),(2);
DELETE FROM v1;
 
# Cleanup
DROP VIEW v1;
DROP TABLE t1;

bb-10.3-temporal a3a15126f260e26b715ae9a790135df1822b74d8

mysqld: /data/src/bb-10.3-temporal/sql/ha_partition.h:1489: virtual ha_rows ha_partition::part_records(void*): Assertion `bitmap_is_set(&(m_part_info->read_partitions), part_id)' failed.
171231 18:25:24 [ERROR] mysqld got signal 6 ;
 
#7  0x00007f3c0bc94ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x000055a05209e870 in ha_partition::part_records (this=0x7f3bf4094048, _part_elem=0x7f3bf406e3a8) at /data/src/bb-10.3-temporal/sql/ha_partition.h:1489
#9  0x000055a051abfdc0 in partition_info::vers_limit_exceed (this=0x7f3bf406e538, part=0x7f3bf406e3a8) at /data/src/bb-10.3-temporal/sql/partition_info.h:471
#10 0x000055a051ab45e1 in vers_get_partition_id (part_info=0x7f3bf406e538, part_id=0x7f3c05f01a9c, func_value=0x7f3c05f01ab0) at /data/src/bb-10.3-temporal/sql/sql_partition.cc:3205
#11 0x000055a051aae35e in get_parts_for_update (old_data=0x7f3bf40948e8 "\361\001", new_data=0x7f3bf40948d0 "\361\001", rec0=0x7f3bf40948d0 "\361\001", part_info=0x7f3bf406e538, old_part_id=0x7f3c05f01aa0, new_part_id=0x7f3c05f01a9c, new_func_value=0x7f3c05f01ab0) at /data/src/bb-10.3-temporal/sql/sql_partition.cc:290
#12 0x000055a05208bbfd in ha_partition::update_row (this=0x7f3bf4094048, old_data=0x7f3bf40948e8 "\361\001", new_data=0x7f3bf40948d0 "\361\001") at /data/src/bb-10.3-temporal/sql/ha_partition.cc:4323
#13 0x000055a0518f91b8 in handler::ha_update_row (this=0x7f3bf4094048, old_data=0x7f3bf40948e8 "\361\001", new_data=0x7f3bf40948d0 "\361\001") at /data/src/bb-10.3-temporal/sql/handler.cc:6238
#14 0x000055a051aa1a8b in TABLE::delete_row (this=0x7f3bf4093400) at /data/src/bb-10.3-temporal/sql/sql_delete.cc:257
#15 0x000055a051a9edf8 in mysql_delete (thd=0x7f3bf4000b00, table_list=0x7f3bf4014d10, conds=0x7f3bf4017858, order_list=0x7f3bf4005260, limit=18446744073709551615, options=0, result=0x0) at /data/src/bb-10.3-temporal/sql/sql_delete.cc:752
#16 0x000055a051609935 in mysql_execute_command (thd=0x7f3bf4000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:4905
#17 0x000055a0516133f6 in mysql_parse (thd=0x7f3bf4000b00, rawbuf=0x7f3bf4014c48 "DELETE FROM v1", length=14, parser_state=0x7f3c05f035f0, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:7991
#18 0x000055a051600b97 in dispatch_command (command=COM_QUERY, thd=0x7f3bf4000b00, packet=0x7f3bf411f161 "DELETE FROM v1", packet_length=14, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:1825
#19 0x000055a0515ff5cb in do_command (thd=0x7f3bf4000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:1370
#20 0x000055a051767354 in do_handle_one_connection (connect=0x55a054d482a0) at /data/src/bb-10.3-temporal/sql/sql_connect.cc:1420
#21 0x000055a0517670e1 in handle_one_connection (arg=0x55a054d482a0) at /data/src/bb-10.3-temporal/sql/sql_connect.cc:1326
#22 0x000055a051c01c5a in pfs_spawn_thread (arg=0x55a054d63680) at /data/src/bb-10.3-temporal/storage/perfschema/pfs.cc:1863
#23 0x00007f3c0d96b494 in start_thread (arg=0x7f3c05f04700) at pthread_create.c:333
#24 0x00007f3c0bd5193f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Reproducible with at least InnoDB and MyISAM.
Also reproducible on tempesta-tech/mariadb 6d2583f59553.


Generated at Thu Feb 08 08:16:36 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.