# File lib/thinking_sphinx.rb, line 175 def self.use_group_by_shortcut? if Thread.current[:thinking_sphinx_use_group_by_shortcut].nil? Thread.current[:thinking_sphinx_use_group_by_shortcut] = !!( mysql? && ::ActiveRecord::Base.connection.select_all( "SELECT @@global.sql_mode, @@session.sql_mode;" ).all? { |key,value| value.nil? || value[/ONLY_FULL_GROUP_BY/].nil? } ) end Thread.current[:thinking_sphinx_use_group_by_shortcut] end