[MDEV-24817] Undocumented IS operator precendence change in 10.3.26 Created: 2021-02-09  Updated: 2021-04-19  Resolved: 2021-02-09

Status: Closed
Project: MariaDB Server
Component/s: N/A
Affects Version/s: None
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Hartmut Holzgraefe Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates MDEV-24194 View definition corruption Closed

 Description   

Up to 10.3.25 both

SELECT NULL IS NULL = 1;

and

SELECT (NULL IS NULL) = 1;

worked and returned the same result.

Starting with 10.3.26 only the 2nd variant with extra parenthesis still works, while the 1st variant now throws a syntax error "near '= 1'"

No related entry on the 10.3.26 release notes page refers to such changed parser behavior.



 Comments   
Comment by Hartmut Holzgraefe [ 2021-02-09 ]

Trying this on other DMBS, both variants work on latest MySQL 8, on PostgreSQL and SQLite, but only the 2nd works on Microsoft SQL server (could not check Oracle as that seems to be broken in SQLfiddle right now).

All but SQLite fail on

SELECT NULL IS (NULL = TRUE);

but that's understandable as there's no literal "IS NULL" in this case for the parser to see.

Comment by Alice Sherepa [ 2021-02-09 ]

fixed in 10.3.28 (MDEV-24194)

Generated at Thu Feb 08 09:32:53 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.