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

Assertion `field.is_sane()' failed in Protocol_text::store_field_metadata

    XMLWordPrintable

Details

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

    Description

      CREATE TABLE t1 (b BIT(1));
      SELECT MIN( CASE WHEN 0 THEN b END ) FROM t1;
       
      # Cleanup
      DROP TABLE t1;
      

      10.5 18e10e89 debug

      mysqld: /data/src/10.5/sql/protocol.cc:810: bool Protocol_text::store_field_metadata(const THD*, const Send_field&, CHARSET_INFO*, uint): Assertion `field.is_sane()' failed.
      190904 21:16:05 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f84ee3f6f12 in __GI___assert_fail (assertion=0x557fcbcc05f9 "field.is_sane()", file=0x557fcbcc0308 "/data/src/10.5/sql/protocol.cc", line=810, function=0x557fcbcc0d60 <Protocol_text::store_field_metadata(THD const*, Send_field const&, charset_info_st const*, unsigned int)::__PRETTY_FUNCTION__> "bool Protocol_text::store_field_metadata(const THD*, const Send_field&, CHARSET_INFO*, uint)") at assert.c:101
      #8  0x0000557fcafaa08f in Protocol_text::store_field_metadata (this=0x7f84e85c8530, thd=0x7f84d8000b10, field=..., charset_for_protocol=0x557fcc7ad6c0 <my_charset_bin>, fieldnr=0) at /data/src/10.5/sql/protocol.cc:810
      #9  0x0000557fcafaac62 in Protocol_text::store_field_metadata (this=0x7f84e85c8530, thd=0x7f84d8000b10, item=0x7f84d8013bf0, pos=0) at /data/src/10.5/sql/protocol.cc:994
      #10 0x0000557fcafaa6c5 in Protocol::send_result_set_metadata (this=0x7f84d80010d8, list=0x7f84d80135b8, flags=3) at /data/src/10.5/sql/protocol.cc:911
      #11 0x0000557fcb0580cc in select_send::send_result_set_metadata (this=0x7f84d8014e10, list=..., flags=3) at /data/src/10.5/sql/sql_class.cc:2974
      #12 0x0000557fcb131e56 in return_zero_rows (join=0x7f84d8014e38, result=0x7f84d8014e10, tables=..., fields=..., send_row=true, select_options=2147748608, info=0x557fcbcfc548 "no matching row in const table", having=0x0, all_fields=...) at /data/src/10.5/sql/sql_select.cc:14200
      #13 0x0000557fcb1167c7 in JOIN::exec_inner (this=0x7f84d8014e38) at /data/src/10.5/sql/sql_select.cc:4355
      #14 0x0000557fcb115d88 in JOIN::exec (this=0x7f84d8014e38) at /data/src/10.5/sql/sql_select.cc:4209
      #15 0x0000557fcb11742d in mysql_select (thd=0x7f84d8000b10, tables=0x7f84d8013df0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f84d8014e10, unit=0x7f84d8004a40, select_lex=0x7f84d8013468) at /data/src/10.5/sql/sql_select.cc:4641
      #16 0x0000557fcb10780a in handle_select (thd=0x7f84d8000b10, lex=0x7f84d8004978, result=0x7f84d8014e10, setup_tables_done_option=0) at /data/src/10.5/sql/sql_select.cc:433
      #17 0x0000557fcb0d01fc in execute_sqlcom_select (thd=0x7f84d8000b10, all_tables=0x7f84d8013df0) at /data/src/10.5/sql/sql_parse.cc:6155
      #18 0x0000557fcb0c6df7 in mysql_execute_command (thd=0x7f84d8000b10) at /data/src/10.5/sql/sql_parse.cc:3904
      #19 0x0000557fcb0d4af7 in mysql_parse (thd=0x7f84d8000b10, rawbuf=0x7f84d80133a8 "SELECT MIN( CASE WHEN 0 THEN b END ) FROM t1", length=44, parser_state=0x7f84e85c9580, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:7934
      #20 0x0000557fcb0c10e1 in dispatch_command (command=COM_QUERY, thd=0x7f84d8000b10, packet=0x7f84d8137241 "", packet_length=44, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:1847
      #21 0x0000557fcb0bf8f4 in do_command (thd=0x7f84d8000b10) at /data/src/10.5/sql/sql_parse.cc:1364
      #22 0x0000557fcb24ee3c in do_handle_one_connection (connect=0x557fce081ca0, put_in_cache=true) at /data/src/10.5/sql/sql_connect.cc:1414
      #23 0x0000557fcb24eb6b in handle_one_connection (arg=0x557fcdfbc690) at /data/src/10.5/sql/sql_connect.cc:1309
      #24 0x0000557fcb7532f3 in pfs_spawn_thread (arg=0x557fcdfbc2f0) at /data/src/10.5/storage/perfschema/pfs.cc:1862
      #25 0x00007f84eff6b4a4 in start_thread (arg=0x7f84e85ca700) at pthread_create.c:456
      #26 0x00007f84ee4b3d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      No visible effect on a non-debug build.

      Appeared in 10.5 tree with this commit:

      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.