Roundup Tracker - Issues

Message7220

Author schlatterbeck
Recipients ber, rouilj, schlatterbeck
Date 2021-05-07.19:18:19
Message-id <20210507191814.pphy4wlwjwfzixer@runtux.com>
In-reply-to <1620402837.78.0.569459496401.issue2551119@roundup.psfhosted.org>
On Fri, May 07, 2021 at 03:53:57PM +0000, John Rouillard wrote:
> Hi Ralf, it looks like anydbm and sqlite are working now
> and you got mysql running. Really just a single line change?
> 
> I am surprised this bug didn't cause other
> issues. If I entered -1 for unset in a search form would
> that line be hit? If so would it work both before and after
> your change?

No this is the code with the expression parser for multilinks,
e.g. the list '1', '2', '-3' would specify '1' AND '2' ('-3' is the
"opcode" for AND). I think this has never worked for mysql. The constants
in the expression representation are integers and IDs in roundup always
were strings. So this never matched.
A single '-1' would have worked. And now (latest commit some minutes
ago) a list like '-1', '1', '2' would also work, this is implicit OR
so it would mean a multilink containing '1' or '2' or being empty.
I think this case has *never* worked. It *did* work for Link properties
but not for multilinks.

> I am pushing to CI now and will see how many times that line
> is covered. I wonder if we have a test for -1 (unset) somewhere
> in the test suite.

Yes, be sure to include my latest commit.

Note that I'm still planning further changes. The original bug (the
reason I created this issue in the first place) is still not found.
See my todo-list in msg7217, I've finished point 3 in that list :-)
And I think point 4 is impossible, we always need a subquery for
multilinks. And I'd like to make the expression parser work with:
- '-1' being part of an expression, e.g., '1', '2', '-3', '-1', '-4'
  meaning "1 and 2 or empty"
- reverse multilinks, I'm not sure this would work with anydbm, I'm
  fairly sure it should work with the sql backends. But this needs a
  test.

Ralf
-- 
Dr. Ralf Schlatterbeck                  Tel:   +43/2243/26465-16
Open Source Consulting                  www:   www.runtux.com
Reichergasse 131, A-3411 Weidling       email: office@runtux.com
History
Date User Action Args
2021-05-07 19:18:19schlatterbecksetrecipients: + schlatterbeck, ber, rouilj
2021-05-07 19:18:19schlatterbecklinkissue2551119 messages
2021-05-07 19:18:19schlatterbeckcreate