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

JSON_TABLE: Server crashes in Query_cache::unlink_table

    XMLWordPrintable

Details

    Description

      Bugfix for MDEV-25186 is already in the tree, but the same test case still fails, although in a different way (as below).

      SET @qcache= @@global.query_cache_type;
       
      SET GLOBAL query_cache_type= ON;
      SET query_cache_type= ON;
       
      CREATE TABLE t (a INT);
      SELECT * FROM t JOIN JSON_TABLE('{}' , '$' COLUMNS(b FOR ORDINALITY)) AS jt;
      DROP TABLE t;
       
      # Cleanup
      SET GLOBAL query_cache_type= @qcache;
      

      bb-10.6-mdev17399-hf 49603a019

      #3  <signal handler called>
      #4  0x0000556e1f821c5a in Query_cache::unlink_table (this=0x556e23c5b8a0 <query_cache>, node=0x7f46a4545ac0) at /data/src/bb-10.6-mdev17399-hf/sql/sql_cache.cc:3619
      #5  0x0000556e1f81ddd1 in Query_cache::free_query_internal (this=0x556e23c5b8a0 <query_cache>, query_block=0x7f46a4545a68) at /data/src/bb-10.6-mdev17399-hf/sql/sql_cache.cc:2952
      #6  0x0000556e1f81e226 in Query_cache::free_query (this=0x556e23c5b8a0 <query_cache>, query_block=0x7f46a4545a68) at /data/src/bb-10.6-mdev17399-hf/sql/sql_cache.cc:3009
      #7  0x0000556e1f820078 in Query_cache::invalidate_query_block_list (this=0x556e23c5b8a0 <query_cache>, thd=0x62b000069288, list_root=0x7f46a4545ca0) at /data/src/bb-10.6-mdev17399-hf/sql/sql_cache.cc:3360
      #8  0x0000556e1f81ffef in Query_cache::invalidate_table_internal (this=0x556e23c5b8a0 <query_cache>, thd=0x62b000069288, key=0x62b0000387f9 "test", key_length=7) at /data/src/bb-10.6-mdev17399-hf/sql/sql_cache.cc:3336
      #9  0x0000556e1f81ff6e in Query_cache::invalidate_table (this=0x556e23c5b8a0 <query_cache>, thd=0x62b000069288, key=0x62b0000387f9 "test", key_length=7) at /data/src/bb-10.6-mdev17399-hf/sql/sql_cache.cc:3314
      #10 0x0000556e1f81fd4b in Query_cache::invalidate_table (this=0x556e23c5b8a0 <query_cache>, thd=0x62b000069288, table_list=0x62b000038380) at /data/src/bb-10.6-mdev17399-hf/sql/sql_cache.cc:3291
      #11 0x0000556e1f8190f4 in Query_cache::invalidate (this=0x556e23c5b8a0 <query_cache>, thd=0x62b000069288, tables_used=0x62b000038380, using_transactions=0 '\000') at /data/src/bb-10.6-mdev17399-hf/sql/sql_cache.cc:2248
      #12 0x0000556e1fbe76f2 in mysql_rm_table_no_locks (thd=0x62b000069288, tables=0x62b000038380, if_exists=false, drop_temporary=false, drop_view=false, drop_sequence=false, dont_log_query=false, dont_free_locks=false) at /data/src/bb-10.6-mdev17399-hf/sql/sql_table.cc:2722
      #13 0x0000556e1fbe4495 in mysql_rm_table (thd=0x62b000069288, tables=0x62b000038380, if_exists=false, drop_temporary=false, drop_sequence=false, dont_log_query=false) at /data/src/bb-10.6-mdev17399-hf/sql/sql_table.cc:2136
      #14 0x0000556e1f97b36c in mysql_execute_command (thd=0x62b000069288) at /data/src/bb-10.6-mdev17399-hf/sql/sql_parse.cc:4929
      #15 0x0000556e1f98fcb5 in mysql_parse (thd=0x62b000069288, rawbuf=0x62b0000382a8 "DROP TABLE t", length=12, parser_state=0x7f46a492c7b0) at /data/src/bb-10.6-mdev17399-hf/sql/sql_parse.cc:8000
      #16 0x0000556e1f9666f0 in dispatch_command (command=COM_QUERY, thd=0x62b000069288, packet=0x62900024e289 "DROP TABLE t", packet_length=12, blocking=true) at /data/src/bb-10.6-mdev17399-hf/sql/sql_parse.cc:1886
      #17 0x0000556e1f96342b in do_command (thd=0x62b000069288, blocking=true) at /data/src/bb-10.6-mdev17399-hf/sql/sql_parse.cc:1397
      #18 0x0000556e1fda4ecd in do_handle_one_connection (connect=0x61100000ad48, put_in_cache=true) at /data/src/bb-10.6-mdev17399-hf/sql/sql_connect.cc:1410
      #19 0x0000556e1fda482a in handle_one_connection (arg=0x61100000ac08) at /data/src/bb-10.6-mdev17399-hf/sql/sql_connect.cc:1312
      #20 0x0000556e20aaf17f in pfs_spawn_thread (arg=0x616000102a08) at /data/src/bb-10.6-mdev17399-hf/storage/perfschema/pfs.cc:2201
      #21 0x00007f46ae002609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #22 0x00007f46adbd6293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Attachments

        Issue Links

          Activity

            People

              holyfoot Alexey Botchkov
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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