[MDEV-24226] 10.3.26 rejects syntax that 10.3.25 accepts Created: 2020-11-17  Updated: 2020-11-20  Resolved: 2020-11-17

Status: Closed
Project: MariaDB Server
Component/s: Parser
Affects Version/s: 10.3.26, 10.3.27
Fix Version/s: N/A

Type: Bug Priority: Blocker
Reporter: Daniel J. Luke Assignee: Sergei Golubchik
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by MDEV-24194 View definition corruption Closed
is duplicated by MDEV-24254 CHECK (ISNULL(code)=ISNULL(class)) sy... Closed

 Description   

10.3.25 (and earlier) accept queries like:

select foo from bar where baz is 'label' and (other is null <> other2 is null); 

10.3.26 and 10.3.27 require:

select foo from bar where baz is 'label' and ((other is null) <> (other2 is null)); 

With statement based replication, this means queries can run on primary and fail on replicas (which is unfortunate when running the same major+minor version).



 Comments   
Comment by Daniel J. Luke [ 2020-11-17 ]

Syslog'd error looks like:

[ERROR] Slave SQL: Error 'You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '<> other2 is null

Comment by Daniel Black [ 2020-11-17 ]

serg was this recent work in 05a878c139963d4859ef8f2c974fee5dae56ee51?

With 'is' and '<>' on the same precidence based on https://mariadb.com/kb/en/operator-precedence/ does that mean the expression is handled as '((((other is null) <> other2) is null)'?

Comment by Sergei Golubchik [ 2020-11-17 ]

Yes, it was. They aren't quite on the same precedence, according to sql_yacc.yy. But either way, it should not be a syntax error

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