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

LP:998321 - Simple query with IF expression causes an assertion abort

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      The following simple query causes an assertion abort in MariaDB 5.1/5.2:

      SELECT if(1, (SELECT min('hello')), NULL);

      (see also bug#12620084 for mysql code line)

      Attachments

        Activity

          Re: Simple query with IF expression causes an assertion abort
          Problem is that cached_field_type of Item_func_if appeared to be MYSQL_TYPE_NULL...

          sanja Oleksandr Byelkin added a comment - Re: Simple query with IF expression causes an assertion abort Problem is that cached_field_type of Item_func_if appeared to be MYSQL_TYPE_NULL...

          Re: Simple query with IF expression causes an assertion abort
          Above caused by subselect reporting that it is constant and null_value is set in the tests:

          bool null1=args[1]>const_item() && args[1]>null_value;
          bool null2=args[2]>const_item() && args[2]>null_value;

          IMHO above tests are not correct: they should chec basic_constant_item or call is_null_value() method to really evaluate the item.

          sanja Oleksandr Byelkin added a comment - Re: Simple query with IF expression causes an assertion abort Above caused by subselect reporting that it is constant and null_value is set in the tests: bool null1=args [1] >const_item() && args [1] >null_value; bool null2=args [2] >const_item() && args [2] >null_value; IMHO above tests are not correct: they should chec basic_constant_item or call is_null_value() method to really evaluate the item.

          Launchpad bug id: 998321

          ratzpo Rasmus Johansson (Inactive) added a comment - Launchpad bug id: 998321

          People

            sanja Oleksandr Byelkin
            igor Igor Babaev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 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.