зеркало из https://github.com/github/vitess-gh.git
Make sure 5.7 doesn't read 5.6 config file
Add SBR and sql-mode lines back in Signed-off-by: Morgan Tocker <tocker@gmail.com>
This commit is contained in:
Родитель
17481470bc
Коммит
4193d0378c
|
@ -31,5 +31,10 @@ connect_timeout = 30
|
|||
innodb_lock_wait_timeout = 20
|
||||
max_allowed_packet = 64M
|
||||
|
||||
# These two settings are required for the testsuite to pass,
|
||||
# but enabling them does not spark joy. They should be removed
|
||||
# in the future.
|
||||
binlog-format=statement
|
||||
sql_mode = STRICT_TRANS_TABLES
|
||||
|
||||
|
||||
|
|
|
@ -152,7 +152,6 @@ DB_CHARSET=CHARACTER SET utf8 COLLATE utf8_general_ci
|
|||
Ensure you have log bin enabled on your external database.
|
||||
You may add the following configs to your conf.d directory and reload mysqld on your server
|
||||
```
|
||||
vitess/config/mycnf/master_mysql56.cnf
|
||||
vitess/config/mycnf/rbr.cnf
|
||||
```
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ services:
|
|||
volumes:
|
||||
- vol-db:/var/lib/mysql
|
||||
- ./mysql/:/docker-entrypoint-initdb.d/
|
||||
- ./mysql/master_mysql56.cnf:/etc/mysql/conf.d/master_mysql56.cnf
|
||||
- ./mysql/query.log:/var/log/mysql/query.log
|
||||
- ./mysql/slow.log:/var/log/mysql/slow.log
|
||||
healthcheck:
|
||||
|
|
|
@ -70,7 +70,6 @@ if [ $tablet_role != "master" ]; then
|
|||
fi
|
||||
# Enforce Row Based Replication
|
||||
export EXTRA_MY_CNF=$VTROOT/config/mycnf/default-fast.cnf:$VTROOT/config/mycnf/rbr.cnf
|
||||
export EXTRA_MY_CNF=$EXTRA_MY_CNF:$VTROOT/config/mycnf/master_mysql56.cnf
|
||||
|
||||
mkdir -p $VTDATAROOT/backups
|
||||
|
||||
|
|
|
@ -87,9 +87,6 @@ spec:
|
|||
-tablet_uid {{uid}}
|
||||
-socket_file $VTDATAROOT/mysqlctl.sock
|
||||
-init_db_sql_file $VTROOT/config/init_db.sql" vitess
|
||||
env:
|
||||
- name: EXTRA_MY_CNF
|
||||
value: /vt/config/mycnf/benchmark.cnf:/vt/config/mycnf/master_mysql56.cnf
|
||||
volumes:
|
||||
- name: syslog
|
||||
hostPath: {path: /dev/log}
|
||||
|
|
|
@ -69,9 +69,6 @@ spec:
|
|||
-orc_api_url http://orchestrator/api
|
||||
-orc_discover_interval 5m
|
||||
-restore_from_backup {{backup_flags}}" vitess
|
||||
env:
|
||||
- name: EXTRA_MY_CNF
|
||||
value: /vt/config/mycnf/master_mysql56.cnf
|
||||
- name: mysql
|
||||
image: {{vitess_image}}
|
||||
volumeMounts:
|
||||
|
@ -96,9 +93,6 @@ spec:
|
|||
-tablet_uid {{uid}}
|
||||
-socket_file $VTDATAROOT/mysqlctl.sock
|
||||
-init_db_sql_file $VTROOT/config/init_db.sql" vitess
|
||||
env:
|
||||
- name: EXTRA_MY_CNF
|
||||
value: /vt/config/mycnf/master_mysql56.cnf
|
||||
volumes:
|
||||
- name: syslog
|
||||
hostPath: {path: /dev/log}
|
||||
|
|
|
@ -116,22 +116,7 @@ func GetMySQLOptions(flavor string) (string, []string, error) {
|
|||
}
|
||||
|
||||
mycnf := []string{}
|
||||
switch flavor {
|
||||
case "MariaDB103":
|
||||
mycnf = append(mycnf, "config/mycnf/default-fast.cnf")
|
||||
mycnf = append(mycnf, "config/mycnf/master_mariadb103.cnf")
|
||||
case "MariaDB":
|
||||
mycnf = append(mycnf, "config/mycnf/default-fast.cnf")
|
||||
mycnf = append(mycnf, "config/mycnf/master_mariadb100.cnf")
|
||||
case "MySQL80":
|
||||
mycnf = append(mycnf, "config/mycnf/default-fast.cnf")
|
||||
mycnf = append(mycnf, "config/mycnf/master_mysql80.cnf")
|
||||
case "MySQL56":
|
||||
mycnf = append(mycnf, "config/mycnf/default-fast.cnf")
|
||||
mycnf = append(mycnf, "config/mycnf/master_mysql56.cnf")
|
||||
default:
|
||||
return "", nil, fmt.Errorf("unknown mysql flavor: %s", flavor)
|
||||
}
|
||||
mycnf = append(mycnf, "config/mycnf/default-fast.cnf")
|
||||
|
||||
for i, cnf := range mycnf {
|
||||
mycnf[i] = path.Join(os.Getenv("VTTOP"), cnf)
|
||||
|
|
|
@ -392,7 +392,7 @@ metadata:
|
|||
data:
|
||||
extra.cnf: |-
|
||||
early-plugin-load=keyring_vault=keyring_vault.so
|
||||
# this includes default rpl plugins, see https://github.com/vitessio/vitess/blob/master/config/mycnf/master_mysql56.cnf for details
|
||||
# this includes default rpl plugins, see https://github.com/vitessio/vitess/blob/master/config/mycnf/master_mysql57.cnf for details
|
||||
plugin-load=rpl_semi_sync_master=semisync_master.so;rpl_semi_sync_slave=semisync_slave.so;keyring_udf=keyring_udf.so
|
||||
keyring_vault_config=/vt/usersecrets/vttablet-vault/vault.conf # load keyring configuration from secret
|
||||
innodb_encrypt_tables=ON # encrypt all tables by default
|
||||
|
|
|
@ -49,7 +49,6 @@ class MariaDB(MysqlFlavor):
|
|||
def my_cnf(self):
|
||||
files = [
|
||||
os.path.join(vttop, "config/mycnf/default-fast.cnf"),
|
||||
os.path.join(vttop, "config/mycnf/master_mariadb100.cnf"),
|
||||
]
|
||||
return ":".join(files)
|
||||
|
||||
|
@ -59,7 +58,6 @@ class MariaDB103(MysqlFlavor):
|
|||
def my_cnf(self):
|
||||
files = [
|
||||
os.path.join(vttop, "config/mycnf/default-fast.cnf"),
|
||||
os.path.join(vttop, "config/mycnf/master_mariadb103.cnf"),
|
||||
]
|
||||
return ":".join(files)
|
||||
|
||||
|
@ -69,7 +67,6 @@ class MySQL56(MysqlFlavor):
|
|||
def my_cnf(self):
|
||||
files = [
|
||||
os.path.join(vttop, "config/mycnf/default-fast.cnf"),
|
||||
os.path.join(vttop, "config/mycnf/master_mysql56.cnf"),
|
||||
]
|
||||
return ":".join(files)
|
||||
|
||||
|
@ -79,7 +76,6 @@ class MySQL80(MysqlFlavor):
|
|||
def my_cnf(self):
|
||||
files = [
|
||||
os.path.join(vttop, "config/mycnf/default-fast.cnf"),
|
||||
os.path.join(vttop, "config/mycnf/master_mysql80.cnf"),
|
||||
]
|
||||
return ":".join(files)
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ class MariaDB(MysqlFlavor):
|
|||
]
|
||||
|
||||
def extra_my_cnf(self):
|
||||
return environment.vttop + "/config/mycnf/master_mariadb100.cnf"
|
||||
return ""
|
||||
|
||||
def master_position(self, tablet):
|
||||
gtid = tablet.mquery("", "SELECT @@GLOBAL.gtid_binlog_pos")[0][0]
|
||||
|
@ -152,7 +152,7 @@ class MariaDB103(MariaDB):
|
|||
"""Overrides specific to MariaDB 10.3+."""
|
||||
|
||||
def extra_my_cnf(self):
|
||||
return environment.vttop + "/config/mycnf/master_mariadb103.cnf"
|
||||
return ""
|
||||
|
||||
class MySQL56(MysqlFlavor):
|
||||
"""Overrides specific to MySQL 5.6/5.7"""
|
||||
|
@ -172,7 +172,7 @@ class MySQL56(MysqlFlavor):
|
|||
]).strip() == "true"
|
||||
|
||||
def extra_my_cnf(self):
|
||||
return environment.vttop + "/config/mycnf/master_mysql56.cnf"
|
||||
return ""
|
||||
|
||||
def change_master_commands(self, host, port, pos):
|
||||
gtid = pos.split("/")[1]
|
||||
|
@ -186,7 +186,7 @@ class MySQL56(MysqlFlavor):
|
|||
class MySQL80(MySQL56):
|
||||
"""Overrides specific to MySQL 8.0."""
|
||||
def extra_my_cnf(self):
|
||||
return environment.vttop + "/config/mycnf/master_mysql80.cnf"
|
||||
return ""
|
||||
def change_passwords(self, password_col):
|
||||
"""set real passwords for all users"""
|
||||
return '''
|
||||
|
|
Загрузка…
Ссылка в новой задаче