Commit 7d3b19ef authored by Mira Prosovetskaia's avatar Mira Prosovetskaia
Browse files

Check final clause if ORDER is duplicated (Otter case)

parent e4911f81
Pipeline #137527 failed with stage
in 19 minutes and 16 seconds
......@@ -617,8 +617,10 @@ sub _generate_sql {
$sql .= "\n WHERE $default_where ";
}
#append additional clauses which may have been defined
$sql .= "\n$final_clause";
#append additional clauses which may have been defined, don't append ORDER BY twice
if (index($final_clause, "ORDER") == -1 || index($sql, "ORDER") == -1) {
$sql .= "\n$final_clause";
}
# FOR DEBUG:
#printf(STDERR "SQL:\n%s\n", $sql);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment