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

[Draft] Wrong result upon query from a view

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 12.0(EOL), 12.3
    • N/A
    • Optimizer
    • None

    Description

      Reproducible on 12.0+, needs simplification.
      The attached test file loads the whole database dump (test database, nothing confidential) with three queries at the end. Better run with --nocheck-testcases, to avoid noise.

      main 21a0714a118614982d20bfa504763d7247800091

      SELECT alias1.`col_int_key` AS ifield1 FROM outer_join_db.view_B AS alias1 WHERE ( alias1.`col_varchar_10_utf8_key` IN ('USA', 'USA') OR ( alias1.`col_int_key` BETWEEN 91 AND ( 91 + 229 ) OR ( alias1.`pk` > 91 AND alias1.`col_int_key` < ( 91 + 190 ) OR alias1.`col_varchar_10_latin1` < 'q' ) ) ) GROUP BY ifield1 HAVING ifield1 != 7 ORDER BY ifield1;
      ifield1
      SET optimizer_switch = REPLACE(REPLACE( @@optimizer_switch, '=on', '=off' ), 'in_to_exists=off', 'in_to_exists=on');
      SELECT alias1.`col_int_key` AS ifield1 FROM outer_join_db.view_B AS alias1 WHERE ( alias1.`col_varchar_10_utf8_key` IN ('USA', 'USA') OR ( alias1.`col_int_key` BETWEEN 91 AND ( 91 + 229 ) OR ( alias1.`pk` > 91 AND alias1.`col_int_key` < ( 91 + 190 ) OR alias1.`col_varchar_10_latin1` < 'q' ) ) ) GROUP BY ifield1 HAVING ifield1 != 7 ORDER BY ifield1;
      ifield1
      8
      

      Attachments

        1. 358-27.test
          4.61 MB
          Elena Stepanova

        Activity

          People

            elenst Elena Stepanova
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.