summaryrefslogtreecommitdiffstats
path: root/test/test_helper.rb
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2023-11-19 07:10:53 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2023-11-19 07:10:53 +0000
commitf24631a8bd8d2c220fa27495ef22e3672f43297b (patch)
tree19f2e97157a1225759cd0e3e9e0827cd7aa7a71e /test/test_helper.rb
parent0a329dce2f94e883f2f29b7731953a3ff6377630 (diff)
downloadredmine-f24631a8bd8d2c220fa27495ef22e3672f43297b.tar.gz
redmine-f24631a8bd8d2c220fa27495ef22e3672f43297b.zip
Use tx_isolation for MySQL lower than 8. (#39437).
git-svn-id: https://svn.redmine.org/redmine/trunk@22464 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r--test/test_helper.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb
index c5fe079c8..19fa1ca4f 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -203,6 +203,10 @@ class ActiveSupport::TestCase
Redmine::Database.mysql?
end
+ def mysql8?
+ Gem::Version.new(Redmine::Database.mysql_version) >= Gem::Version.new('8.0.0')
+ end
+
def postgresql?
Redmine::Database.postgresql?
end