From 0a5ccfc56a80d8463e52c1af1dbfd4f18581275b Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Tue, 21 May 2024 15:44:47 -0400 Subject: [PATCH] Revert "Fixed error with MySQL and binary data - #466" This reverts commit 7bca5a98a6e38e39c92459f2118344f48970dee2. --- CHANGELOG.md | 4 ---- lib/blazer/adapters/sql_adapter.rb | 14 -------------- 2 files changed, 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b24630800..97d077fef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/lib/blazer/adapters/sql_adapter.rb b/lib/blazer/adapters/sql_adapter.rb index d945b133c..f35826c99 100644 --- a/lib/blazer/adapters/sql_adapter.rb +++ b/lib/blazer/adapters/sql_adapter.rb @@ -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) }