ON gets mistaken for a keyword here. <img width="340" height="47" alt="Image" src="https://github.com/user-attachments/assets/6d6d6a08-1850-42b9-8cac-f1f54729a544" /> There should be no error, the query works. MariaDB 11.4.4 sql-parser 5.10 & master