提交 f4eef75d 编写于 作者: R Rémy Coutable

Merge branch '34324-gitlab-db-seed-is-broken' into 'master'

Resolve "GitLab DB seed is broken"

Closes #34324

See merge request !12464
......@@ -93,7 +93,7 @@ module Gitlab
row.values_at(*keys).map { |value| connection.quote(value) }
end
connection.execute <<-EOF.strip_heredoc
connection.execute <<-EOF
INSERT INTO #{table} (#{columns.join(', ')})
VALUES #{tuples.map { |tuple| "(#{tuple.join(', ')})" }.join(', ')}
EOF
......
......@@ -176,6 +176,10 @@ describe Gitlab::Database, lib: true do
described_class.bulk_insert('test', rows)
end
it 'handles non-UTF-8 data' do
expect { described_class.bulk_insert('test', [{ a: "\255" }]) }.not_to raise_error
end
end
describe '.create_connection_pool' do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册