File tree Expand file tree Collapse file tree
misc/python/materialize/mzcompose/services
test/mysql-cdc-old-syntax Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414)
1515
1616
17- def create_mysql_server_args (server_id : str , is_master : bool ) -> list [str ]:
17+ def create_mysql_server_args (
18+ server_id : str , is_master : bool , binlog_full_metadata : str = "full"
19+ ) -> list [str ]:
1820 args = [
1921 "--log-bin=mysql-bin" ,
2022 "--gtid_mode=ON" ,
2123 "--enforce_gtid_consistency=ON" ,
2224 "--binlog-format=row" ,
2325 "--binlog-row-image=full" ,
24- "--binlog-row-metadata=full " ,
26+ f "--binlog-row-metadata={ binlog_full_metadata } " ,
2527 f"--server-id={ server_id } " ,
2628 "--max-connections=500" ,
2729 ]
Original file line number Diff line number Diff line change 3131 CockroachOrPostgresMetadata ,
3232)
3333from materialize .mzcompose .services .minio import Minio
34- from materialize .mzcompose .services .mysql import MySql
34+ from materialize .mzcompose .services .mysql import MySql , create_mysql_server_args
3535from materialize .mzcompose .services .mz import Mz
3636from materialize .mzcompose .services .test_certs import TestCerts
3737from materialize .mzcompose .services .testdrive import Testdrive
4242
4343def create_mysql (mysql_version : str ) -> MySql :
4444 return MySql (
45- version = mysql_version , additional_args = ["--binlog_row_metadata=MINIMAL" ]
45+ version = mysql_version ,
46+ additional_args = create_mysql_server_args (
47+ server_id = "1" , is_master = True , binlog_full_metadata = "minimal"
48+ ),
4649 )
4750
4851
4952def create_mysql_replica (mysql_version : str ) -> MySql :
5053 return MySql (
5154 name = "mysql-replica" ,
5255 version = mysql_version ,
53- additional_args = [
54- "--gtid_mode=ON" ,
55- "--enforce_gtid_consistency=ON" ,
56- "--skip-replica-start" ,
57- "--server-id=2" ,
58- "--binlog_row_metadata=MINIMAL" ,
59- ],
56+ additional_args = create_mysql_server_args (
57+ server_id = "2" , is_master = False , binlog_full_metadata = "minimal"
58+ ),
6059 )
6160
6261
You can’t perform that action at this time.
0 commit comments