summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2023-11-26 13:56:36 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2023-11-26 13:56:36 +0000
commit9575af8c83f1c14cc9f401207703d66a83a7675e (patch)
treebca053915f11f37b75dffd7f9ff377e7f7bd98c5
parent4daed3c8678d2afce69cbd626d309b6ce3cfc913 (diff)
downloadredmine-9575af8c83f1c14cc9f401207703d66a83a7675e.tar.gz
redmine-9575af8c83f1c14cc9f401207703d66a83a7675e.zip
Merged r22475 to r22477 from trunk to 5.1-stable (#39737).
git-svn-id: https://svn.redmine.org/redmine/branches/5.1-stable@22480 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--config/database.yml.example10
-rw-r--r--doc/INSTALL24
-rw-r--r--test/functional/timelog_report_test.rb2
3 files changed, 33 insertions, 3 deletions
diff --git a/config/database.yml.example b/config/database.yml.example
index 727b4d89b..6b0849602 100644
--- a/config/database.yml.example
+++ b/config/database.yml.example
@@ -10,6 +10,12 @@ production:
password: ""
# Use "utf8" instead of "utfmb4" for MySQL prior to 5.7.7
encoding: utf8mb4
+ variables:
+ # Recommended `transaction_isolation` for MySQL to avoid concurrency issues is
+ # `READ-COMMITTED`.
+ # In case of MySQL lower than 8, the variable name is `tx_isolation`.
+ # See https://www.redmine.org/projects/redmine/wiki/MySQL_configuration
+ transaction_isolation: "READ-COMMITTED"
development:
adapter: mysql2
@@ -19,6 +25,8 @@ development:
password: ""
# Use "utf8" instead of "utfmb4" for MySQL prior to 5.7.7
encoding: utf8mb4
+ variables:
+ transaction_isolation: "READ-COMMITTED"
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
@@ -31,6 +39,8 @@ test:
password: ""
# Use "utf8" instead of "utfmb4" for MySQL prior to 5.7.7
encoding: utf8mb4
+ variables:
+ transaction_isolation: "READ-COMMITTED"
# PostgreSQL configuration example
#production:
diff --git a/doc/INSTALL b/doc/INSTALL
index 1487b8317..e8bc11d33 100644
--- a/doc/INSTALL
+++ b/doc/INSTALL
@@ -10,8 +10,8 @@ http://www.redmine.org/
* Ruby 2.7, 3.0, 3.1, 3.2
* A database:
- * MySQL (tested with MySQL 5.7)
- * PostgreSQL (tested with PostgreSQL 9.5)
+ * MySQL (tested with MySQL 8)
+ * PostgreSQL (tested with PostgreSQL 14)
* SQLite3 (tested with SQLite 3.11)
* SQLServer (tested with SQLServer 2012)
@@ -86,6 +86,26 @@ The current version of Firefox, Safari, Chrome, Chromium and Microsoft Edge.
Go to "Administration" to load the default configuration data (roles,
trackers, statuses, workflow) and to adjust the application settings
+== Database server configuration
+
+When using MySQL with Redmine 5.1.1 or later, it is necessary to change
+the transaction isolation level from the default REPEATABLE READ to
+READ_COMMITTED. To modify this setting, either change the database
+configuration file or alter the settings on your MySQL server.
+
+To set the transaction isolation level in the database configuration file,
+add transaction_isolation variable as below:
+
+ production:
+ adapter: mysql2
+ database: redmine
+ host: localhost
+ [...]
+ variables:
+ transaction_isolation: "READ-COMMITTED"
+
+More details can be found in https://www.redmine.org/projects/redmine/wiki/MySQL_configuration.
+
== SMTP server Configuration
Copy config/configuration.yml.example to config/configuration.yml and
diff --git a/test/functional/timelog_report_test.rb b/test/functional/timelog_report_test.rb
index b555378d0..1aac36077 100644
--- a/test/functional/timelog_report_test.rb
+++ b/test/functional/timelog_report_test.rb
@@ -231,7 +231,7 @@ class TimelogReportTest < Redmine::ControllerTest
get :report, :params => {:project_id => 1, :criteria => ['activity']}
assert_response :success
- assert_select 'tr.last-level:first' do
+ assert_select 'tr.last-level' do
assert_select 'td.name', :text => 'Design'
assert_select 'td.hours:last', :text => '165:15'
end