[MDEV-24641] Check constraint parser incorrectly indicates syntax error Created: 2021-01-21  Updated: 2021-01-22  Resolved: 2021-01-22

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

Type: Bug Priority: Major
Reporter: Noel Diaz Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None

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

 Description   

create table tbl (
  leaf int,
  internal int
  , constraint mutex_internal_or_leaf check ((internal is null ) <> (leaf is null))
  )

Throws syntax error

SQL Error [1064] [42000]: (conn=28) 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 '<> (`leaf` is null)' 



 Comments   
Comment by Noel Diaz [ 2021-01-21 ]

For what is worth the expression parses and executes successfully in a SELECT list, just not in the CHECK

Comment by Alice Sherepa [ 2021-01-22 ]

Thanks for the report! The bug is the same as MDEV-24254 (MDEV-24194), fixed in 10.5.9

Comment by Noel Diaz [ 2021-01-22 ]

Thanks @Alice

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