diff --git a/mariadb/Dockerfile b/mariadb/Dockerfile index 6b534651..7d2845d5 100644 --- a/mariadb/Dockerfile +++ b/mariadb/Dockerfile @@ -23,7 +23,10 @@ RUN --mount=type=cache,id=mariadb-apk-${TARGETARCH},sharing=locked,target=/var/c # base image. Set to 10 minutes just incase it ran on very old or overallocated # hardware. ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME=600000 -# Default Mariadb value of 16 MB (bytes) -ENV MYSQL_MAX_ALLOWED_PACKET=16777216 + +ENV \ + # Default Mariadb value of 16 MB (bytes) + MYSQL_MAX_ALLOWED_PACKET=16777216 \ + MYSQL_TRANSACTION_ISOLATION=READ-COMMITTED COPY --link rootfs / diff --git a/mariadb/README.md b/mariadb/README.md index a659a605..1eb3e4a5 100644 --- a/mariadb/README.md +++ b/mariadb/README.md @@ -41,7 +41,8 @@ default database connection configuration. | :------------------- | :------ | :------------------------------------------------------------------------------------ | | MYSQL_ROOT_PASSWORD | | The database root user password. Defaults to `DB_ROOT_PASSWORD` | | MYSQL_ROOT_USER | | The database root user (used to create the site database). Defaults to `DB_ROOT_USER` | -| MYSQL_MAX_ALLOWED_PACKET | 16777216 | Max packet length to send to or receive from the server, [documentation](https://mariadb.com/docs/server/ref/mdb/system-variables/max_allowed_packet/) | +| MYSQL_MAX_ALLOWED_PACKET | 16777216 | Max packet length to send to or receive from the server, [documentation](https://mariadb.com/docs/server/ref/mdb/system-variables/max_allowed_packet/) +| MYSQL_TRANSACTION_ISOLATION | READ-COMMITTED | The isolation level for transactions. ## Logs diff --git a/mariadb/rootfs/etc/confd/templates/mariadb-server.cnf.tmpl b/mariadb/rootfs/etc/confd/templates/mariadb-server.cnf.tmpl index 75b10f93..a5845def 100644 --- a/mariadb/rootfs/etc/confd/templates/mariadb-server.cnf.tmpl +++ b/mariadb/rootfs/etc/confd/templates/mariadb-server.cnf.tmpl @@ -9,6 +9,7 @@ [mysqld] # skip-networking max_allowed_packet ={{ getenv "MYSQL_MAX_ALLOWED_PACKET" }} +transaction-isolation ={{ getenv "MYSQL_TRANSACTION_ISOLATION" }} # Galera-related settings [galera] # Mandatory settings