Details

    • Type: Bug
    • Status: Confirmed (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.2, 10.3, 10.4, 10.2.23, 10.3.14
    • Fix Version/s: 10.2, 10.3, 10.4
    • Component/s: None
    • Labels:
      None
    • Environment:
      CentOS (generic linux)

      Description

      Example query in MySQL:

       
      mysql> select val from (SELECT val from (SELECT val    FROM ( SELECT SUM(1) AS val ) AS tab1 ) as tab2 ) as tab3   WHERE val IS NOT NULL;
      +------+
      | val  |
      +------+
      |    1 |
      +------+
      1 row in set (0,00 sec)
      

      Wrong result in MariaDB:

      MariaDB [(none)]> select val from (SELECT val from (SELECT val    FROM ( SELECT SUM(1) AS val ) AS tab1 ) as tab2 ) as tab3   WHERE val IS NOT NULL;
      Empty set (0.001 sec)
      

      but adding any limit clause, makes it "work":

      MariaDB [(none)]> select val from (SELECT val from (SELECT val    FROM ( SELECT SUM(1) AS val limit 100000) AS tab1 ) as tab2 ) as tab3   WHERE val IS NOT NULL; 
      +------+
      | val  |
      +------+
      |    1 |
      +------+
      1 row in set (0.001 sec)
      

        Attachments

          Activity

            People

            • Assignee:
              igor Igor Babaev
              Reporter:
              fmessineo Frank Messineo
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: