This project is archived and is in readonly mode.

#999 ✓committed
Dmytro Shteflyuk

quote_bound_value incorrectly works with new line chars in ActiveSupport::Multibyte::Chars

Reported by Dmytro Shteflyuk | September 9th, 2008 @ 08:41 AM | in 2.1.2

ActiveRecord processes multibyte strings in wrong way:

Loading development environment (Rails 2.1.0)
>> Video.find(:all, :conditions => ['title = ?', "hello\r\nworld".chars])
ActiveRecord::StatementInvalid: Mysql::Error: Operand should contain 1 column(s): SELECT * FROM `videos`     WHERE (title = 'hello\r\n','world')

Attached patch for Rails 2.0.2 to fix this issue.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>


Referenced by