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

crash/valgrind error in resolve_ref_in_select_and_group

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.6.3, 10.3(EOL), 10.4(EOL), 10.5, 10.6
    • N/A
    • None
    • Linux x64

    Description

      This segfaulted a release build. But run it in valgrind to see:

      errors in context 1 of 1:
      Conditional jump or move depends on uninitialised value(s)
      at: resolve_ref_in_select_and_group (item.cc:5409)
      by: Item_ref::fix_fields (item.cc:7910)
      by: fix_fields_if_needed (item.h:1144)
      by: Item_func::fix_fields (item_func.cc:347)
      by: fix_fields_if_needed (item.h:1144)
      by: fix_fields_if_needed_for_scalar (item.h:1148)
      by: fix_fields_if_needed_for_bool (item.h:1152)
      by: JOIN::prepare (sql_select.cc:1459)
      by: subselect_single_select_engine::prepare(item_subselect.cc:3895)
      by: Item_subselect::fix_fields (item_subselect.cc:295)
      by: fix_fields_if_needed (item.h:1144)
      by: fix_fields_if_needed_for_scalar (item.h:1148)
      by: fix_fields_if_needed_for_bool (item.h:1152)
      by: setup_conds (sql_base.cc:8444)
      by: setup_without_group (sql_select.cc:832)
      by: JOIN::prepare (sql_select.cc:1407)
      by: mysql_select (sql_select.cc:4958)
      by: mysql_multi_update (sql_update.cc:1968)
      by: mysql_execute_command (sql_parse.cc:4499)
      by: mysql_parse (sql_parse.cc:8026)
      

      Testcase

       
      drop table if exists t;
      create table t (a blob,  b text ) engine=innodb;
      update t  set  a =current_timestamp 
      where exists 
      (
       select b from  t
       where @b:=a
       having a  >  72057594037927936
      );
      

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              sbester1 sbester1
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.