[MDEV-15191] Assertion `bit < (map)->n_bits' failed in bitmap_is_set upon INSERT Created: 2018-02-03  Updated: 2018-02-23  Resolved: 2018-02-13

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

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

Issue Links:
Duplicate
duplicates MDEV-15056 Partition pruning doesn't prune in sy... Closed
Relates
relates to MDEV-15103 Assertion in ha_partition::part_recor... Closed
relates to MDEV-15189 Valgrind Invalid read in get_partitio... Confirmed

 Description   

--source include/have_partition.inc
 
CREATE OR REPLACE TABLE t1 (i INT) WITH SYSTEM VERSIONING;
INSERT INTO t1 VALUES (1),(2);
UPDATE t1 SET i = 3;
 
ALTER TABLE t1 PARTITION BY SYSTEM_TIME INTERVAL 1 MONTH (PARTITION p1 HISTORY, PARTITION pn CURRENT);
LOCK TABLE t1 WRITE;
--error ER_RANGE_NOT_INCREASING_ERROR
ALTER TABLE t1 ADD PARTITION (PARTITION p2 HISTORY);
INSERT INTO t1 VALUES (4);
 
# Cleanup
UNLOCK TABLES;
DROP TABLE t1;

10.3 c8299e6278e42

mysqld: /data/src/10.3/include/my_bitmap.h:133: uint bitmap_is_set(const MY_BITMAP*, uint): Assertion `bit < (map)->n_bits' failed.
180204  0:16:33 [ERROR] mysqld got signal 6 ;
 
#7  0x00007f31b077bee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x0000556adcd11fd3 in bitmap_is_set (map=0x7f319807a480, bit=2) at /data/src/10.3/include/my_bitmap.h:133
#9  0x0000556adcd1da7e in ha_partition::write_row (this=0x7f3198078348, buf=0x7f3198073600 "\361\004") at /data/src/10.3/sql/ha_partition.cc:4255
#10 0x0000556adc598911 in handler::ha_write_row (this=0x7f3198078348, buf=0x7f3198073600 "\361\004") at /data/src/10.3/sql/handler.cc:6203
#11 0x0000556adc27255b in write_record (thd=0x7f3198000b00, table=0x7f31981010c0, info=0x7f31aa9e9350) at /data/src/10.3/sql/sql_insert.cc:2018
#12 0x0000556adc26f97e in mysql_insert (thd=0x7f3198000b00, table_list=0x7f3198014d38, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at /data/src/10.3/sql/sql_insert.cc:1066
#13 0x0000556adc2a597a in mysql_execute_command (thd=0x7f3198000b00) at /data/src/10.3/sql/sql_parse.cc:4703
#14 0x0000556adc2b0038 in mysql_parse (thd=0x7f3198000b00, rawbuf=0x7f3198014c58 "INSERT INTO t1 VALUES (4)", length=25, parser_state=0x7f31aa9ea5e0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7976
#15 0x0000556adc29d887 in dispatch_command (command=COM_QUERY, thd=0x7f3198000b00, packet=0x7f319800b161 "INSERT INTO t1 VALUES (4)", packet_length=25, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1825
#16 0x0000556adc29c2c7 in do_command (thd=0x7f3198000b00) at /data/src/10.3/sql/sql_parse.cc:1370
#17 0x0000556adc403be4 in do_handle_one_connection (connect=0x556adf8531a0) at /data/src/10.3/sql/sql_connect.cc:1402
#18 0x0000556adc403971 in handle_one_connection (arg=0x556adf8531a0) at /data/src/10.3/sql/sql_connect.cc:1308
#19 0x0000556adc8a1cd2 in pfs_spawn_thread (arg=0x556adf9167e0) at /data/src/10.3/storage/perfschema/pfs.cc:1862
#20 0x00007f31b2452494 in start_thread (arg=0x7f31aa9eb700) at pthread_create.c:333
#21 0x00007f31b083893f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Couldn't reproduce the assertion failure itself without versioning; but there is MDEV-15189 for vanilla partitioning and MDEV-15036, can be related.



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

Fixed (midenok/455/pruning).

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