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

Alter table not returning engine errors

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.1.6
    • Fix Version/s: 10.1
    • Component/s: None
    • Labels:
      None
    • Environment:
      All

      Description

      If HA_ERR_GENERIC error is returned from the storage engine during an alter table, I would expect that mariadb call into the storage engines error handler to get the error message.

      handler.cpp:3539
      temporary= get_error_message(error, &str);

      However alter does not do that. When alter fails (in my case it is because i am running in a clustered environment with ScaleDB and the table is in use on another node) i am getting the following error

      mysql> alter table lockwt1 add column c2_3 int;
      ERROR 1015 (HY000): Can't lock file (errno: 168 "Unknown (generic) error from engine")

      If mariadb called into the engine, a more accurate error would get returned "Table in use on another node"

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            michael Michael Fitzmaurice added a comment - - edited

            The error message is getting returned from the external_lock function, and getting handled by print_lock_error(..) function.

            if print_lock_error(..) supported generic/storage engine errors, then this would solve the problem.

            Show
            michael Michael Fitzmaurice added a comment - - edited The error message is getting returned from the external_lock function, and getting handled by print_lock_error(..) function. if print_lock_error(..) supported generic/storage engine errors, then this would solve the problem.

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                michael Michael Fitzmaurice
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: