Skip to content

XOR doesn't like LIKE? (MariaDB) #2500

@laowantong

Description

@laowantong

Database Engine MariaDB (and presumably MySQL).

To Reproduce

import pkg from 'node-sql-parser';
const { Parser } = pkg;
const parser = new Parser();

parser.parse("SELECT * FROM T WHERE a LIKE 'foobar%' XOR c = d");
  • node-sql-parser: 5.3.9
  • node: v18.12.0

Expected behavior
This statement is valid SQL for MySQL and MariaDB, and should not fail to parse.

Additional context
Works fine with:

  • other boolean operators: SELECT * FROM T WHERE a LIKE 'foobar%' AND c = d
  • parenthesis: SELECT * FROM T WHERE (a LIKE 'foobar%') XOR c = d
  • simpler left operand: SELECT * FROM T WHERE a = b XOR c = d

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions