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

Assertion `is_unsigned() == attr.unsigned_flag' failed in Type_handler_longlong::make_table_field

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.5
    • 10.5.0
    • Data types
    • None

    Description

      CREATE TABLE t (a INT);
      INSERT INTO t VALUES (1),(2);
      SELECT DISTINCT 1 FROM t GROUP BY 0 >> NULL WITH ROLLUP;
       
      # Cleanup
      DROP TABLE t;
      

      10.5 6073049a

      mysqld: /data/src/10.5/sql/sql_type.cc:3339: virtual Field* Type_handler_longlong::make_table_field(MEM_ROOT*, const LEX_CSTRING*, const Record_addr&, const Type_all_attributes&, TABLE*) const: Assertion `is_unsigned() == attr.unsigned_flag' failed.
      190816 13:56:47 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f3e76515f12 in __GI___assert_fail (assertion=0x563f6825b988 "is_unsigned() == attr.unsigned_flag", file=0x563f6825ab90 "/data/src/10.5/sql/sql_type.cc", line=3339, function=0x563f6825dec0 <Type_handler_longlong::make_table_field(st_mem_root*, st_mysql_const_lex_string const*, Record_addr const&, Type_all_attributes const&, TABLE*) const::__PRETTY_FUNCTION__> "virtual Field* Type_handler_longlong::make_table_field(MEM_ROOT*, const LEX_CSTRING*, const Record_addr&, const Type_all_attributes&, TABLE*) const") at assert.c:101
      #8  0x0000563f677e0c1c in Type_handler_longlong::make_table_field (this=0x563f68c8ac60 <type_handler_ulonglong>, root=0x7f3e600663f8, name=0x7f3e60016a90, addr=..., attr=..., table=0x7f3e60065728) at /data/src/10.5/sql/sql_type.cc:3339
      #9  0x0000563f677e064a in Type_handler::make_and_init_table_field (this=0x563f68c8ac60 <type_handler_ulonglong>, root=0x7f3e600663f8, name=0x7f3e60016a90, addr=..., attr=..., table=0x7f3e60065728) at /data/src/10.5/sql/sql_type.cc:3268
      #10 0x0000563f674ae1c1 in Item::tmp_table_field_from_field_type (this=0x7f3e60016a38, root=0x7f3e600663f8, table=0x7f3e60065728) at /data/src/10.5/sql/item.h:809
      #11 0x0000563f6763a19c in Item_result_field::create_tmp_field_ex (this=0x7f3e60016a38, root=0x7f3e600663f8, table=0x7f3e60065728, src=0x7f3e706e6970, param=0x7f3e706e6964) at /data/src/10.5/sql/sql_select.cc:17700
      #12 0x0000563f6763a459 in create_tmp_field (table=0x7f3e60065728, item=0x7f3e60016a38, copy_func=0x7f3e706e6a18, from_field=0x7f3e60066ab0, default_field=0x7f3e60066a90, group=false, modify_item=true, table_cant_handle_bit_fields=false, make_copy_field=false) at /data/src/10.5/sql/sql_select.cc:17775
      #13 0x0000563f6763bb46 in Create_tmp_table::add_fields (this=0x7f3e706e6b10, thd=0x7f3e60000b10, table=0x7f3e60065728, param=0x7f3e60016ea0, fields=...) at /data/src/10.5/sql/sql_select.cc:18223
      #14 0x0000563f6763e1f0 in create_tmp_table (thd=0x7f3e60000b10, param=0x7f3e60016ea0, fields=..., group=0x0, distinct=false, save_sum_fields=true, select_options=2147748609, rows_limit=18446744073709551615, table_alias=0x563f68b37260 <empty_clex_str>, do_not_open=true, keep_row_order=false) at /data/src/10.5/sql/sql_select.cc:18818
      #15 0x0000563f67613cbd in JOIN::create_postjoin_aggr_table (this=0x7f3e60014be8, tab=0x7f3e600162c8, table_fields=0x7f3e60014f08, table_group=0x0, save_sum_fields=true, distinct=false, keep_row_order=false) at /data/src/10.5/sql/sql_select.cc:3681
      #16 0x0000563f676123d6 in JOIN::make_aggr_tables_info (this=0x7f3e60014be8) at /data/src/10.5/sql/sql_select.cc:3278
      #17 0x0000563f67610de9 in JOIN::optimize_stage2 (this=0x7f3e60014be8) at /data/src/10.5/sql/sql_select.cc:2922
      #18 0x0000563f6760e6a6 in JOIN::optimize_inner (this=0x7f3e60014be8) at /data/src/10.5/sql/sql_select.cc:2220
      #19 0x0000563f6760c208 in JOIN::optimize (this=0x7f3e60014be8) at /data/src/10.5/sql/sql_select.cc:1563
      #20 0x0000563f67617014 in mysql_select (thd=0x7f3e60000b10, tables=0x7f3e600139c8, wild_num=0, fields=..., conds=0x0, og_num=1, order=0x0, group=0x7f3e60014288, having=0x0, proc_param=0x0, select_options=2147748609, result=0x7f3e60014bc0, unit=0x7f3e60004a40, select_lex=0x7f3e60013478) at /data/src/10.5/sql/sql_select.cc:4592
      #21 0x0000563f67607682 in handle_select (thd=0x7f3e60000b10, lex=0x7f3e60004978, result=0x7f3e60014bc0, setup_tables_done_option=0) at /data/src/10.5/sql/sql_select.cc:425
      #22 0x0000563f675d0a94 in execute_sqlcom_select (thd=0x7f3e60000b10, all_tables=0x7f3e600139c8) at /data/src/10.5/sql/sql_parse.cc:6335
      #23 0x0000563f675c6992 in mysql_execute_command (thd=0x7f3e60000b10) at /data/src/10.5/sql/sql_parse.cc:3898
      #24 0x0000563f675d47fc in mysql_parse (thd=0x7f3e60000b10, rawbuf=0x7f3e600133a8 "SELECT DISTINCT 1 FROM t GROUP BY 0 >> NULL WITH ROLLUP", length=55, parser_state=0x7f3e706e8170, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:7884
      #25 0x0000563f675c0b88 in dispatch_command (command=COM_QUERY, thd=0x7f3e60000b10, packet=0x7f3e60137221 "SELECT DISTINCT 1 FROM t GROUP BY 0 >> NULL WITH ROLLUP", packet_length=55, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:1843
      #26 0x0000563f675bf2ce in do_command (thd=0x7f3e60000b10) at /data/src/10.5/sql/sql_parse.cc:1360
      #27 0x0000563f6774c30a in do_handle_one_connection (connect=0x563f6a9d7bf0, put_in_cache=true) at /data/src/10.5/sql/sql_connect.cc:1414
      #28 0x0000563f6774c039 in handle_one_connection (arg=0x563f6a9d7bf0) at /data/src/10.5/sql/sql_connect.cc:1309
      #29 0x0000563f67c4fbeb in pfs_spawn_thread (arg=0x563f6a9417a0) at /data/src/10.5/storage/perfschema/pfs.cc:1862
      #30 0x00007f3e7808a4a4 in start_thread (arg=0x7f3e706e9700) at pthread_create.c:456
      #31 0x00007f3e765d2d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      commit 6073049a3675363f7d7efe26f47525b528be9e2f
      Author: Alexander Barkov
      Date:   Thu Aug 15 13:16:00 2019 +0400
       
          MDEV-20353 Add separate type handlers for unsigned integer data types
      

      Attachments

        Activity

          People

            bar Alexander Barkov
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.