[MDEV-15103] Assertion in ha_partition::part_records() for updating VIEW Created: 2018-01-28  Updated: 2018-02-23  Resolved: 2018-02-23

Status: Closed
Project: MariaDB Server
Component/s: Partitioning, Versioned Tables, Views
Affects Version/s: 10.3
Fix Version/s: 10.3.5

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

Issue Links:
Relates
relates to MDEV-14830 Assertion `bitmap_is_set(&(m_part_inf... Closed
relates to MDEV-15191 Assertion `bit < (map)->n_bits' faile... Closed

 Description   

Assertion `bitmap_is_set(&(m_part_info->read_partitions), part_id)' failed in ha_partition::part_records

Note: the assertion failure and the scenario are almost identical to MDEV-14830, however it was closed as a duplicate of MDEV-14816 which is now fixed in the current 10.3 tree (and indeed, MDEV-14830 is no longer reproducible with the test case provided in that report), but this variation still fails.

--source include/have_partition.inc
 
CREATE OR REPLACE TABLE t1 (pk INT PRIMARY KEY, f INT) WITH SYSTEM VERSIONING PARTITION BY SYSTEM_TIME LIMIT 100 (PARTITION p1 HISTORY, PARTITION pn CURRENT);
INSERT INTO t1 VALUES (1,10),(2,20);
CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1;
UPDATE v1 SET f = 30;
 
# Cleanup
DROP VIEW v1;
DROP TABLE t1;

10.3 b8c92d752c34

mysqld: /data/src/10.3/sql/ha_partition.h:1491: virtual ha_rows ha_partition::part_records(void*): Assertion `bitmap_is_set(&(m_part_info->read_partitions), part_id)' failed.
180128 19:26:32 [ERROR] mysqld got signal 6 ;
 
#7  0x00007f27ccac9ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x0000562f607588dc in ha_partition::part_records (this=0x7f27ac100bd8, _part_elem=0x7f27ac06df10) at /data/src/10.3/sql/ha_partition.h:1491
#9  0x0000562f601872f0 in partition_info::vers_limit_exceed (this=0x7f27ac06dca8, part=0x7f27ac06df10) at /data/src/10.3/sql/partition_info.h:450
#10 0x0000562f6017bbe9 in vers_get_partition_id (part_info=0x7f27ac06dca8, part_id=0x7f27c2cffe50, func_value=0x7f27c2cffe58) at /data/src/10.3/sql/sql_partition.cc:3205
#11 0x0000562f6074574a in ha_partition::write_row (this=0x7f27ac100bd8, buf=0x7f27ac035530 "\371\001") at /data/src/10.3/sql/ha_partition.cc:4238
#12 0x0000562f5ffbfd9d in handler::ha_write_row (this=0x7f27ac100bd8, buf=0x7f27ac035530 "\371\001") at /data/src/10.3/sql/handler.cc:6205
#13 0x0000562f5fc992bd in vers_insert_history_row (table=0x7f27ac0fffa0) at /data/src/10.3/sql/sql_insert.cc:1643
#14 0x0000562f5fdc2c9b in mysql_update (thd=0x7f27ac000b00, table_list=0x7f27ac014d10, fields=..., values=..., conds=0x7f27ac0186a8, order_num=0, order=0x0, limit=18446744073709551615, handle_duplicates=DUP_ERROR, ignore=false, found_return=0x7f27c2d00700, updated_return=0x7f27c2d007b0) at /data/src/10.3/sql/sql_update.cc:933
#15 0x0000562f5fccd2be in mysql_execute_command (thd=0x7f27ac000b00) at /data/src/10.3/sql/sql_parse.cc:4561
#16 0x0000562f5fcd8050 in mysql_parse (thd=0x7f27ac000b00, rawbuf=0x7f27ac014c38 "UPDATE v1 SET f = 30", length=20, parser_state=0x7f27c2d015f0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7987
#17 0x0000562f5fcc587f in dispatch_command (command=COM_QUERY, thd=0x7f27ac000b00, packet=0x7f27ac00b141 "UPDATE v1 SET f = 30", packet_length=20, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1826
#18 0x0000562f5fcc42b3 in do_command (thd=0x7f27ac000b00) at /data/src/10.3/sql/sql_parse.cc:1370
#19 0x0000562f5fe2b7e8 in do_handle_one_connection (connect=0x562f62e30080) at /data/src/10.3/sql/sql_connect.cc:1401
#20 0x0000562f5fe2b575 in handle_one_connection (arg=0x562f62e30080) at /data/src/10.3/sql/sql_connect.cc:1307
#21 0x0000562f602c91b4 in pfs_spawn_thread (arg=0x562f62e4b860) at /data/src/10.3/storage/perfschema/pfs.cc:1862
#22 0x00007f27ce7a0494 in start_thread (arg=0x7f27c2d02700) at pthread_create.c:333
#23 0x00007f27ccb8693f in clone () from /lib/x86_64-linux-gnu/libc.so.6



 Comments   
Comment by Aleksey Midenkov [ 2018-02-08 ]

Indeed, that was not a duplicate but masked problem.

Analysis

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