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

Spider: ERROR 1056 (42000): Can't group on 'min(`c`)', Got error 1056 when reading table

    XMLWordPrintable

Details

    Description

      Consider:

      CREATE TABLE t2 (c INT KEY) ENGINE=InnoDB;
      LOCK TABLE t2 READ;
      SELECT 1 FROM t2 GROUP BY 1;
      

      Gives:

      11.2.5 03807c8449cdccbf5b8afc0dddabb1d8ec7ba85a (Optimized)

      11.2.5-opt>SELECT 1 FROM t2 GROUP BY 1;
      Empty set (0.001 sec)
      

      Yet, with Spider, for:

      INSTALL PLUGIN Spider SONAME 'ha_spider.so';
      CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET '../socket.sock',DATABASE'',USER'',PASSWORD'');
      CREATE TABLE t1 (c INT KEY) ENGINE=InnoDB;
      CREATE TABLE t2 (c INT KEY) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t1"';
      LOCK TABLE t2 READ;
      SELECT 1 FROM t2 GROUP BY 1;
      

      We see:

      11.2.5 03807c8449cdccbf5b8afc0dddabb1d8ec7ba85a (Optimized)

      11.2.5-dbg>SELECT 1 FROM t2 GROUP BY 1;
      ERROR 1056 (42000): Can't group on 'min(`c`)'
      

      And in the error log:

      11.2.5 03807c8449cdccbf5b8afc0dddabb1d8ec7ba85a (Optimized)

      2024-07-23 14:22:58 4 [ERROR] Got error 1056 when reading table './test/t2'
      

      Attachments

        Activity

          People

            ycp Yuchen Pei
            Roel Roel Van de Paar
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.