Issue #20264 Fix error handling to not choke on large stacks.
Issue #20266 Get inserts to work safely without SQLi.