Skip to content

Commit

Permalink
Revert "Fixed error with MySQL and binary data - #466"
Browse files Browse the repository at this point in the history
This reverts commit 7bca5a9.
  • Loading branch information
ankane committed May 21, 2024
1 parent 2d80026 commit 0a5ccfc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
4 changes: 0 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
## 3.0.4 (unreleased)

- Fixed error with MySQL and binary data

## 3.0.3 (2024-01-10)

- Fixed error with Trilogy, non-ASCII column names, and charts
Expand Down
14 changes: 0 additions & 14 deletions lib/blazer/adapters/sql_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,6 @@ def run_statement(statement, comment, bind_params = [])
if adapter_name == "Trilogy"
columns.map! { |k| k.dup.force_encoding(Encoding::UTF_8) }
end

# fix for binary data
if mysql?
rows =
rows.map do |row|
row.map do |v|
if v.is_a?(String) && v.encoding == Encoding::BINARY
"0x#{v.unpack1("H*").upcase}"
else
v
end
end
end
end
rescue => e
error = e.message.sub(/.+ERROR: /, "")
error = Blazer::TIMEOUT_MESSAGE if Blazer::TIMEOUT_ERRORS.any? { |e| error.include?(e) }
Expand Down

0 comments on commit 0a5ccfc

Please sign in to comment.