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

'Got error 1054 when reading table' on SELECT (Spider)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11
    • N/A
    • None

    Description

      Please update '../socket.sock' to actual path on your instance, or similar (host/port may or may not work)

      INSTALL PLUGIN Spider SONAME 'ha_spider.so';
      CREATE USER Spider@localhost IDENTIFIED BY 'PWD0';
      CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET '../socket.sock',DATABASE 'test',user 'Spider',PASSWORD 'PWD0');
      CREATE TABLE t (c INT);
      CREATE TABLE t2 (a INT KEY,b CHAR(0),c CHAR(0)) ENGINE=Spider COMMENT='WRAPPER "mysql",srv "srv",TABLE "t"' COMMENT='WRAPPER "mysql",srv "srv",TABLE "t"';
      SELECT * FROM t2 WHERE a=' 0' AND (a XOR 0);
      

      Leads to (CLI):

      10.11.0 fe1f8f2c6b6f3b8e3383168225f9ae7853028947 (Debug)

      10.11.0-dbg>SELECT * FROM t2 WHERE a=' 0' AND (a XOR 0);
      ERROR 1054 (42S22): Unknown column 'a' in 'field list'
      

      And (Error log):

      10.11.0 fe1f8f2c6b6f3b8e3383168225f9ae7853028947 (Debug)

      2022-09-01 11:44:56 4 [ERROR] Got error 1054 when reading table './test/t2'
      

      Bug confirmed present in:
      MariaDB: 10.4.27 (dbg), 10.4.27 (opt), 10.5.18 (dbg), 10.5.18 (opt), 10.6.10 (dbg), 10.6.10 (opt), 10.7.6 (dbg), 10.7.6 (opt), 10.8.5 (dbg), 10.8.5 (opt), 10.9.2 (dbg), 10.9.2 (opt), 10.10.2 (dbg), 10.10.2 (opt), 10.11.0 (dbg), 10.11.0 (opt)

      Attachments

        Issue Links

          Activity

            People

              nayuta-yanagisawa Nayuta Yanagisawa (Inactive)
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.