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

Assertion `false' failed in set_field_lock_type upon concurrent INSERT DELAYED and select from table_handles

    XMLWordPrintable

Details

    Description

      --source include/have_perfschema.inc
       
      CREATE TABLE t (a INT) ENGINE=MyISAM;
      INSERT DELAYED INTO t VALUES (1);
      SELECT * FROM performance_schema.table_handles;
       
      # Cleanup
      DROP TABLE t;
      

      10.5 3b251e24

      mariadbd: /data/src/10.5-bug/storage/perfschema/table_helper.cc:602: void set_field_lock_type(Field*, PFS_TL_LOCK_TYPE): Assertion `false' failed.
      221003 23:55:57 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fa422dab662 in __GI___assert_fail (assertion=0x55c8e871e6a0 "false", file=0x55c8e871e7e0 "/data/src/10.5-bug/storage/perfschema/table_helper.cc", line=602, function=0x55c8e871f260 "void set_field_lock_type(Field*, PFS_TL_LOCK_TYPE)") at assert.c:101
      #8  0x000055c8e70472c2 in set_field_lock_type (f=0x6190000887c8, lock_type=PFS_TL_WRITE_DELAYED) at /data/src/10.5-bug/storage/perfschema/table_helper.cc:602
      #9  0x000055c8e706624f in table_table_handles::read_row_values (this=0x615000021500, table=0x62000003d108, buf=0x61d0001fff28 "", fields=0x619000088070, read_all=false) at /data/src/10.5-bug/storage/perfschema/table_table_handles.cc:201
      #10 0x000055c8e6fa597f in PFS_engine_table::read_row (this=0x615000021500, table=0x62000003d108, buf=0x61d0001fff28 "", fields=0x619000088040) at /data/src/10.5-bug/storage/perfschema/pfs_engine_table.cc:454
      #11 0x000055c8e6f6c336 in ha_perfschema::rnd_next (this=0x61b00003e328, buf=0x61d0001fff28 "") at /data/src/10.5-bug/storage/perfschema/ha_perfschema.cc:381
      #12 0x000055c8e6745138 in handler::ha_rnd_next (this=0x61b00003e328, buf=0x61d0001fff28 "") at /data/src/10.5-bug/sql/handler.cc:2991
      #13 0x000055c8e6b73504 in rr_sequential (info=0x62900025d370) at /data/src/10.5-bug/sql/records.cc:511
      #14 0x000055c8e5dd19dc in READ_RECORD::read_record (this=0x62900025d370) at /data/src/10.5-bug/sql/records.h:79
      #15 0x000055c8e60c505e in join_init_read_record (tab=0x62900025d2a8) at /data/src/10.5-bug/sql/sql_select.cc:21560
      #16 0x000055c8e60be442 in sub_select (join=0x62b00003bbc0, join_tab=0x62900025d2a8, end_of_records=false) at /data/src/10.5-bug/sql/sql_select.cc:20612
      #17 0x000055c8e60bc663 in do_select (join=0x62b00003bbc0, procedure=0x0) at /data/src/10.5-bug/sql/sql_select.cc:20149
      #18 0x000055c8e604a79c in JOIN::exec_inner (this=0x62b00003bbc0) at /data/src/10.5-bug/sql/sql_select.cc:4464
      #19 0x000055c8e6047de5 in JOIN::exec (this=0x62b00003bbc0) at /data/src/10.5-bug/sql/sql_select.cc:4245
      #20 0x000055c8e604bcf2 in mysql_select (thd=0x62b000069288, tables=0x62b0000389d8, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x62b00003bb90, unit=0x62b00006d298, select_lex=0x62b000038378) at /data/src/10.5-bug/sql/sql_select.cc:4669
      #21 0x000055c8e601e145 in handle_select (thd=0x62b000069288, lex=0x62b00006d1d0, result=0x62b00003bb90, setup_tables_done_option=0) at /data/src/10.5-bug/sql/sql_select.cc:417
      #22 0x000055c8e5f91329 in execute_sqlcom_select (thd=0x62b000069288, all_tables=0x62b0000389d8) at /data/src/10.5-bug/sql/sql_parse.cc:6172
      #23 0x000055c8e5f807dd in mysql_execute_command (thd=0x62b000069288) at /data/src/10.5-bug/sql/sql_parse.cc:3901
      #24 0x000055c8e5f9c27e in mysql_parse (thd=0x62b000069288, rawbuf=0x62b0000382a8 "SELECT * FROM performance_schema.table_handles", length=46, parser_state=0x7fa419c23960, is_com_multi=false, is_next_command=false) at /data/src/10.5-bug/sql/sql_parse.cc:7957
      #25 0x000055c8e5f734c7 in dispatch_command (command=COM_QUERY, thd=0x62b000069288, packet=0x629000249289 "", packet_length=46, is_com_multi=false, is_next_command=false) at /data/src/10.5-bug/sql/sql_parse.cc:1839
      #26 0x000055c8e5f7000a in do_command (thd=0x62b000069288) at /data/src/10.5-bug/sql/sql_parse.cc:1358
      #27 0x000055c8e638d5eb in do_handle_one_connection (connect=0x61100000a0c8, put_in_cache=true) at /data/src/10.5-bug/sql/sql_connect.cc:1411
      #28 0x000055c8e638cf88 in handle_one_connection (arg=0x61100001fec8) at /data/src/10.5-bug/sql/sql_connect.cc:1313
      #29 0x000055c8e6f73275 in pfs_spawn_thread (arg=0x6160000eb908) at /data/src/10.5-bug/storage/perfschema/pfs.cc:2201
      #30 0x00007fa423289ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #31 0x00007fa422e76aef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Non-debug build fails the same way.
      The test case is not applicable to 10.4 which doesn't have this P_S table.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.