Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6.4
-
Fix Version/s: JRuby 1.6.5, JRuby 1.7.0.pre1
-
Component/s: None
-
Labels:None
-
Environment:JRuby 1.6.4, 1.8.7 mode
Rails 3.0.7
Java version "1.6.0_24"
Ubuntu 10.04.1 LTS
-
Number of attachments :
Description
After update from 1.6.2 to 1.6.4 queries with not UTF-8 encoded strings started raising exceptions. Same queries were working without any problems on 1.6.2.
Example string causing exception (taken from email's from field): =?iso-8859-1?Q?Tony_Banz=E1_K=E9lluz?=
Exception message:
ActiveRecord::JDBCError: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near...
Top of the backtrace:
activerecord (3.0.7) lib/active_record/connection_adapters/abstract_adapter.rb:207:in `log'
activerecord-jdbc-adapter (1.1.3) lib/arjdbc/jdbc/adapter.rb:183:in `execute'
activerecord-jdbc-adapter (1.1.3) lib/arjdbc/jdbc/adapter.rb:199:in `jdbc_update'
arel (2.0.10) lib/arel/crud.rb:20:in `update'
...
I've tried replicating this issue locally with jruby-1.6.4, with activerecord-jdbcmysql-adapter 1.1.3, rails et al. 3.0.7, and have been unsuccessful. Can you make a small test script that reproduces this error?