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

mysql_ha_read attempts table read after 'Access denied' for server created by CREATE SERVER | Got error 12701 when reading table

    XMLWordPrintable

Details

    Description

      INSTALL PLUGIN Spider SONAME 'ha_spider.so';
      CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET '../socket.sock', DATABASE 'test', USER 'Spider', PASSWORD 'PWD123');
      CREATE TABLE t1 (a INT, b CHAR(10), c CHAR(10), filler CHAR(10), PRIMARY KEY(a, b (2)), UNIQUE KEY(a, c (2))) CHARACTER SET ucs2 ENGINE=Spider COMMENT='WRAPPER "mysql", srv "srv", TABLE "t"';
      HANDLER t1 OPEN;
      HANDLER t1 READ a>(1);
      

      Leads to (in the CLI):

      10.11.0 bc563f1a4b0b38de3b41fd0f0d3d8b7f1aacbd8b (Optimized)

      10.11.0-opt>HANDLER t1 OPEN;
      Query OK, 0 rows affected, 4 warnings (0.006 sec)
       
      10.11.0-opt>HANDLER t1 READ a>(1);
      ERROR 1429 (HY000): Unable to connect to foreign data source: srv
      

      Yet in the error log we see;

      10.11.0 bc563f1a4b0b38de3b41fd0f0d3d8b7f1aacbd8b (Optimized)

      2022-09-03 10:48:20 25 [Warning] Access denied for user 'Spider'@'localhost' (using password: YES)
      2022-09-03 10:48:20 4 [ERROR] mysql_ha_read: Got error 12701 when reading table 't1'
      

      Attachments

        Issue Links

          Activity

            People

              holyfoot Alexey Botchkov
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.