~sergei.glushchenko/percona-xtrabackup/bug711166_part-1.6

Viewing all changes in revision 340.

  • Committer: Alexey Kopytov
  • Date: 2012-05-28 16:37:00 UTC
  • Revision ID: akopytov@gmail.com-20120528163700-b1g6f9wu9ercssrp
Bug #713267: xtrabackup binary leaks file descriptors on --backup

The problem was that the xtrabackup_copy_datafile() called
fil_space_get_zip_size() with the only purpose to determine the
compressed page size for a tablespace. That function opens the tablespace
file to read its flags. But xtrabackup never closed that file, which was
the reason for the file descriptor leak.

Since we already have a file descriptor for the tablespace to be copied,
the bug was fixed duplicating a part of fil_node_open_file() in a
separate function that reads flags from a given tablespace file and then
converts them to the page size. The existing file descriptor is reused
this way, so no leak occurs.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: