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

Assertion `false' failed in set_field_mdl_type upon quering performance schema

    XMLWordPrintable

    Details

      Description

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (a INT) ENGINE=InnoDB;
      --connect (con1,localhost,root,,test)
      LOCK  TABLES t1 WRITE CONCURRENT;
      --connect (con2,localhost,root,,test)
      --send
        LOCK TABLES t1 READ;
      --connection default
      SELECT * FROM performance_schema.metadata_locks;
       
      # Cleanup
      --connection con1
      UNLOCK TABLES;
      --disconnect con1
      --connection con2
      --reap
      --disconnect con2
      --connection default
      DROP TABLE t1;
      

      10.5 2f7d91bb

      mariadbd: /data/src/10.5/storage/perfschema/table_helper.cc:694: void set_field_mdl_type(Field*, opaque_mdl_type, bool): Assertion `false' failed.
      200417 15:55:15 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f91ebc95102 in __GI___assert_fail (assertion=0x564529dd3820 "false", file=0x564529dd3900 "/data/src/10.5/storage/perfschema/table_helper.cc", line=694, function=0x564529dd5300 <set_field_mdl_type(Field*, int, bool)::__PRETTY_FUNCTION__> "void set_field_mdl_type(Field*, opaque_mdl_type, bool)") at assert.c:101
      #8  0x00005645286e089c in set_field_mdl_type (f=0x6190000dd608, mdl_type=6, backup=false) at /data/src/10.5/storage/perfschema/table_helper.cc:694
      #9  0x00005645286cfd83 in table_metadata_locks::read_row_values (this=0x616000051f80, table=0x62000003c108, buf=0x61d000245f28 "", fields=0x6190000dd060, read_all=false) at /data/src/10.5/storage/perfschema/table_md_locks.cc:176
      #10 0x000056452863c84b in PFS_engine_table::read_row (this=0x616000051f80, table=0x62000003c108, buf=0x61d000245f28 "", fields=0x6190000dd040) at /data/src/10.5/storage/perfschema/pfs_engine_table.cc:454
      #11 0x00005645286028d9 in ha_perfschema::rnd_next (this=0x61b00005fe28, buf=0x61d000245f28 "") at /data/src/10.5/storage/perfschema/ha_perfschema.cc:381
      #12 0x0000564527d2bdd0 in handler::ha_rnd_next (this=0x61b00005fe28, buf=0x61d000245f28 "") at /data/src/10.5/sql/handler.cc:2976
      #13 0x000056452815c0c8 in rr_sequential (info=0x6290002d0de8) at /data/src/10.5/sql/records.cc:511
      #14 0x00005645273ab3a6 in READ_RECORD::read_record (this=0x6290002d0de8) at /data/src/10.5/sql/records.h:79
      #15 0x000056452769c5fe in sub_select (join=0x62b000089090, join_tab=0x6290002d0d20, end_of_records=false) at /data/src/10.5/sql/sql_select.cc:20624
      #16 0x000056452769a403 in do_select (join=0x62b000089090, procedure=0x0) at /data/src/10.5/sql/sql_select.cc:20139
      #17 0x000056452762852e in JOIN::exec_inner (this=0x62b000089090) at /data/src/10.5/sql/sql_select.cc:4463
      #18 0x0000564527625b80 in JOIN::exec (this=0x62b000089090) at /data/src/10.5/sql/sql_select.cc:4244
      #19 0x0000564527629a95 in mysql_select (thd=0x62b00007e288, tables=0x62b0000859d8, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x62b000089060, unit=0x62b000082290, select_lex=0x62b000085378) at /data/src/10.5/sql/sql_select.cc:4668
      #20 0x00005645275fbdd8 in handle_select (thd=0x62b00007e288, lex=0x62b0000821c8, result=0x62b000089060, setup_tables_done_option=0) at /data/src/10.5/sql/sql_select.cc:417
      #21 0x000056452756e126 in execute_sqlcom_select (thd=0x62b00007e288, all_tables=0x62b0000859d8) at /data/src/10.5/sql/sql_parse.cc:6168
      #22 0x000056452755c548 in mysql_execute_command (thd=0x62b00007e288) at /data/src/10.5/sql/sql_parse.cc:3901
      #23 0x0000564527579173 in mysql_parse (thd=0x62b00007e288, rawbuf=0x62b0000852a8 "SELECT * FROM performance_schema.metadata_locks", length=47, parser_state=0x7f91dd680a50, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:7953
      #24 0x000056452754ef63 in dispatch_command (command=COM_QUERY, thd=0x62b00007e288, packet=0x6290002b2289 "", packet_length=47, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:1839
      #25 0x000056452754b998 in do_command (thd=0x62b00007e288) at /data/src/10.5/sql/sql_parse.cc:1358
      #26 0x000056452796aeb1 in do_handle_one_connection (connect=0x61100003b808, put_in_cache=true) at /data/src/10.5/sql/sql_connect.cc:1422
      #27 0x000056452796a74c in handle_one_connection (arg=0x61100003b6c8) at /data/src/10.5/sql/sql_connect.cc:1319
      #28 0x0000564528609a06 in pfs_spawn_thread (arg=0x61600000f708) at /data/src/10.5/storage/perfschema/pfs.cc:2201
      #29 0x00007f91ec50ffa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
      #30 0x00007f91ebd5e4cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      No crash on a non-debug build.
      The test case is not applicable to 10.4 which doesn't have such a table in performance schema.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated: