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

Multiple left join, group by query returns wrong result type

    XMLWordPrintable

Details

    Description

      The attached query run on the attached data file produces the following results:

      *************************** 1. row ***************************
                           id: NULL
                            a: 0.0000
                            b: NULL
                            c: NULL
                            d: 0.00000
                            e: NULL
      this_should_be_a_bigint: 2.3456
            what_it_should_be: 1
                            f: NULL
      *************************** 2. row ***************************
                           id: NULL
                            a: 0.0000
                            b: NULL
                            c: NULL
                            d: 0.00000
                            e: NULL
      this_should_be_a_bigint: 2.3456
            what_it_should_be: 1
                            f: NULL
      *************************** 3. row ***************************
                           id: NULL
                            a: 0.0000
                            b: NULL
                            c: NULL
                            d: 0.00000
                            e: NULL
      this_should_be_a_bigint: 2.3456
            what_it_should_be: 1
                            f: NULL
      3 rows in set (0.00 sec)
      

      Notice that the result column this_should_be_a_bigint returns a floating point number. This is wrong. The 2.3456 value suspiciously appears in an earlier column calculation in the query.

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              crystall Crystal Lemire
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.