]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4994 Webapp is slow when using Oracle DB
authorSimon Brandhof <simon.brandhof@gmail.com>
Tue, 7 Jan 2014 09:06:06 +0000 (10:06 +0100)
committerSimon Brandhof <simon.brandhof@gmail.com>
Tue, 7 Jan 2014 09:06:06 +0000 (10:06 +0100)
sonar-server/src/main/webapp/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/oracle/adapter.rb

index 3486a58887be1312bee209f4ae91a8c53f0dd564..954c838f9c256464258aa742d36b632d4b3772b6 100644 (file)
@@ -159,7 +159,13 @@ module ::ArJdbc
     end
 
     def sql_literal?(value)
-      defined?(::Arel::SqlLiteral) && ::Arel::SqlLiteral === value
+      # SonarQube
+      # See http://jira.codehaus.org/browse/SONAR-4994
+      # This code always returns false (we use ActiveRecord 2.3) and is heavy-CPU consuming
+      # because of raised exceptions.
+      #defined?(::Arel::SqlLiteral) && ::Arel::SqlLiteral === value
+      false
+      # /SonarQube
     end
 
     def ora_insert(sql, name = nil, pk = nil, id_value = nil, sequence_name = nil) #:nodoc: