shell_escape() was not backslash-escaping newlines, which could cause a multiline query to fail when re-executed through JS Changed: U trunk/Bundles/SQL.tmbundle/Support/lib/shell.js