- 🇳🇿New Zealand quietone
In 🐛 SQLite Greatest implementation is wrong for parameters with the value NULL Needs work tests are added that test integer and string input. I am closing this as a duplicate.
Follow-up to #2259947: Minor bug fixes in database system → .
In Drupal\Core\Database\Driver\sqlite\Connection::sqlFunctionGreatest() we are trying to replicate the behavior of SQL GREATEST() using max(). This is supposed to work not just for numeric values, but also for strings, and maybe date/time?
The following is or will be fixed as part of
#2259947: Minor bug fixes in database system →
:
- If one of the values is NULL, then the result is NULL.
- If no values are given, the result is NULL.
But this is not the end of the story. We need to test this with strings and other types, and we should write tests to verify the behavior.
We also need to check whether different SQL implementations (MySQL, other) are even consistent about the behavior of GREATEST().
I hope that we can find some external resources. It is unlikely that we are the first who deal with this problem.
Closed: duplicate
11.0 🔥
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
In 🐛 SQLite Greatest implementation is wrong for parameters with the value NULL Needs work tests are added that test integer and string input. I am closing this as a duplicate.