-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docker: disable binlog in new MySQL 8 containers
Unlike other flavors, MySQL 8 servers normally have their binary log enabled by default. This makes sense in production, but it is undesirable for ephemeral containerized databases. This commit adjusts Skeema's Docker-related logic to explicitly disable the binlog when creating new ephemeral DB containers, both in workspace=docker and in internal test suites. Disabling the binlog in these ephemeral containers can improve write perf. It also simplifies some code paths and test .sql files which previously explicitly set sql_log_bin=0 at the session level. This change is also advantageous for MySQL 8 workspace=docker users who use CREATE FUNCTION statements that lack the DETERMINISTIC, NO SQL, or READS SQL DATA characteristics. Previously, such statements would result in MySQL error 1418, even if Skeema's user has SUPER privs and sql_log_bin=0 is used at the session level. Although SUPER prevents the similar error 1419, it does not overcome error 1418. The only solutions are to disable binlogging entirely (which requires a server restart); or add one of the necessary characteristics to the function; or enable log_bin_trust_function_creators=1 (which is global-only, no session equivalent so not controllable via Skeema's connect-options). By disabling binlogging for new MySQL 8 containers automatically, this problem is solved cleanly without user intervention. Existing MySQL 8 containers are unaffected by this change, even if those containers were previously created by Skeema (either workspace=docker without docker-cleanup=destroy, or previous runs of Skeema's integration test suite). Users can manually rm those containers and have Skeema create new ones if desired.
- Loading branch information
Showing
26 changed files
with
41 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
# Tables using MariaDB's check constraints | ||
|
||
SET foreign_key_checks=0; | ||
SET sql_log_bin=0; | ||
|
||
use testing | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
# some syntactical differences. | ||
|
||
SET foreign_key_checks=0; | ||
SET sql_log_bin=0; | ||
|
||
use testing | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
# Table using MariaDB's column compression | ||
|
||
SET foreign_key_checks=0; | ||
SET sql_log_bin=0; | ||
|
||
use testing | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
# Table using Percona Server's column compression | ||
|
||
SET foreign_key_checks=0; | ||
SET sql_log_bin=0; | ||
|
||
use testing | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ | |
|
||
|
||
SET foreign_key_checks=0; | ||
SET sql_log_bin=0; | ||
|
||
use testing | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ | |
# char support there.) | ||
|
||
SET foreign_key_checks=0; | ||
SET sql_log_bin=0; | ||
|
||
use testing | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
# preinstalled in MySQL 5.7+) | ||
|
||
SET foreign_key_checks=0; | ||
SET sql_log_bin=0; | ||
|
||
use testing | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ | |
# support in generation expressions. | ||
|
||
SET foreign_key_checks=0; | ||
SET sql_log_bin=0; | ||
|
||
use testing | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
# Advanced index features present in MySQL 8+ | ||
|
||
SET foreign_key_checks=0; | ||
SET sql_log_bin=0; | ||
|
||
use testing | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
# due to a MariaDB bug; see MDEV-20210 | ||
|
||
SET foreign_key_checks=0; | ||
SET sql_log_bin=0; | ||
|
||
use testing | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
# with IN / OUT / INOUT param qualifiers | ||
|
||
SET foreign_key_checks=0; | ||
SET sql_log_bin=0; | ||
|
||
use testing | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
SET foreign_key_checks=0; | ||
SET sql_log_bin=0; | ||
|
||
use testing | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters