Skip to content

Commit

Permalink
Support running server with autocommit
Browse files Browse the repository at this point in the history
Forces initiation queries to run in autocommit then use the provided mode

Fixed #816
  • Loading branch information
LaurentGoderre committed Jun 18, 2024
1 parent c857c9c commit 319db56
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
6 changes: 5 additions & 1 deletion 8.0/docker-entrypoint.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion 8.4/docker-entrypoint.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ docker_create_db_directories() {
# initializes the database directory
docker_init_database_dir() {
mysql_note "Initializing database files"
"$@" --initialize-insecure --default-time-zone=SYSTEM
"$@" --initialize-insecure --default-time-zone=SYSTEM --autocommit=1
# explicitly enable autocommit to combat https://bugs.mysql.com/bug.php?id=110535 (TODO remove this when 8.0 is EOL; see https://github.com/mysql/mysql-server/commit/7dbf4f80ed15f3c925cfb2b834142f23a2de719a)
mysql_note "Database files initialized"
}

Expand Down Expand Up @@ -292,6 +293,9 @@ docker_setup_db() {

# tell docker_process_sql to not use MYSQL_ROOT_PASSWORD since it is just now being set
docker_process_sql --dont-use-mysql-root-password --database=mysql <<-EOSQL
-- enable autocommit explicitly (in case it was disabled globally)
SET autocommit = 1;
-- What's done in this file shouldn't be replicated
-- or products like mysql-fabric won't work
SET @@SESSION.SQL_LOG_BIN=0;
Expand Down
6 changes: 5 additions & 1 deletion innovation/docker-entrypoint.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 319db56

Please sign in to comment.