Skip to content

Commit 3b94a38

Browse files
committed
fixup! Make cursor_sharing default conditional on prepared_statements
1 parent fcc5dcc commit 3b94a38

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/active_record/connection_adapters/oracle_enhanced_adapter.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -867,9 +867,9 @@ def check_version # :nodoc:
867867
# instance-level cursor_sharing setting.
868868
when nil
869869
# No explicit :cursor_sharing. Apply the legacy "force" default only
870-
# when the caller has explicitly disabled prepared_statements; with
871-
# prepared_statements on (the Rails default), AR is binding literals
872-
# already and the adapter no longer overrides the server value.
870+
# when the caller has explicitly opted out of prepared_statements;
871+
# otherwise AR is binding literals via prepared statements and the
872+
# adapter no longer overrides the server's cursor_sharing.
873873
if @config[:prepared_statements] == false
874874
execute("alter session set cursor_sharing = FORCE", "SCHEMA")
875875
end

0 commit comments

Comments
 (0)