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

Failed to discover table when using nested aggregation queries

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.1.14, 10.0, 10.1, 10.2
    • 10.2
    • None
    • 3.2.0-4-amd64 #1 SMP Debian 3.2.35-2 x86_64 GNU/Linux

    Description

      Scenario:

      Server-A:

      CREATE TABLE t (pps INT UNSIGNED);
      INSERT INTO t VALUES(4000000000), (4000000000);

      Server-B:

      CREATE TABLE d_test ENGINE=CONNECT TABLE_TYPE=MYSQL DBNAME=db OPTION_LIST='host=127.0.0.1,port=3337,user=user,password=password' SRCDEF='
      SELECT SUM(pps)
      FROM (SELECT SUM(pps) as pps FROM (
      SELECT SUM( pps ) as pps FROM t) t
      ) AS S1';

      Actual result:
      Engine CONNECT failed to discover table db.d_test

      The problem appears on the following conditions:
      1) Two nested queries
      2) Sum of values more than 4 bytes
      3) Using aggregate functions in nested queries (SUM, AVG).

      Attachments

        Activity

          People

            bertrandop Olivier Bertrand
            Sergey.Antonyuk Sergey Antonyuk
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.