Description
The problem is that the comment is not properly escaped (a C-style comment), so that "*/" in the XPath query accidentally ends the comment in the SQL-2 query.
The following query can't be converted to SQL-2, because it contains "*/":
/jcr:root/etc//*[@type = 'product' and ((@size = 'M' or */@size= 'M' or */*/@size = 'M' or */*/*/@size = 'M' or */*/*/*/@size = 'M' or */*/*/*/*/@size = 'M'))]
I think this was introduced by OAK-2354
http://svn.apache.org/viewvc?view=revision&revision=1645616