diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-09-30 20:59:47 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-09-30 20:59:47 +0000 |
commit | 8eb1e94f4d18a8e3d268392aa518b039dbc749c0 (patch) | |
tree | bf415c8464852cb83f4b9f61e44b4031172076e3 /lib | |
parent | f0323575f99bb2db7b4586499a46b0fc44719750 (diff) | |
download | redmine-8eb1e94f4d18a8e3d268392aa518b039dbc749c0.tar.gz redmine-8eb1e94f4d18a8e3d268392aa518b039dbc749c0.zip |
SQL error with MySQL (#19657).
git-svn-id: http://svn.redmine.org/redmine/trunk@14633 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/database.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/redmine/database.rb b/lib/redmine/database.rb index d8b4b7ccb..89a80129b 100644 --- a/lib/redmine/database.rb +++ b/lib/redmine/database.rb @@ -44,6 +44,11 @@ module Redmine end end + # Returns true if the database is MySQL + def mysql? + (ActiveRecord::Base.connection.adapter_name =~ /mysql/i).present? + end + # Returns a SQL statement for case/accent (if possible) insensitive match def like(left, right, options={}) neg = (options[:match] == false ? 'NOT ' : '') |