diff --git a/database/gdb/gdb_func.go b/database/gdb/gdb_func.go index ff6ed45b8..810b5c8bf 100644 --- a/database/gdb/gdb_func.go +++ b/database/gdb/gdb_func.go @@ -342,9 +342,10 @@ func GetPrimaryKeyCondition(primary string, where ...interface{}) (newWhereCondi // The internal handleArguments function might be called twice during the SQL procedure, // but do not worry about it, it's safe and efficient. func formatSql(sql string, args []interface{}) (newSql string, newArgs []interface{}) { - sql = gstr.Trim(sql) - sql = gstr.Replace(sql, "\n", " ") - sql, _ = gregex.ReplaceString(`\s{2,}`, ` `, sql) + // DO NOT do this as there may be multiple lines and comments in the sql. + // sql = gstr.Trim(sql) + // sql = gstr.Replace(sql, "\n", " ") + // sql, _ = gregex.ReplaceString(`\s{2,}`, ` `, sql) return handleArguments(sql, args) }