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

Incorrect SQL result when renaming column in a subquery (possibly with GROUP BY)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.3.7, 10.2, 10.3
    • 10.2.16
    • Optimizer
    • None
    • Debian Jessie

    Description

      Hi!

      In one of our production installations MariaDB 10.3.7 fails to filter rows correctly after upgrading from 5.5, in a case similar to the following:

      create table tbl (a int, b varchar(255));
      insert into tbl values (1, 'abc');
      select * from (select 'abc' a, a b from tbl) t where a='abc';
      

      It seems that MariaDB pushes the outer 'where' condition inside, takes the value type from tbl.a, thinks ='abc' should be an integer, issues an 'incorrect integer value' and returns 0 rows.

      The issue still reproduces on our installation. However, I can't reproduce it from scratch using the script above.

      So...
      1) can you suggest me how to reproduce it so you could fix it?
      2) did I miss something during the upgrade?

      Attachments

        Activity

          People

            shagalla Galina Shalygina (Inactive)
            vitalif Vitaliy Filippov
            Votes:
            2 Vote for this issue
            Watchers:
            7 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.