MySQL Forums
Forum List  »  General

Re: XOR returns true when OR returns false
Posted by: Andy Lanng
Date: August 18, 2016 06:48AM

At this point I'll have to point to your points about my points ^_^

>> I am surprised that nothing at all was returned from the view.

>You didn't test it before posting it?

I changed my query to only look at a subset of the regions (<15) and took a clone of the table structure and contents used where region < 15. I can't see why the data I sent you would show results where mine did,.. yet. I'll review it and find my mistake. Unfortunately I can't add tables or schema's to that database even for test without jumping through a few hoops. I'll have to get back to you.

> So you can use that to debug moving the funky join to the From clause (where it will be more efficient too).

I know that I can get the query to work by changing it's structure. The issue is that the structure was dictated by Entity Framework 5 & 6 (I upgraded to test EF versions). Good lord I hope you don't think that I'd structure a query in such a bizarre way given the choice >_<

>That strongly suggests that 5.7 fixed a query engine bug which your query found in 5.6.

That would not explain why "A or B" returns false where "A xor B" returns true. I wish I could demonstrate that easily because without seeing it I can understand your incredulity. I was sure I wasn't seeing it right myself for the longest time.

----
Well, if I can expect this behavior to persist and even occur on the 5.6 database if we upgrade that too, then I think my own solution is simple. I will not use EF for this query. I will probably construct a view instead.

Thanks for taking the time to look at this ^_^

Options: ReplyQuote


Subject
Written By
Posted
Re: XOR returns true when OR returns false
August 18, 2016 06:48AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.