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

Creating a federated table with a non-existing server returns a random error code

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.5.25, 5.3.7, 5.2.12, 5.1.62
    • Fix Version/s: 5.5.31
    • Component/s: None
    • Labels:

      Description

      MariaDB [test]> CREATE TABLE t1 (a INT) ENGINE=FEDERATED CONNECTION='non_existing';
      ERROR 1 (HY000): Can't create/write to file 'server name: 'non_existing' doesn't exist!' (Errcode: 16)
      MariaDB [test]> SHOW WARNINGS;
      +-------+------+---------------------------------------------------------------------------------------+
      | Level | Code | Message                                                                               |
      +-------+------+---------------------------------------------------------------------------------------+
      | Error |    1 | Can't create/write to file 'server name: 'non_existing' doesn't exist!' (Errcode: 16) |
      | Error |    1 | Can't create/write to file 'non_existing' (Errcode: 49043072)                         |
      | Error | 1005 | Can't create table 'test.t1' (errno: 1)                                               |
      +-------+------+---------------------------------------------------------------------------------------+

      There used to be bug http://bugs.mysql.com/bug.php?id=33702 which is now marked as fixed and closed (and contains a patch), but the fix was apparently lost along with MySQL 6.0. It is still reproducible on MySQL 5.5, 5.6.

      On MariaDB, it affects both Federated and FederatedX.

      Test case

      # If in MTR, run as 
      # perl ./mtr --mysqld=--plugin-load=ha_federatedx.so --mysqld=--federated t1
      # or 
      # perl ./mtr --mysqld=--plugin-load=ha_federated.so --mysqld=--federated t1
      # Outside MTR, just make sure FEDERATED[X] is installed and active.
       
      --disable_abort_on_error
       
      CREATE TABLE t1 (a INT) ENGINE=FEDERATED CONNECTION='non_existing';
      SHOW WARNINGS;

        Attachments

          Activity

            People

            • Assignee:
              serg Sergei Golubchik
              Reporter:
              elenst Elena Stepanova
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: