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

Assertion `0' failed in virtual void Item_sum_field::set_result_field(Field*)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.1
    • Fix Version/s: 10.1.18
    • Component/s: OTHER
    • Labels:
      None
    • Sprint:
      10.1.18

      Description

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (i INT) ENGINE=InnoDB;
       
      SELECT DISTINCT STDDEV(1) FROM t1
      GROUP BY i 
      ORDER BY BENCHMARK(0, BIT_XOR(i));
      

      Stack trace from 10.1 commit a8c2f68fb8c7915317b12236c21a35bdd41d2092

      mysqld: /data/src/10.1/sql/item_sum.h:1087: virtual void Item_sum_field::set_result_field(Field*): Assertion `0' failed.
      160813 23:56:27 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f9093aaf312 in __GI___assert_fail (assertion=0x7f9096c959e8 "0", file=0x7f9096c95a1e "/data/src/10.1/sql/item_sum.h", line=1087, function=0x7f9096c96920 <Item_sum_field::set_result_field(Field*)::__PRETTY_FUNCTION__> "virtual void Item_sum_field::set_result_field(Field*)") at assert.c:101
      #8  0x00007f90965ac9a5 in Item_sum_field::set_result_field (this=0x7f907dd9bc98) at /data/src/10.1/sql/item_sum.h:1087
      #9  0x00007f90963181e0 in create_tmp_field_from_item (thd=0x7f908a3b2070, item=0x7f907dd9bc98, table=0x7f907df23088, copy_func=0x7f90971f9f78, modify_item=true) at /data/src/10.1/sql/sql_select.cc:15912
      #10 0x00007f9096318853 in create_tmp_field (thd=0x7f908a3b2070, table=0x7f907df23088, item=0x7f907dd9bc98, type=Item::FIELD_STD_ITEM, copy_func=0x7f90971f9f78, from_field=0x7f907df24178, default_field=0x7f907df24140, group=false, modify_item=true, table_cant_handle_bit_fields=false, make_copy_field=false) at /data/src/10.1/sql/sql_select.cc:16123
      #11 0x00007f9096319c2c in create_tmp_table (thd=0x7f908a3b2070, param=0x7f907dd9b728, fields=..., group=0x0, distinct=true, save_sum_fields=true, select_options=2147748609, rows_limit=18446744073709551615, table_alias=0x7f9096bd4f4f "", do_not_open=false, keep_row_order=false) at /data/src/10.1/sql/sql_select.cc:16497
      #12 0x00007f90962f7672 in JOIN::exec_inner (this=0x7f907dd99030) at /data/src/10.1/sql/sql_select.cc:2886
      #13 0x00007f90962f5fcd in JOIN::exec (this=0x7f907dd99030) at /data/src/10.1/sql/sql_select.cc:2504
      #14 0x00007f90962f953b in mysql_select (thd=0x7f908a3b2070, rref_pointer_array=0x7f908a3b6400, tables=0x7f907dd983d0, wild_num=0, fields=..., conds=0x0, og_num=2, order=0x7f907dd98f00, group=0x7f907dd98ad0, having=0x0, proc_param=0x0, select_options=2147748609, result=0x7f907dd99010, unit=0x7f908a3b5a88, select_lex=0x7f908a3b6188) at /data/src/10.1/sql/sql_select.cc:3437
      #15 0x00007f90962ef02c in handle_select (thd=0x7f908a3b2070, lex=0x7f908a3b59c0, result=0x7f907dd99010, setup_tables_done_option=0) at /data/src/10.1/sql/sql_select.cc:384
      #16 0x00007f90962bf382 in execute_sqlcom_select (thd=0x7f908a3b2070, all_tables=0x7f907dd983d0) at /data/src/10.1/sql/sql_parse.cc:5894
      #17 0x00007f90962b528f in mysql_execute_command (thd=0x7f908a3b2070) at /data/src/10.1/sql/sql_parse.cc:2960
      #18 0x00007f90962c2aba in mysql_parse (thd=0x7f908a3b2070, rawbuf=0x7f907dd98088 "SELECT DISTINCT STDDEV(1) FROM t1\nGROUP BY i \nORDER BY BENCHMARK(0, BIT_XOR(i))", length=79, parser_state=0x7f90971fb5e0) at /data/src/10.1/sql/sql_parse.cc:7314
      #19 0x00007f90962b14e4 in dispatch_command (command=COM_QUERY, thd=0x7f908a3b2070, packet=0x7f908c29b071 "SELECT DISTINCT STDDEV(1) FROM t1\nGROUP BY i \nORDER BY BENCHMARK(0, BIT_XOR(i))", packet_length=79) at /data/src/10.1/sql/sql_parse.cc:1486
      #20 0x00007f90962b021b in do_command (thd=0x7f908a3b2070) at /data/src/10.1/sql/sql_parse.cc:1107
      #21 0x00007f90963e5e45 in do_handle_one_connection (thd_arg=0x7f908a3b2070) at /data/src/10.1/sql/sql_connect.cc:1350
      #22 0x00007f90963e5ba9 in handle_one_connection (arg=0x7f908a3b2070) at /data/src/10.1/sql/sql_connect.cc:1262
      #23 0x00007f90966c71a4 in pfs_spawn_thread (arg=0x7f908c2d61f0) at /data/src/10.1/storage/perfschema/pfs.cc:1860
      #24 0x00007f90959b10a4 in start_thread (arg=0x7f90971fcb00) at pthread_create.c:309
      #25 0x00007f9093b6987d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      10.2 is also affected.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bar Alexander Barkov
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: