Make sure we use the lowest file_id, even if that comes from a disabled file, so we're consistent with versioned files

This commit is contained in:
nathan 2022-01-26 12:53:08 -07:00 committed by Ralf Becker
parent e420a6db10
commit 4c0ef2020f

View File

@ -1585,7 +1585,7 @@ class StreamWrapper extends Api\Db\Pdo implements Vfs\StreamWrapperIface
$query = 'SELECT MIN(B.fs_id) $query = 'SELECT MIN(B.fs_id)
FROM ' . self::TABLE . ' as A FROM ' . self::TABLE . ' as A
JOIN ' . self::TABLE . ' AS B ON A.fs_name = B.fs_name AND A.fs_dir = B.fs_dir AND A.fs_active = ' . JOIN ' . self::TABLE . ' AS B ON A.fs_name = B.fs_name AND A.fs_dir = B.fs_dir AND A.fs_active = ' .
self::_pdo_boolean(true) . ' AND B.fs_active = ' . self::_pdo_boolean(true) . ' self::_pdo_boolean(true) . ' AND B.fs_active = ' . self::_pdo_boolean(false) . '
WHERE A.fs_id=? WHERE A.fs_id=?
GROUP BY A.fs_id'; GROUP BY A.fs_id';
if (self::LOG_LEVEL > 2) if (self::LOG_LEVEL > 2)