Review main Abandoned

61880[BUGFIX] Allow control fields to be null when a query spans several tables

Georg Großberger CR 0 V 0 Hard +551 −29 updated 06/25/20, 07:16

Commit message

In case of not-inner joins, those fields must be allowed to have a value
of NULL, or the database will implicitly execute an inner join.

To preserve backwards compatibility, the existing RestrictionInterface is
not changed, but a new one added: JoinAwareRestrictionInterface

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 22

Show 2 more files

Review log 1419

  1. Georg Großberger uploaded patch set 1 10/03/19, 17:34

  2. TYPO3com voted on patch set 1 V -1 10/03/19, 17:44 Completed build in 10m 00s on Thu, 3 Oct, 05:44 PM Test Summary: 8 of 48134 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37031

  3. Stefan P commented on patch set 1 10/07/19, 05:15

    DeletedRestriction.php:46 Unresolved

    This is wrong. The "is null" check must only be applied to the join tables, not to the from table. Please also move method calls outside of loops to not have them called on each iteration.
  4. Susi Moog commented on patch set 1 10/26/19, 09:07

    Can you please add/adjust the tests to document this new behaviour?
  5. Georg Großberger uploaded patch set 2 01/04/20, 16:48

  6. TYPO3com voted on patch set 2 V -1 01/04/20, 16:49 Completed build in 13s on Sat, 4 Jan, 04:49 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39703

  7. Georg Großberger uploaded patch set 3 01/04/20, 16:58

  8. TYPO3com voted on patch set 3 V -1 01/04/20, 17:05 Completed build in 07m 25s on Sat, 4 Jan, 05:05 PM Test Summary: 3178 of 69592 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39704

  9. Tymoteusz Motylewski commented on patch set 3 01/04/20, 22:28

    Hi nice finding! How can it be tested? Do you a case in the Core where the issue can be observed?
  10. Manuel Selbach wrote 03/30/20, 19:49

    Topic set to persistence
  11. Benni Mack commented on patch set 3 04/13/20, 10:22

  12. Georg Großberger uploaded patch set 4 04/15/20, 07:31

  13. Georg Großberger commented on patch set 4 04/15/20, 07:44

    > Patch Set 3: > > Hi nice finding! > How can it be tested? Do you a case in the Core where the issue can be observed? I don't know about a place in the core where this is used, but I had it in a couple projects. A very simple use case would be this: get the title of an optionally selected category. $qb->select('p.title', 'c.title AS category'); $qb->from('products', 'p'); $qb->leftJoin('p', 'category', 'c', 'p.category = c.uid'); With this patch, category is NULL if no category is selected. Without it, no row would be returned.
  14. Georg Großberger commented on patch set 4 04/15/20, 07:47

    > Patch Set 3: > > Have you checked this alternative? https://review.typo3.org/c/Packages/TYPO3.CMS/+/60781/ I checked, but while they can be used to archive the same, they do not provide the same. The main difference is, that this patch automatically adds nullable restrictions, while the other strips all restrictions from the selected tables, and that must be done manually. IMHO both are valid and not exclusive.
  15. TYPO3com voted on patch set 4 V -1 04/15/20, 07:52 Completed build in 20m 30s on Wed, 15 Apr, 07:52 AM Test Summary: 4541 of 73989 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2549

  16. Georg Großberger uploaded patch set 5 04/15/20, 08:27

  17. TYPO3com voted on patch set 5 V -1 04/15/20, 08:40 Completed build in 12m 45s on Wed, 15 Apr, 08:40 AM Test Summary: 3899 of 73989 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2556

  18. Georg Großberger abandoned the change 04/16/20, 06:16

    Succeeded by 60781
  19. Markus Klein commented on patch set 5 06/25/20, 07:16

    IMO the related patch this one was abandoned for does not resolve this bug.