Skip to content

Commit

Permalink
Fixes #4724 - Large attachments will blow up RAM and CPU usage on mysql.
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfschmidt committed Jul 18, 2023
1 parent b493018 commit 509a4e6
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -52,6 +52,7 @@ def check_attribute_values_and_length

# strip 4 bytes utf8 chars if needed (mysql/mariadb will complain it)
next if self[name].blank?
next if column.type == :binary

self[name] = self[name].utf8_to_3bytesutf8
end
Expand Down

0 comments on commit 509a4e6

Please sign in to comment.