This project is archived and is in readonly mode.
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
-
Jeremy Kemper September 9th, 2008 @ 06:00 PM
- State changed from new to open
- Assigned user set to Jeremy Kemper
- Milestone changed from 2.x to 2.1.2
Could you include a test case? Thanks!
-
Dmytro Shteflyuk September 9th, 2008 @ 09:05 PM
Here is patch for Rails 2.1.1 (2-1-stable branch) with test case included.
-
Repository September 24th, 2008 @ 05:36 PM
- State changed from open to committed
(from [c75e71147a98ce2539e8201137ea4481408082a4]) Handle quoting multibyte strings with newlines.
[#999 state:committed] http://github.com/rails/rails/co...
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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 999 quote_bound_value incorrectly works with new line chars in ActiveSupport::Multibyte::Chars [#999 state:committed] http://github.com/rails/rails/co...