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
    • 10.1.23, 5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL)
    • 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
          Josep Sanz
        2. query.sql
          0.6 kB
          Josep Sanz
        3. result.txt
          0.5 kB
          Josep Sanz
        4. saltos.sql
          9 kB
          Josep Sanz

        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.