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

SIGSEGVin calculate_key_len from handler::index_read_map

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Trivial
    • Resolution: Unresolved
    • 10.2, 10.3, 10.4, 10.5, 10.6
    • 10.4, 10.5, 10.6
    • Stored routines
    • None

    Description

      USE mysql;
      SELECT 1 INTO OUTFILE 'a' FROM DUAL;
      DROP DATABASE mysql;
      CREATE TABLE func (c INT) ENGINE=InnoDB;
      DROP FUNCTION f;
      

      (Note line 3 outcome: can't rmdir './mysql', errno: 39 "Directory not empty")

      Leads to:

      10.6.0 03ff588d153f22f00ff00923e82498cbac63505f (Debug)

      Core was generated by `/test/MD060321-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x1457d404a700 (LWP 4515))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055ac9932b3f3 in my_write_core (sig=sig@entry=11) at /test/10.6_dbg/mysys/stacktrace.c:424
      #2  0x000055ac98ad0195 in handle_fatal_signal (sig=11) at /test/10.6_dbg/sql/signal_handler.cc:331
      #3  <signal handler called>
      #4  calculate_key_len (table=0x14578401ea18, key=0, buf=buf@entry=0x145784041ca9 "", keypart_map=18446744073709551615) at /test/10.6_dbg/sql/table.cc:4891
      #5  0x000055ac98aeae32 in handler::index_read_map (this=0x145784020650, buf=0x145784041ca8 "\377", key=0x145784041ca9 "", keypart_map=<optimized out>, find_flag=HA_READ_KEY_EXACT) at /test/10.6_dbg/sql/handler.h:3847
      #6  0x000055ac98ad25b4 in handler::index_read_idx_map (this=0x145784020650, buf=0x145784041ca8 "\377", index=<optimized out>, key=0x145784041ca9 "", keypart_map=18446744073709551615, find_flag=HA_READ_KEY_EXACT) at /test/10.6_dbg/sql/handler.cc:6410
      #7  0x000055ac98ad94a2 in handler::ha_index_read_idx_map (this=0x145784020650, buf=0x145784041ca8 "\377", index=index@entry=0, key=0x145784041ca9 "", keypart_map=keypart_map@entry=18446744073709551615, find_flag=find_flag@entry=HA_READ_KEY_EXACT) at /test/10.6_dbg/sql/handler.cc:3152
      #8  0x000055ac988f6a9e in find_udf_in_table (exact_name=@0x145784013c18: {str = 0x145784013bf8 "f", length = 1}, table=table@entry=0x14578401ea18) at /test/10.6_dbg/sql/sql_udf.cc:449
      #9  0x000055ac988f6be8 in find_udf_everywhere (thd=thd@entry=0x145784000db8, name=@0x145784013c18: {str = 0x145784013bf8 "f", length = 1}, table=table@entry=0x14578401ea18) at /test/10.6_dbg/sql/sql_udf.cc:746
      #10 0x000055ac988f849b in mysql_drop_function (thd=0x145784000db8, udf_name=0x145784013c18) at /test/10.6_dbg/sql/sql_udf.cc:675
      #11 0x000055ac988080c9 in drop_routine (thd=thd@entry=0x145784000db8, lex=lex@entry=0x145784004ec0) at /test/10.6_dbg/sql/sql_parse.cc:6499
      #12 0x000055ac98815aaa in mysql_execute_command (thd=thd@entry=0x145784000db8) at /test/10.6_dbg/sql/sql_parse.cc:5715
      #13 0x000055ac987fd1d7 in mysql_parse (thd=thd@entry=0x145784000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1457d4049410) at /test/10.6_dbg/sql/sql_parse.cc:7998
      #14 0x000055ac9880bb03 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x145784000db8, packet=packet@entry=0x14578400b339 "DROP FUNCTION f", packet_length=packet_length@entry=15, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1318
      #15 0x000055ac9880eede in do_command (thd=0x145784000db8, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1397
      #16 0x000055ac98967c8e in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55ac9c8690a8, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
      #17 0x000055ac98968293 in handle_one_connection (arg=arg@entry=0x55ac9c8690a8) at /test/10.6_dbg/sql/sql_connect.cc:1312
      #18 0x000055ac98e11ce9 in pfs_spawn_thread (arg=0x55ac9c78dcb8) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #19 0x00001457d49d8609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #20 0x00001457d45c7293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.2.38 (dbg), 10.2.38 (opt), 10.3.29 (dbg), 10.3.29 (opt), 10.4.19 (dbg), 10.4.19 (opt), 10.5.10 (dbg), 10.5.10 (opt), 10.6.0 (dbg), 10.6.0 (opt)

      Bug (or feature/syntax) confirmed not present in:
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.33 (dbg), 5.7.33 (opt), 8.0.23 (dbg), 8.0.23 (opt)

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            Roel Roel Van de Paar
            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.