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

Server crashes in Item_func_not::fix_fields / LEX::get_dynamic_sql_string

    XMLWordPrintable

Details

    Description

      Note: Even though it's a non-debug crash, I'm setting it to minor because the query is artificial and the problem seems to have been fixed in the latest versions (10.4+).

      --error ER_BAD_FIELD_ERROR
      EXECUTE IMMEDIATE ! x;
      

      10.3 fd5c36be

      #3  <signal handler called>
      #4  0x0000560ccb4c3a17 in Item_func_not::fix_fields (this=0x7f6018012b18, thd=0x7f6018000af0, ref=0x0) at /data/src/10.3/sql/item_cmpfunc.cc:6118
      #5  0x0000560ccb04f12a in Item::fix_fields_if_needed (this=0x7f6018012b18, thd=0x7f6018000af0, ref=0x0) at /data/src/10.3/sql/item.h:823
      #6  0x0000560ccb04f157 in Item::fix_fields_if_needed_for_scalar (this=0x7f6018012b18, thd=0x7f6018000af0, ref=0x0) at /data/src/10.3/sql/item.h:827
      #7  0x0000560ccb179903 in LEX::get_dynamic_sql_string (this=0x7f60180048f8, dst=0x7f60298f6b50, buffer=0x7f60298f6ba0) at /data/src/10.3/sql/sql_prepare.cc:2693
      #8  0x0000560ccb179f92 in mysql_sql_stmt_execute_immediate (thd=0x7f6018000af0) at /data/src/10.3/sql/sql_prepare.cc:2878
      #9  0x0000560ccb1527c4 in mysql_execute_command (thd=0x7f6018000af0) at /data/src/10.3/sql/sql_parse.cc:3826
      #10 0x0000560ccb16007b in mysql_parse (thd=0x7f6018000af0, rawbuf=0x7f6018012960 "EXECUTE IMMEDIATE ! x", length=21, parser_state=0x7f60298f75e0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7817
      #11 0x0000560ccb14cc07 in dispatch_command (command=COM_QUERY, thd=0x7f6018000af0, packet=0x7f60181232a1 "EXECUTE IMMEDIATE ! x", packet_length=21, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1856
      #12 0x0000560ccb14b54f in do_command (thd=0x7f6018000af0) at /data/src/10.3/sql/sql_parse.cc:1401
      #13 0x0000560ccb2c30c8 in do_handle_one_connection (connect=0x560cceacea80) at /data/src/10.3/sql/sql_connect.cc:1403
      #14 0x0000560ccb2c2e2a in handle_one_connection (arg=0x560cceacea80) at /data/src/10.3/sql/sql_connect.cc:1308
      #15 0x0000560ccbc73368 in pfs_spawn_thread (arg=0x560cceab9070) at /data/src/10.3/storage/perfschema/pfs.cc:1869
      #16 0x00007f60316814a4 in start_thread (arg=0x7f60298f8700) at pthread_create.c:456
      #17 0x00007f602f7b5d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Reproducible on 10.2-10.3, debug and non-debug builds.
      Not reproducible on 10.4, 10.5.
      The test case is not applicable to 10.1.

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            elenst Elena Stepanova
            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.