aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/arel/visitors/oracle12.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/arel/visitors/oracle12.rb b/lib/arel/visitors/oracle12.rb
index 4a42343c9b..d21a829848 100644
--- a/lib/arel/visitors/oracle12.rb
+++ b/lib/arel/visitors/oracle12.rb
@@ -6,10 +6,12 @@ module Arel
def visit_Arel_Nodes_SelectStatement o, collector
# Oracle does not allow LIMIT clause with select for update
if o.limit && o.lock
- o = o.dup
- o.limit = []
+ raise ArgumentError, <<-MSG
+ 'Combination of limit and lock is not supported.
+ because generated SQL statements
+ `SELECT FOR UPDATE and FETCH FIRST n ROWS` generates ORA-02014.`
+ MSG
end
-
super
end