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

SIGFPE in row_search_with_covering_prefix

    XMLWordPrintable

Details

    Description

      May be a GIS issue, though is in InnoDB frame (row_search_with_covering_prefix), please check source. Thank you

      USE test;
      SET SQL_MODE='';
      SET GLOBAL innodb_prefix_index_cluster_optimization=1;
      CREATE TABLE t(c POINT GENERATED ALWAYS AS (POINT(1,1)) UNIQUE) ENGINE=InnoDB;
      INSERT t SET c=1;
      INSERT INTO t SELECT * FROM t WHERE c > (SELECT MAX(c) FROM t);
      

      Leads to:

      10.5.6 1c587481966abc7a9ad5309d0a91ca920f7a5657 (Debug)

      Core was generated by `/test/MD110820-mariadb-10.5.6-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGFPE, Arithmetic exception.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=8)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      [Current thread is 1 (Thread 0x1469d6ea6700 (LWP 3630278))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=8) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x000055912a5b1b86 in my_write_core (sig=sig@entry=8) at /test/10.5_dbg/mysys/stacktrace.c:519
      #2  0x0000559129d68d7b in handle_fatal_signal (sig=8) at /test/10.5_dbg/sql/signal_handler.cc:330
      #3  <signal handler called>
      #4  0x000055912a2e93af in row_search_with_covering_prefix (offsets=0x1469d6ea3a40, rec=0x1469b9dbc07f "", prebuilt=0x1469b296d098) at /test/10.5_dbg/storage/innobase/row/row0sel.cc:4122
      #5  row_search_mvcc (buf=buf@entry=0x1469b2857fa8 "\377", mode=PAGE_CUR_GE, prebuilt=0x1469b296d098, match_mode=<optimized out>, direction=direction@entry=0) at /test/10.5_dbg/storage/innobase/row/row0sel.cc:5223
      #6  0x000055912a13960a in ha_innobase::index_read (this=0x1469b294f0a0, buf=0x1469b2857fa8 "\377", key_ptr=0x1469b2976150 "", key_len=28, find_flag=HA_READ_KEY_OR_NEXT) at /test/10.5_dbg/storage/innobase/handler/ha_innodb.cc:8788
      #7  0x0000559129d83db4 in handler::index_read_map (this=0x1469b294f0a0, buf=0x1469b2857fa8 "\377", key=0x1469b2976150 "", keypart_map=<optimized out>, find_flag=HA_READ_KEY_OR_NEXT) at /test/10.5_dbg/sql/handler.h:3798
      #8  0x0000559129d72001 in handler::ha_index_read_map (this=this@entry=0x1469b294f0a0, buf=0x1469b2857fa8 "\377", key=0x1469b2976150 "", keypart_map=1, find_flag=HA_READ_KEY_OR_NEXT) at /test/10.5_dbg/sql/handler.cc:3117
      #9  0x0000559129d7a320 in handler::read_range_first (this=0x1469b294f0a0, start_key=0x1469b294f1a0, end_key=0x0, eq_range_arg=<optimized out>, sorted=<optimized out>) at /test/10.5_dbg/sql/handler.cc:6182
      #10 0x0000559129c5a95b in handler::multi_range_read_next (this=0x1469b294f0a0, range_info=range_info@entry=0x1469d6ea47d8) at /test/10.5_dbg/sql/multi_range_read.cc:516
      #11 0x0000559129c5a9e6 in Mrr_simple_index_reader::get_next (this=0x1469b294f6d0, range_info=0x1469d6ea47d8) at /test/10.5_dbg/sql/multi_range_read.cc:553
      #12 0x0000559129c5c846 in DsMrr_impl::dsmrr_next (this=0x1469b294f580, range_info=0x1469d6ea47d8) at /test/10.5_dbg/sql/multi_range_read.cc:1653
      #13 0x000055912a11fe04 in ha_innobase::multi_range_read_next (this=<optimized out>, range_info=<optimized out>) at /test/10.5_dbg/storage/innobase/handler/ha_innodb.cc:20333
      #14 0x0000559129ee8c70 in QUICK_RANGE_SELECT::get_next (this=0x1469b2810100) at /test/10.5_dbg/sql/opt_range.cc:12247
      #15 0x0000559129f123c0 in rr_quick (info=0x1469b2971190) at /test/10.5_dbg/sql/records.cc:403
      #16 0x0000559129b117c2 in READ_RECORD::read_record (this=0x1469b2971190) at /test/10.5_dbg/sql/records.h:80
      #17 join_init_read_record (tab=0x1469b29710c8) at /test/10.5_dbg/sql/sql_select.cc:21569
      #18 0x0000559129b009f1 in sub_select (join=0x1469b2877aa8, join_tab=0x1469b29710c8, end_of_records=<optimized out>) at /test/10.5_dbg/sql/sql_select.cc:20621
      #19 0x0000559129b3ab32 in do_select (procedure=0x0, join=0x1469b2877aa8) at /test/10.5_dbg/sql/sql_select.cc:20158
      #20 JOIN::exec_inner (this=this@entry=0x1469b2877aa8) at /test/10.5_dbg/sql/sql_select.cc:4450
      #21 0x0000559129b3b14d in JOIN::exec (this=this@entry=0x1469b2877aa8) at /test/10.5_dbg/sql/sql_select.cc:4231
      #22 0x0000559129b39449 in mysql_select (thd=thd@entry=0x1469b2815088, tables=<optimized out>, fields=@0x1469b28749f0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1469b2874e50, last = 0x1469b2874e50, elements = 1}, <No data fields>}, conds=0x1469b2876f10, og_num=0, order=<optimized out>, group=0x0, having=0x0, proc_param=0x0, select_options=2202244745984, result=0x1469b28779f0, unit=0x1469b28190a0, select_lex=0x1469b28748a0) at /test/10.5_dbg/sql/sql_select.cc:4655
      #23 0x0000559129b39778 in handle_select (thd=thd@entry=0x1469b2815088, lex=lex@entry=0x1469b2818fd8, result=result@entry=0x1469b28779f0, setup_tables_done_option=setup_tables_done_option@entry=1073741824) at /test/10.5_dbg/sql/sql_select.cc:417
      #24 0x0000559129abceab in mysql_execute_command (thd=thd@entry=0x1469b2815088) at /test/10.5_dbg/sql/sql_parse.cc:4692
      #25 0x0000559129ac7d4e in mysql_parse (thd=thd@entry=0x1469b2815088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1469d6ea5350, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7994
      #26 0x0000559129ab477e in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1469b2815088, packet=packet@entry=0x1469b2867089 "INSERT INTO t SELECT * FROM t WHERE c > (SELECT MAX(c) FROM t)", packet_length=packet_length@entry=62, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1867
      #27 0x0000559129ab2f58 in do_command (thd=0x1469b2815088) at /test/10.5_dbg/sql/sql_parse.cc:1348
      #28 0x0000559129c0fbc9 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x1469b5cd0808, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1410
      #29 0x0000559129c102e5 in handle_one_connection (arg=arg@entry=0x1469b5cd0808) at /test/10.5_dbg/sql/sql_connect.cc:1312
      #30 0x000055912a076572 in pfs_spawn_thread (arg=0x1469d3c46508) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
      #31 0x00001469d5e1f6db in start_thread (arg=0x1469d6ea6700) at pthread_create.c:463
      #32 0x00001469d521da3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.2.34 (dbg), 10.2.34 (opt), 10.3.25 (dbg), 10.3.25 (opt), 10.4.15 (dbg), 10.4.15 (opt), 10.5.6 (dbg), 10.5.6 (opt)

      Bug confirmed not present in:
      MariaDB: 10.1.47 (dbg), 10.1.47 (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)

      10.1 Gives:

      10.1.47 (Debug)

      10.1.47>CREATE TABLE t(c POINT GENERATED ALWAYS AS (POINT(1,1)) UNIQUE) ENGINE=InnoDB;
      ERROR 1904 (HY000): Key/Index cannot be defined on a non-stored computed column
      

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.