Skip to content

Commit dc94bd0

Browse files
committed
MDEV-7520 gtid replication broken during upgrade to debian 10.0.16
Don't binlog mariadb setup sql statements: * use "mysql_install_db --disable-log-bin" * use "mysqld --bootstrap --disable-log-bin" * use "SET sql_log_bin=0"
1 parent 0ba1680 commit dc94bd0

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

debian/dist/Debian/mariadb-server-10.0.postinst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ invoke() {
2121
fi
2222
}
2323

24-
MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --default-storage-engine=myisam"
24+
MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --disable-log-bin --skip-grant-tables --default-storage-engine=myisam"
2525

2626
test_mysql_access() {
2727
mysql --no-defaults -u root -h localhost </dev/null >/dev/null 2>&1
@@ -40,6 +40,7 @@ set_mysql_rootpw() {
4040
# this avoids us having to call "test" or "[" on $rootpw
4141
cat << EOF > $tfile
4242
USE mysql;
43+
SET sql_log_bin=0;
4344
UPDATE user SET password=PASSWORD("$rootpw") WHERE user='root';
4445
FLUSH PRIVILEGES;
4546
EOF
@@ -144,7 +145,7 @@ EOF
144145
# Debian: beware of the bashisms...
145146
# Debian: can safely run on upgrades with existing databases
146147
set +e
147-
/bin/bash /usr/bin/mysql_install_db --rpm --user=mysql 2>&1 | $ERR_LOGGER
148+
/bin/bash /usr/bin/mysql_install_db --rpm --user=mysql --disable-log-bin 2>&1 | $ERR_LOGGER
148149
set -e
149150

150151
## On every reconfiguration the maintenance user is recreated.

debian/dist/Ubuntu/mariadb-server-10.0.postinst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ invoke() {
2121
fi
2222
}
2323

24-
MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --default-storage-engine=myisam"
24+
MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --disable-log-bin --skip-grant-tables --default-storage-engine=myisam"
2525

2626
test_mysql_access() {
2727
mysql --no-defaults -u root -h localhost </dev/null >/dev/null 2>&1
@@ -41,6 +41,7 @@ set_mysql_rootpw() {
4141
# this avoids us having to call "test" or "[" on $rootpw
4242
cat << EOF > $tfile
4343
USE mysql;
44+
SET sql_log_bin=0;
4445
UPDATE user SET password=PASSWORD("$rootpw") WHERE user='root';
4546
FLUSH PRIVILEGES;
4647
EOF
@@ -145,7 +146,7 @@ EOF
145146
# Debian: beware of the bashisms...
146147
# Debian: can safely run on upgrades with existing databases
147148
set +e
148-
/bin/bash /usr/bin/mysql_install_db --rpm --user=mysql 2>&1 | $ERR_LOGGER
149+
/bin/bash /usr/bin/mysql_install_db --rpm --user=mysql --disable-log-bin 2>&1 | $ERR_LOGGER
149150
set -e
150151

151152
## On every reconfiguration the maintenance user is recreated.

0 commit comments

Comments
 (0)