Skip to content

Commit

Permalink
Use backticks around fixed width message in warning not magic quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
zzak committed Dec 9, 2024
1 parent f21176d commit c029406
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ def handle_warnings(sql)
warning_count = @raw_connection.warning_count
result = @raw_connection.query("SHOW WARNINGS")
result = [
["Warning", nil, "Query had warning_count=#{warning_count} but SHOW WARNINGS did not return the warnings. Check MySQL logs or database configuration."],
["Warning", nil, "Query had warning_count=#{warning_count} but `SHOW WARNINGS` did not return the warnings. Check MySQL logs or database configuration."],
] if result.count == 0
result.each do |level, code, message|
warning = SQLWarning.new(message, code, level, sql, @pool)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def setup
@connection.execute('SELECT "x"')
end

expected = "Query had warning_count=1 but SHOW WARNINGS did not return the warnings. Check MySQL logs or database configuration."
expected = "Query had warning_count=1 but `SHOW WARNINGS` did not return the warnings. Check MySQL logs or database configuration."
assert_equal expected, error.message
end
end
Expand Down

0 comments on commit c029406

Please sign in to comment.