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

Spurious results for a CONCAT statement that contains a CASE statement inside.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Cannot Reproduce
    • 5.5, 10.0, 10.1, 10.1.23, 10.2
    • N/A
    • Optimizer
    • GNU/Linux CentOS 7

    Description

      I have detected a query that contains subqueries with joins, concats and cases statements that generates spurious results.

      The problem is that the field computed by the CONCAT statement is living a bug related to the string management, overflow or something similar that causes outputs as the contained in the result.txt attached file.

      I have attached 4 files:

      • saltos.sql => contains a minimum schema and sufficient data to reproduce the issue.
      • query.sql => contains a simple query able to demostrate the problem.
      • result.txt => contains the result of execute the query.sql into saltos.sql.
      • expected.txt => contains the expected result.

      As a note:

      If you remove the WHERE statement or replace the "d.id id_usuario" by "e.id_usuario id_usuario" in the fields zone of the SELECT, then you get the expected result.

      I have tryed other versions of MariaDB. I have reproduced the issue in the follows releases: 10.1.14, 10.1.16, 10.1.21, 10.1.22 and 10.1.23

      Josep.

      Attachments

        1. expected.txt
          0.2 kB
        2. query.sql
          0.6 kB
        3. result.txt
          0.5 kB
        4. saltos.sql
          9 kB

        Activity

          People

            sanja Oleksandr Byelkin
            sanz Josep Sanz
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.