Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-17820

Assertion `(flags & ulint(~BTR_KEEP_IBUF_BITMAP)) == BTR_NO_LOCKING_FLAG' failed in btr_cur_pessimistic_insert

    XMLWordPrintable

    Details

      Description

      --source include/have_innodb.inc
      	
      CREATE TABLE t1 (
        pk INT NOT NULL,
        f1 INT,
        f2 CHAR(32) NOT NULL,
        f3 INT NOT NULL,
        f4 INT NOT NULL,
        f5 INT,
        f6 CHAR(32) NOT NULL,
        f7 CHAR(32),
        f8 CHAR(32),
        PRIMARY KEY (pk)
      ) ENGINE=InnoDB;
       
      INSERT INTO t1 VALUES 
        (1,9,'a1',2,88,88,'c1','d1','e1'),(2,48,'a2',8,68,92,'c2','d2','e2'),
        (3,41,'a3',56,84,37,'c3','d3','e3'),(4,NULL,'a4',6,6,NULL,'c4','d4','e4'),
        (5,52,'a5',37,44,20,'c5','d5','e5'),(6,44,'a6',53,4,NULL,'c6','d6','e6'),
        (7,24,'a7',54,8,54,'c7','d7','e7'),(8,80,'a8',3,52,20,'c8','d8','e8'),
        (9,71,'a9',34,32,NULL,'c9','d9','e9'),(10,14,'a10',6,64,88,'c10','d10','e10'),
        (11,48,'a11',8,25,42,'c11','d11','e11'),(12,16,'a12',8,7,NULL,'c12','d12','e12'),
        (13,NULL,'a13',22,0,95,'c13','d13','e13'),(14,4,'a14',72,48,NULL,'c14','d14','e14'),
        (15,4,'a15',5,64,2,'c15','d15','e15'),(16,NULL,'a16',9,40,30,'c16','d16','e16'),
        (17,92,'a17',48,2,NULL,'c17','d17','e17'),(18,36,'a18',48,51,7,'c18','d18','e18'),
        (19,NULL,'a19',80,96,NULL,'c19','d19','e19'),(20,96,'a20',9,80,NULL,'c20','d20','e20'),
        (21,50,'a21',16,40,NULL,'c21','d21','e21'),(22,NULL,'a22',7,84,8,'c22','d22','e22'),
        (23,28,'a23',93,80,NULL,'c23','d23','e23'),(24,31,'a24',40,38,NULL,'c24','d24','e24'),
        (25,85,'a25',8,5,88,'c25','d25','e25'),(26,66,'a26',8,32,4,'c26','d26','e26'),
        (51,52,'a51',6,92,15,'c51','d51','e51'),(52,77,'a52',24,24,28,'c52','d52','e52'),
        (53,8,'a53',75,31,NULL,'c53','d53','e53'),(54,48,'a54',5,8,1,'c54','d54','e54'),
        (55,90,'a55',56,12,5,'c55','d55','e55'),(56,92,'a56',4,9,88,'c56','d56','e56'),
        (57,83,'a57',23,40,72,'c57','d57','e57'),(58,7,'a58',4,40,32,'c58','d58','e58'),
        (59,28,'a59',2,3,32,'c59','d59','e59'),(60,16,'a60',80,4,NULL,'c60','d60','e60'),
        (61,44,'a61',88,24,NULL,'c61','d61','e61'),(62,4,'a62',5,25,3,'c62','d62','e62'),
        (63,NULL,'a63',7,24,76,'c63','d63','e63'),(64,0,'a64',13,40,73,'c64','d64','e64'),
        (101,NULL,'a101',1,49,75,'c101','d101','e101'),(102,34,'a102',10,17,20,'c102','d102','e102'),
        (103,8,'a103',2,2,NULL,'c103','d103','e103'),(104,12,'a104',44,48,52,'c104','d104','e104'),
        (105,8,'a105',4,19,38,'c105','d105','e105'),(106,20,'a106',6,80,9,'c106','d106','e106'),
        (107,72,'a107',72,16,56,'c107','d107','e107'),(108,76,'a108',98,24,21,'c108','d108','e108'),
        (109,67,'a109',16,91,NULL,'c109','d109','e109'),(110,72,'a110',72,3,48,'c110','d110','e110'),
        (151,8,'a151',3,86,NULL,'c151','d151','e151'),(152,NULL,'a152',52,72,0,'c152','d152','e152'),
        (153,NULL,'a153',46,30,92,'c153','d153','e153'),(154,80,'a154',1,40,48,'c154','d154','e154'),
        (155,24,'a155',68,68,8,'c155','d155','e155'),(156,85,'a156',85,72,60,'c156','d156','e156'),
        (157,7,'a157',7,12,6,'c157','d157','e157'),(158,NULL,'a158',48,48,80,'c158','d158','e158'),
        (159,12,'a159',0,36,0,'c159','d159','e159'),(160,2,'a160',6,52,NULL,'c160','d160','e160'),
        (201,0,'a201',1,3,NULL,'c201','d201','e201'),(202,NULL,'a202',3,53,14,'c202','d202','e202'),
        (203,84,'a203',6,20,NULL,'c203','d203','e203'),(204,38,'a204',25,13,88,'c204','d204','e204'),
        (205,1,'a205',2,69,5,'c205','d205','e205'),(206,7,'a206',60,22,NULL,'c206','d206','e206'),
        (207,NULL,'a207',5,4,NULL,'c207','d207','e207'),(251,7,'a251',0,4,40,'c251','d251','e251'),
        (252,4,'a252',16,8,NULL,'c252','d252','e252'),(253,14,'a253',60,12,99,'c253','d253','e253'),
        (254,84,'a254',68,16,5,'c254','d254','e254'),(255,3,'a255',70,36,61,'c255','d255','e255'),
        (256,7,'a256',18,48,NULL,'c256','d256','e256'),(257,NULL,'a257',68,53,NULL,'c257','d257','e257'),
        (258,29,'a258',52,16,64,'c258','d258','e258'),(259,NULL,'a259',80,92,40,'c259','d259','e259'),
        (301,68,'a301',1,48,48,'c301','d301','e301'),(302,2,'a302',1,1,32,'c302','d302','e302'),
        (303,44,'a303',60,96,16,'c303','d303','e303'),(304,32,'a304',52,64,32,'c304','d304','e304'),
        (305,88,'a305',37,72,NULL,'c305','d305','e305'),(306,5,'a306',35,60,20,'c306','d306','e306'),
        (307,35,'a307',4,48,NULL,'c307','d307','e307'),(308,4,'a308',92,44,80,'c308','d308','e308'),
        (351,48,'a351',60,4,40,'c351','d351','e351'),(352,7,'a352',9,61,13,'c352','d352','e352'),
        (353,0,'a353',5,93,53,'c353','d353','e353'),(354,7,'a354',1,20,NULL,'c354','d354','e354'),
        (355,84,'a355',5,48,96,'c355','d355','e355'),(356,NULL,'a356',39,92,36,'c356','d356','e356'),
        (357,88,'a357',9,76,44,'c357','d357','e357'),(358,66,'a358',34,67,80,'c358','d358','e358'),
        (359,8,'a359',8,52,NULL,'c359','d359','e359'),(360,3,'a360',53,83,NULL,'c360','d360','e360'),
        (361,23,'a361',44,9,48,'c361','d361','e361'),(362,4,'a362',0,54,48,'c362','d362','e362'),
        (363,75,'a363',66,76,52,'c363','d363','e363')
      ;
       
      ALTER TABLE t1 ADD COLUMN x VARCHAR(255) DEFAULT ' foobar ';
      UPDATE t1 SET f1 = 0;
      ALTER TABLE t1 DROP COLUMN x;
       
      # Cleanup
      DROP TABLE t1;
      

      10.4 27f3329ff6

      mysqld: /data/src/10.4/storage/innobase/btr/btr0cur.cc:3743: dberr_t btr_cur_pessimistic_insert(ulint, btr_cur_t*, ulint**, mem_heap_t**, dtuple_t*, rec_t**, big_rec_t**, ulint, que_thr_t*, mtr_t*): Assertion `(flags & ulint(~BTR_KEEP_IBUF_BITMAP)) == BTR_NO_LOCKING_FLAG' failed.
      181123 21:44:54 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007ff877ebaee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x0000558da6e53ae4 in btr_cur_pessimistic_insert (flags=7, cursor=0x7ff8711fbde0, offsets=0x7ff8711fbd00, heap=0x7ff8711fbd08, entry=0x7ff82805adf8, rec=0x7ff8711fbbc0, big_rec=0x7ff8711fbbb8, n_ext=2, thr=0x0, mtr=0x7ff8711fbf00) at /data/src/10.4/storage/innobase/btr/btr0cur.cc:3742
      #9  0x0000558da6e57fe2 in btr_cur_pessimistic_update (flags=10, cursor=0x7ff8711fbde0, offsets=0x7ff8711fbd00, offsets_heap=0x7ff8711fbd08, entry_heap=0x7ff828057ce0, big_rec=0x7ff8711fbd10, update=0x7ff82805a8e8, cmpl_info=1, thr=0x7ff82805a830, trx_id=46, mtr=0x7ff8711fbf00) at /data/src/10.4/storage/innobase/btr/btr0cur.cc:5057
      #10 0x0000558da6c32529 in innobase_instant_try (ha_alter_info=0x7ff8711fdbb0, ctx=0x7ff828017218, altered_table=0x7ff8280555a0, table=0x7ff8280a7410, trx=0x7ff871cf8218) at /data/src/10.4/storage/innobase/handler/handler0alter.cc:5586
      #11 0x0000558da6c4cfcb in commit_try_norebuild (ha_alter_info=0x7ff8711fdbb0, ctx=0x7ff828017218, altered_table=0x7ff8280555a0, old_table=0x7ff8280a7410, trx=0x7ff871cf8218, table_name=0x7ff82812cded "t1") at /data/src/10.4/storage/innobase/handler/handler0alter.cc:10013
      #12 0x0000558da6c3fd02 in ha_innobase::commit_inplace_alter_table (this=0x7ff8280a8048, altered_table=0x7ff8280555a0, ha_alter_info=0x7ff8711fdbb0, commit=true) at /data/src/10.4/storage/innobase/handler/handler0alter.cc:10642
      #13 0x0000558da68daa78 in handler::ha_commit_inplace_alter_table (this=0x7ff8280a8048, altered_table=0x7ff8280555a0, ha_alter_info=0x7ff8711fdbb0, commit=true) at /data/src/10.4/sql/handler.cc:4457
      #14 0x0000558da66a4918 in mysql_inplace_alter_table (thd=0x7ff828000b00, table_list=0x7ff828014e80, table=0x7ff8280a7410, altered_table=0x7ff8280555a0, ha_alter_info=0x7ff8711fdbb0, inplace_supported=HA_ALTER_INPLACE_INSTANT, target_mdl_request=0x7ff8711fdce0, alter_ctx=0x7ff8711fe8d0) at /data/src/10.4/sql/sql_table.cc:7599
      #15 0x0000558da66aa733 in mysql_alter_table (thd=0x7ff828000b00, new_db=0x7ff8280051b8, new_name=0x7ff828005588, create_info=0x7ff8711ff4c0, table_list=0x7ff828014e80, alter_info=0x7ff8711ff400, order_num=0, order=0x0, ignore=false) at /data/src/10.4/sql/sql_table.cc:9692
      #16 0x0000558da67338bd in Sql_cmd_alter_table::execute (this=0x7ff8280154e8, thd=0x7ff828000b00) at /data/src/10.4/sql/sql_alter.cc:497
      #17 0x0000558da65d2ab4 in mysql_execute_command (thd=0x7ff828000b00) at /data/src/10.4/sql/sql_parse.cc:6289
      #18 0x0000558da65d79d8 in mysql_parse (thd=0x7ff828000b00, rawbuf=0x7ff828014d98 "ALTER TABLE t1 DROP COLUMN x", length=28, parser_state=0x7ff871200600, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8091
      #19 0x0000558da65c4cd7 in dispatch_command (command=COM_QUERY, thd=0x7ff828000b00, packet=0x7ff828093db1 "ALTER TABLE t1 DROP COLUMN x", packet_length=28, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1851
      #20 0x0000558da65c36fb in do_command (thd=0x7ff828000b00) at /data/src/10.4/sql/sql_parse.cc:1396
      #21 0x0000558da672db3c in do_handle_one_connection (connect=0x558da9d5c5c0) at /data/src/10.4/sql/sql_connect.cc:1402
      #22 0x0000558da672d8c0 in handle_one_connection (arg=0x558da9d5c5c0) at /data/src/10.4/sql/sql_connect.cc:1308
      #23 0x0000558da6bdb0a1 in pfs_spawn_thread (arg=0x558da9de1890) at /data/src/10.4/storage/perfschema/pfs.cc:1862
      #24 0x00007ff879976494 in start_thread (arg=0x7ff871201700) at pthread_create.c:333
      #25 0x00007ff877f7793f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Not reproducible on 10.3.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marko Marko Mäkelä
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: