Problem: we may get syntactically incorrect queries in the binary log if we use a string value user variable executing a PS which contains '... limit ?' clause, e.g. prepare s from "select 1 limit ?"; set @A='qwe'; execute s using @A; Fix: raise an error in such cases.