mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
31ffbf8d50
Currently several queries cannot return correct result due to incorrect `RangeError` handling. First example: ```ruby assert_equal true, Topic.where(id: [1, 9223372036854775808]).exists? assert_equal true, Topic.where.not(id: 9223372036854775808).exists? ``` The first example is obviously to be true, but currently it returns false. Second example: ```ruby assert_equal topics(:first), Topic.where(id: 1..9223372036854775808).find(1) ``` The second example also should return the object, but currently it raises `RecordNotFound`. It can be seen from the examples, the queries including large number assuming empty result is not always correct. Therefore, This change handles `RangeError` to generate executable SQL instead of raising `RangeError` to users to always return correct result. By this change, it is no longer raised `RangeError` to users. |
||
---|---|---|
.. | ||
attributes | ||
collectors | ||
nodes | ||
visitors | ||
alias_predication.rb | ||
attributes.rb | ||
crud.rb | ||
delete_manager.rb | ||
errors.rb | ||
expressions.rb | ||
factory_methods.rb | ||
insert_manager.rb | ||
math.rb | ||
nodes.rb | ||
order_predications.rb | ||
predications.rb | ||
select_manager.rb | ||
table.rb | ||
tree_manager.rb | ||
update_manager.rb | ||
visitors.rb | ||
window_predications.rb |