bareos: master a9a0bdd9

Author Committer Branch Timestamp Parent
arogge arogge master 2019-07-09 18:31 master fd63a945 Pending
Affected Issues  0000975: .bvfs_lsdirs limit offset command parameters do not work properly
Changeset cats: Fix .bvfs_lsdirs when using limit and offset

Fixes 0000975: .bvfs_lsdirs limit offset command parameters do not work properly

The .bvfs_lsdirs command did not return the correct amount of entries
when it was used with multiple jobids together with limit and offset.
The problem was that the SQL query returned multiple rows with the same
path and Bvfs::_handle_path() removed the duplicates. Also, no matter
what offset was given, the result did always start with the . and ..
entries.

This is fixed now when using the PostgreSQL DB for Catalog by a modified
SQL query that integrates the formerly separate SQL query for the . and
.. entries with the query for the normal directory entries and the new
query no longer contains duplicates.

This version will not work with a MySQL Catalog DB because MySQL/MariaDB
lacks the DISTINCT ON feature.

Original Author: Stephan Duehr <stephan.duehr@bareos.com>
mod - core/src/cats/bvfs.cc Diff File
add - core/src/cats/dml/0074_bvfs_ls_special_dirs_3.postgresql Diff File
mod - core/src/cats/dml/0075_bvfs_ls_sub_dirs_5 Diff File
add - core/src/cats/dml/0075_bvfs_ls_sub_dirs_5.postgresql Diff File
mod - core/src/cats/mysql_queries.inc Diff File
mod - core/src/cats/postgresql_queries.inc Diff File
mod - core/src/cats/sqlite_queries.inc Diff File