[MDEV-14923] Assertion upon INSERT into locked versioned partitioned table Created: 2018-01-11  Updated: 2018-01-13  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: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-14844 Assertion `bit < (map)->n_bits' faile... Closed

 Description   

Assertion `bit < (map)->n_bits' failed upon INSERT into locked versioned partitioned table

Note: The failure is similar to MDEV-14844, except that MDEV-14844 affected ordinary tables and the guilty statement was SELECT. MDEV-14844 was closed as a duplicate of MDEV-14817, and a fix for MDEV-14817 is now in the tree, but the test case below still causes a failure.

--source include/have_partition.inc
 
CREATE OR REPLACE TABLE t1 (pk INT PRIMARY KEY) WITH SYSTEM VERSIONING PARTITION BY system_time INTERVAL 2 MINUTE (PARTITION p1 HISTORY, PARTITION pn CURRENT);
 
LOCK TABLE t1 WRITE;
--error ER_SAME_NAME_PARTITION
ALTER TABLE t1 ADD PARTITION (PARTITION p1 HISTORY);
INSERT INTO t1 VALUES (1);
 
# Cleanup
DROP TABLE t1;

bb-10.3-temporal ac95aa888380

mysqld: /data/src/bb-10.3-temporal/include/my_bitmap.h:133: uint bitmap_is_set(const MY_BITMAP*, uint): Assertion `bit < (map)->n_bits' failed.
180111 16:27:37 [ERROR] mysqld got signal 6 ;
 
#7  0x00007fea7c5e1ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x000055f90a34da19 in bitmap_is_set (map=0x7fea6406e420, bit=2) at /data/src/bb-10.3-temporal/include/my_bitmap.h:133
#9  0x000055f90a3593f2 in ha_partition::write_row (this=0x7fea640ffc38, buf=0x7fea6400a6d0 "\375\001") at /data/src/bb-10.3-temporal/sql/ha_partition.cc:4245
#10 0x000055f909bc58c3 in handler::ha_write_row (this=0x7fea640ffc38, buf=0x7fea6400a6d0 "\375\001") at /data/src/bb-10.3-temporal/sql/handler.cc:6205
#11 0x000055f9098a014c in write_record (thd=0x7fea64000b00, table=0x7fea640ff000, info=0x7fea7684f350) at /data/src/bb-10.3-temporal/sql/sql_insert.cc:2023
#12 0x000055f90989d506 in mysql_insert (thd=0x7fea64000b00, table_list=0x7fea64014d18, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at /data/src/bb-10.3-temporal/sql/sql_insert.cc:1066
#13 0x000055f9098d367d in mysql_execute_command (thd=0x7fea64000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:4707
#14 0x000055f9098dddda in mysql_parse (thd=0x7fea64000b00, rawbuf=0x7fea64014c38 "INSERT INTO t1 VALUES (1)", length=25, parser_state=0x7fea768505f0, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:7993
#15 0x000055f9098cb577 in dispatch_command (command=COM_QUERY, thd=0x7fea64000b00, packet=0x7fea6400b141 "INSERT INTO t1 VALUES (1)", packet_length=25, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:1826
#16 0x000055f9098c9fab in do_command (thd=0x7fea64000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:1370
#17 0x000055f909a311fc in do_handle_one_connection (connect=0x55f90cb823e0) at /data/src/bb-10.3-temporal/sql/sql_connect.cc:1401
#18 0x000055f909a30f89 in handle_one_connection (arg=0x55f90cb823e0) at /data/src/bb-10.3-temporal/sql/sql_connect.cc:1307
#19 0x000055f909ecedf6 in pfs_spawn_thread (arg=0x55f90cc458c0) at /data/src/bb-10.3-temporal/storage/perfschema/pfs.cc:1863
#20 0x00007fea7e2b8494 in start_thread (arg=0x7fea76851700) at pthread_create.c:333
#21 0x00007fea7c69e93f in clone () from /lib/x86_64-linux-gnu/libc.so.6


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