diff --git a/patches/patch20200710-3.0.0-rc2/fix_unversioned.sql b/patches/patch20200710-3.0.0-rc2/fix_unversioned.sql index b3017b6dc0f2eab403dc2eca9ff78e89d80d5a6d..4ed6f171264af0c848764867fca8754daf4c62cd 100644 --- a/patches/patch20200710-3.0.0-rc2/fix_unversioned.sql +++ b/patches/patch20200710-3.0.0-rc2/fix_unversioned.sql @@ -87,7 +87,7 @@ BEGIN AND t.nanos = l.nanos AND t.username = l.username AND t.realm = l.realm ) - WHERE l.entity_id = unversioned_id AND unversioned_id > 99 + WHERE l.entity_id = unversioned_id AND unversioned_id >= 100 UNION SELECT unversioned_id AS entity_id, NULL AS hash, @@ -98,7 +98,7 @@ BEGIN t.seconds AS seconds, t.nanos AS nanos FROM transactions AS t - WHERE t.seconds = 0 AND t.nanos = 0 AND unversioned_id<100 + WHERE t.seconds = 0 AND t.nanos = 0 AND unversioned_id < 100 ) AS tmp ORDER BY tmp.seconds DESC, tmp.nanos DESC LIMIT 1; diff --git a/procedures/retrieveEntity.sql b/procedures/retrieveEntity.sql index e06e6fb4ca21b132cc4bbeb4c9bf6fac25ba50b6..f74e6233af941ef3762647448e4285c4a5d26366 100644 --- a/procedures/retrieveEntity.sql +++ b/procedures/retrieveEntity.sql @@ -126,7 +126,10 @@ retrieveEntityBody: BEGIN ( SELECT value FROM archive_name_data WHERE domain_id = 0 AND entity_ID = EntityID - AND property_id = 20 LIMIT 1) AS EntityName, + AND property_id = 20 + AND _iversion = IVersion + -- LIMIT 1 -- TODO Remove this line if all tests pass. + ) AS EntityName, e.description AS EntityDesc, e.role AS EntityRole, FileSize AS FileSize,