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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      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)

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            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...

            Show
            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...
            Hide
            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.

            Show
            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.
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 998321

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 998321

              People

              • Assignee:
                sanja Oleksandr Byelkin
                Reporter:
                igor Igor Babaev
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: