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

Ensure we get a warning from THD::drop_temporary_table() in case of disk errors

Details

    Description

      The call stack for DROP TEMPORARY TABLE is:

      THD::drop_temporary_table()
      mysql_rm_table_no_locks()
      free_tmp_table_share()
      THD::free_tmp_table_share()
      THD::rm_temporary_table()
      ha_delete_table()

      The problem is that free_temp_table_share() is a void function and thus the caller doesn't know if ha_delete_table() failed or not.

      How to repeat:
      in gdb, put a breakpoint at: maria_delete_table()
      Execute in command tool:
      create temporary table t1 (a int) engine=aria;
      drop temporary table t1;

      Attachments

        Issue Links

          Activity

            monty Michael Widenius created issue -
            serg Sergei Golubchik made changes -
            Field Original Value New Value
            Assignee Oleksandr Byelkin [ sanja ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.7 [ 24805 ]
            Fix Version/s 10.6 [ 24028 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.8 [ 26121 ]
            Fix Version/s 10.7 [ 24805 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 110399 ] MariaDB v4 [ 131316 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.9 [ 26905 ]
            Fix Version/s 10.8 [ 26121 ]
            danblack Daniel Black made changes -
            Issue Type Task [ 3 ] Bug [ 1 ]
            danblack Daniel Black made changes -
            Assignee Oleksandr Byelkin [ sanja ] Daniel Black [ danblack ]
            danblack Daniel Black made changes -
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.9 [ 26905 ]
            danblack Daniel Black made changes -
            danblack Daniel Black added a comment -

            MDEV-11412 in 10.5 is when THD::rm_temporary_table started emitting warnings about deleted files errors (except ENOENT).

            As future feature:
            If we could check O_TMPFILE_works from MDEV-15584 / 3edac3f18d2d74f68e6f9f9b41e5d05a5c8ca9c5 we wouldn't even need to delete it.

            danblack Daniel Black added a comment - MDEV-11412 in 10.5 is when THD::rm_temporary_table started emitting warnings about deleted files errors (except ENOENT). As future feature: If we could check O_TMPFILE_works from MDEV-15584 / 3edac3f18d2d74f68e6f9f9b41e5d05a5c8ca9c5 we wouldn't even need to delete it.
            danblack Daniel Black added a comment -

            Thanks Weijun Huang for another great fix.

            danblack Daniel Black added a comment - Thanks Weijun Huang for another great fix.
            danblack Daniel Black made changes -
            Fix Version/s 10.5.20 [ 28512 ]
            Fix Version/s 10.6.13 [ 28514 ]
            Fix Version/s 10.8.8 [ 28518 ]
            Fix Version/s 10.9.6 [ 28520 ]
            Fix Version/s 10.10.4 [ 28522 ]
            Fix Version/s 10.11.3 [ 28524 ]
            Fix Version/s 11.0.2 [ 28706 ]
            Fix Version/s 10.5 [ 23123 ]
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]

            People

              danblack Daniel Black
              monty Michael Widenius
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.