Jira issue originally created by user bb:
Both issues are in SqlWalker::walkSelectStatement().
First is a typo on line 443 in master where LockMode::PESSIMISTIC_OPTIMISTIC is used instead of LockMode::OPTIMISTIC. This results in a fatal undefined class constant error.
Additionally, LockMode::NONE is not handled and results in an exception. An empty case will solve that issue.
Comment created by @beberlei:
Fixed, merged back into 2.2 branch.
Issue was closed with resolution "Fixed"