GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — MySQL dialect gives logical XOR the same tier as OR · Issue #2835 · JSQLParser/JSqlParser Closed DescriptionReproductionAt current import net.sf.jsqlparser.expression.BinaryExpression; import net.sf.jsqlparser.expression.Expression; import net.sf.jsqlparser.parser.AbstractJSqlParser.Dialect; import net.sf.jsqlparser.parser.CCJSqlParserUtil; import net.sf.jsqlparser.statement.select.Select; public class Repro { static void show(Expression e, String prefix) { System.out.println(prefix + e.getClass().getSimpleName() + ": " + e); if (e instanceof BinaryExpression b) { show(b.getLeftExpression(), prefix + " L "); show(b.getRightExpression(), prefix + " R "); } } public static void main(String[] args) throws Exception { for (String x : new String[]{"1 OR 1 XOR 1", "1 OR (1 XOR 1)"}) { Select s = (Select) CCJSqlParserUtil.parse("SELECT " + x + " AS x", p -> p.withDialect(Dialect.MYSQL)); System.out.println("INPUT " + x); show(s.getPlainSelect().getSelectItem(0).getExpression(), ""); } } } Observed on 2026-10-19: unparenthesized input has a The boolean parser loop comments that XOR should have precedence 3 and OR precedence 2, but assigns both the value 2. The resulting AST groups them left-to-right. #1070 concerns OR/AND; #2834 concerns a separate arithmetic/bitwise parser loop. Activity
MetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |