File tree 2 files changed +30
-13
lines changed
2 files changed +30
-13
lines changed Original file line number Diff line number Diff line change @@ -121,3 +121,32 @@ def bin_log_basename(self):
121
121
bin_log_basename = cursor .fetchone ()[0 ]
122
122
bin_log_basename = bin_log_basename .split ("/" )[- 1 ]
123
123
return bin_log_basename
124
+
125
+
126
+ class PyMySQLReplicationMariaDbTestCase (PyMySQLReplicationTestCase ):
127
+ def setUp (self ):
128
+ # default
129
+ self .database = {
130
+ "host" : "localhost" ,
131
+ "user" : "root" ,
132
+ "passwd" : "" ,
133
+ "port" : 3308 ,
134
+ "use_unicode" : True ,
135
+ "charset" : "utf8" ,
136
+ "db" : "pymysqlreplication_test"
137
+ }
138
+
139
+ self .conn_control = None
140
+ db = copy .copy (self .database )
141
+ db ["db" ] = None
142
+ self .connect_conn_control (db )
143
+ self .execute ("DROP DATABASE IF EXISTS pymysqlreplication_test" )
144
+ self .execute ("CREATE DATABASE pymysqlreplication_test" )
145
+ db = copy .copy (self .database )
146
+ self .connect_conn_control (db )
147
+ self .stream = None
148
+ self .resetBinLog ()
149
+
150
+
151
+
152
+
Original file line number Diff line number Diff line change @@ -1002,19 +1002,7 @@ def test_parsing(self):
1002
1002
gtid = Gtid ("57b70f4e-20d3-11e5-a393-4a63946f7eac:1-:1" )
1003
1003
gtid = Gtid ("57b70f4e-20d3-11e5-a393-4a63946f7eac::1" )
1004
1004
1005
- class TestMariadbBinlogStreaReader (base .PyMySQLReplicationTestCase ):
1006
- def setUp (self ):
1007
- super (TestMariadbBinlogStreaReader ,self ).setUp ()
1008
- self .stream .close ()
1009
- maria_db = copy .copy (self .database )
1010
- maria_db ["db" ] = None
1011
- maria_db ["port" ] = 3308
1012
- self .connect_conn_control (maria_db )
1013
- self .execute ("DROP DATABASE IF EXISTS pymysqlreplication_test" )
1014
- self .execute ("CREATE DATABASE pymysqlreplication_test" )
1015
- self .isMariaDB ()
1016
- self .stream = BinLogStreamReader (maria_db , server_id = 1024 ,
1017
- ignored_events = self .ignoredEvents ())
1005
+ class TestMariadbBinlogStreaReader (base .PyMySQLReplicationMariaDbTestCase ):
1018
1006
1019
1007
def test_gtid_list_event (self ):
1020
1008
event = self .stream .fetchone ()
You can’t perform that action at this time.
0 commit comments