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

SIGSEGV in Item::val_uint on EXPLAIN (optimized builds)

    XMLWordPrintable

    Details

      Description

      USE test;
      SET GLOBAL GENERAL_LOG=ON;
      SET GLOBAL log_output="FILE,TABLE";
      CREATE TABLE t(a DATE);
      EXPLAIN SELECT * FROM t LIMIT ROWS EXAMINED 0;
      SELECT 1;
      

      Leads to:

      10.5.3 f544a712c8a2ef3f3ecba80cb2782b1839fb36ab

      Core was generated by `/test/MD010520-mariadb-10.5.3-linux-x86_64-opt/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:57
      [Current thread is 1 (Thread 0x7f8d71970700 (LWP 1539686))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x000055c976d84ac7 in my_write_core (sig=sig@entry=11) at /test/10.5_opt/mysys/stacktrace.c:518
      #2  0x000055c9767467ca in handle_fatal_signal (sig=11) at /test/10.5_opt/sql/signal_handler.cc:329
      #3  <signal handler called>
      #4  Item::val_uint (this=0x0) at /test/10.5_opt/sql/item.h:1282
      #5  handle_select (thd=thd@entry=0x7f8d3d812018, lex=lex@entry=0x7f8d3d815da0, result=result@entry=0x7f8d3d847eb8, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.5_opt/sql/sql_select.cc:442
      #6  0x000055c976555171 in execute_sqlcom_select (thd=thd@entry=0x7f8d3d812018, all_tables=0x0) at /test/10.5_opt/sql/sql_parse.cc:6172
      #7  0x000055c976551092 in mysql_execute_command (thd=thd@entry=0x7f8d3d812018) at /test/10.5_opt/sql/sql_parse.cc:3901
      #8  0x000055c97655822c in mysql_parse (thd=0x7f8d3d812018, rawbuf=<optimized out>, length=8, parser_state=0x7f8d7196f4d0, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.5_opt/sql/sql_parse.cc:7957
      #9  0x000055c97654d855 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f8d3d812018, packet=packet@entry=0x7f8d3d83a019 "", packet_length=packet_length@entry=8, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_opt/sql/sql_parse.cc:1839
      #10 0x000055c97654bae6 in do_command (thd=0x7f8d3d812018) at /test/10.5_opt/sql/sql_parse.cc:1358
      #11 0x000055c97664029e in do_handle_one_connection (connect=<optimized out>, connect@entry=0x7f8d6f4329b8, put_in_cache=put_in_cache@entry=true) at /test/10.5_opt/sql/sql_connect.cc:1422
      #12 0x000055c976640444 in handle_one_connection (arg=arg@entry=0x7f8d6f4329b8) at /test/10.5_opt/sql/sql_connect.cc:1319
      #13 0x000055c9769ac53a in pfs_spawn_thread (arg=0x7f8d6f44b018) at /test/10.5_opt/storage/perfschema/pfs.cc:2201
      #14 0x00007f8d70d976db in start_thread (arg=0x7f8d71970700) at pthread_create.c:463
      #15 0x00007f8d7019588f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.2.32 (dbg), 10.2.32 (opt), 10.3.23 (dbg), 10.3.23 (opt), 10.4.13 (dbg), 10.4.13 (opt), 10.5.2 (dbg), 10.5.2 (opt), 10.5.3 (dbg), 10.5.3 (opt)

      Bug confirmed not present in:
      MariaDB: 10.1.45 (dbg), 10.1.45 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

        Attachments

          Activity

            People

            Assignee:
            sanja Oleksandr Byelkin
            Reporter:
            Roel Roel Van de Paar
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated: