Skip to content

Commit

Permalink
Merge pull request #801 from TakuyaKurimoto/feature/support-for-multi…
Browse files Browse the repository at this point in the history
…-byte

Support for multi-byte column names when splitting queries
  • Loading branch information
jkowens committed May 19, 2023
2 parents d728536 + 03a36a3 commit f541f2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/activerecord-import/adapters/mysql_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def insert_many( sql, values, options = {}, *args ) # :nodoc:
[sql.shift, sql.join( ' ' )]
end

sql_size = QUERY_OVERHEAD + base_sql.size + post_sql.size
sql_size = QUERY_OVERHEAD + base_sql.bytesize + post_sql.bytesize

# the number of bytes the requested insert statement values will take up
values_in_bytes = values.sum(&:bytesize)
Expand Down

0 comments on commit f541f2d

Please sign in to comment.