When executing a query like
historyService.createHistoricDetailQuery().processInstanceId("").executionId("");
a processEngineException is thrown.
This is caused by missing "AND" in the SQL statement.
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/resources/org/camunda/bpm/engine/impl/mapping/entity/HistoricDetail.xml#L320-L343
Could be fixed like this:
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/resources/org/camunda/bpm/engine/impl/mapping/entity/Task.xml#L313