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

Assertion `using_unique_constraint || group_buff <= param->group_buff + param->group_length' failed in create_tmp_table

    XMLWordPrintable

Details

    • 10.2.10

    Description

      CREATE TABLE t1 (i INT);
      INSERT INTO t1 VALUES (1),(2);
       
      SELECT * FROM ( 
        SELECT 
          ROW_NUMBER() OVER(), i
          FROM t1
          WHERE 1=0
          GROUP BY i
      ) AS sq
      ;  
      

      10.2 bc75c57cfc18be64f167d91c431076f581b0382b

      mysqld: /data/src/10.2/sql/sql_select.cc:17043: TABLE* create_tmp_table(THD*, TMP_TABLE_PARAM*, List<Item>&, ORDER*, bool, bool, ulonglong, ha_rows, const char*, bool, bool): Assertion `using_unique_constraint || group_buff <= param->group_buff + param->group_length' failed.
      170719 19:47:10 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007feb6f73f312 in __GI___assert_fail (assertion=0x7feb72a6b188 "using_unique_constraint || group_buff <= param->group_buff + param->group_length", file=0x7feb72a69bc8 "/data/src/10.2/sql/sql_select.cc", line=17043, function=0x7feb72a6d700 <create_tmp_table(THD*, TMP_TABLE_PARAM*, List<Item>&, st_order*, bool, bool, unsigned long long, unsigned long long, char const*, bool, bool)::__PRETTY_FUNCTION__> "TABLE* create_tmp_table(THD*, TMP_TABLE_PARAM*, List<Item>&, ORDER*, bool, bool, ulonglong, ha_rows, const char*, bool, bool)") at assert.c:101
      #8  0x00007feb72062e1c in create_tmp_table (thd=0x7feb58000b00, param=0x7feb58015b90, fields=..., group=0x7feb58013e90, distinct=false, save_sum_fields=false, select_options=2416184064, rows_limit=18446744073709551615, table_alias=0x7feb72a695e4 "", do_not_open=true, keep_row_order=false) at /data/src/10.2/sql/sql_select.cc:17042
      #9  0x00007feb7203e1f9 in JOIN::create_postjoin_aggr_table (this=0x7feb58014c58, tab=0x7feb580157e0, table_fields=0x7feb58014f78, table_group=0x7feb58013e90, save_sum_fields=false, distinct=false, keep_row_order=false) at /data/src/10.2/sql/sql_select.cc:2835
      #10 0x00007feb7203c58f in JOIN::make_aggr_tables_info (this=0x7feb58014c58) at /data/src/10.2/sql/sql_select.cc:2405
      #11 0x00007feb7203b83c in JOIN::optimize_inner (this=0x7feb58014c58) at /data/src/10.2/sql/sql_select.cc:2183
      #12 0x00007feb72037bb9 in JOIN::optimize (this=0x7feb58014c58) at /data/src/10.2/sql/sql_select.cc:1085
      #13 0x00007feb71fc8aaa in mysql_derived_optimize (thd=0x7feb58000b00, lex=0x7feb58004520, derived=0x7feb58013f28) at /data/src/10.2/sql/sql_derived.cc:890
      #14 0x00007feb71fc73ba in mysql_handle_single_derived (lex=0x7feb58004520, derived=0x7feb58013f28, phases=4) at /data/src/10.2/sql/sql_derived.cc:197
      #15 0x00007feb7203896c in JOIN::optimize_inner (this=0x7feb58014630) at /data/src/10.2/sql/sql_select.cc:1337
      #16 0x00007feb72037bb9 in JOIN::optimize (this=0x7feb58014630) at /data/src/10.2/sql/sql_select.cc:1085
      #17 0x00007feb72040b0c in mysql_select (thd=0x7feb58000b00, tables=0x7feb58013f28, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7feb58014610, unit=0x7feb580045e8, select_lex=0x7feb58004d20) at /data/src/10.2/sql/sql_select.cc:3658
      #18 0x00007feb720354ea in handle_select (thd=0x7feb58000b00, lex=0x7feb58004520, result=0x7feb58014610, setup_tables_done_option=0) at /data/src/10.2/sql/sql_select.cc:373
      #19 0x00007feb720013c8 in execute_sqlcom_select (thd=0x7feb58000b00, all_tables=0x7feb58013f28) at /data/src/10.2/sql/sql_parse.cc:6443
      #20 0x00007feb71ff7407 in mysql_execute_command (thd=0x7feb58000b00) at /data/src/10.2/sql/sql_parse.cc:3458
      #21 0x00007feb72004d88 in mysql_parse (thd=0x7feb58000b00, rawbuf=0x7feb58012378 "SELECT * FROM ( \nSELECT \nROW_NUMBER() OVER(), i\nFROM t1\nWHERE 1=0\nGROUP BY i\n) AS sq", length=84, parser_state=0x7feb69bee200, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7879
      #22 0x00007feb71ff2e34 in dispatch_command (command=COM_QUERY, thd=0x7feb58000b00, packet=0x7feb58168011 "SELECT * FROM ( \nSELECT \nROW_NUMBER() OVER(), i\nFROM t1\nWHERE 1=0\nGROUP BY i\n) AS sq\n", packet_length=85, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1817
      #23 0x00007feb71ff1775 in do_command (thd=0x7feb58000b00) at /data/src/10.2/sql/sql_parse.cc:1362
      #24 0x00007feb7213d4e7 in do_handle_one_connection (connect=0x7feb74c15760) at /data/src/10.2/sql/sql_connect.cc:1354
      #25 0x00007feb7213d274 in handle_one_connection (arg=0x7feb74c15760) at /data/src/10.2/sql/sql_connect.cc:1260
      #26 0x00007feb72484922 in pfs_spawn_thread (arg=0x7feb74cb7f40) at /data/src/10.2/storage/perfschema/pfs.cc:1862
      #27 0x00007feb71614064 in start_thread (arg=0x7feb69bef700) at pthread_create.c:309
      #28 0x00007feb6f7f962d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      Attachments

        Issue Links

          Activity

            People

              psergei Sergei Petrunia
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.