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
Database Engine MariaDB (and presumably MySQL).
To Reproduce
Expected behavior
This statement is valid SQL for MySQL and MariaDB, and should not fail to parse.
Additional context
Works fine with:
SELECT * FROM T WHERE a LIKE 'foobar%' AND c = dSELECT * FROM T WHERE (a LIKE 'foobar%') XOR c = dSELECT * FROM T WHERE a = b XOR c = d