@@ -895,21 +895,8 @@ def test_mariadb_only_status_vars(self):
895
895
896
896
897
897
class TestDataTypeVersion8 (base .PyMySQLReplicationPercona8TestCase ):
898
- def test_partition_id (self ):
899
- if not self .isMySQL80AndMore ():
900
- self .skipTest ("Not supported in this version of MySQL" )
901
- create_query = "CREATE TABLE test (id INTEGER) \
902
- PARTITION BY RANGE (id) ( \
903
- PARTITION p0 VALUES LESS THAN (1), \
904
- PARTITION p1 VALUES LESS THAN (2), \
905
- PARTITION p2 VALUES LESS THAN (3), \
906
- PARTITION p3 VALUES LESS THAN (4), \
907
- PARTITION p4 VALUES LESS THAN (5) \
908
- )"
909
- insert_query = "INSERT INTO test (id) VALUES(3)"
910
- event = self .create_and_insert_value (create_query , insert_query )
911
- self .assertEqual (event .extra_data_type , 1 )
912
- self .assertEqual (event .partition_id , 3 )
898
+ def ignoredEvents (self ):
899
+ return [GtidEvent , PreviousGtidsEvent ]
913
900
914
901
def create_and_insert_value (self , create_query , insert_query ):
915
902
self .execute (create_query )
@@ -934,6 +921,23 @@ def create_and_insert_value(self, create_query, insert_query):
934
921
self .assertIsInstance (event , WriteRowsEvent )
935
922
return event
936
923
924
+ def test_partition_id (self ):
925
+ if not self .isMySQL80AndMore ():
926
+ self .skipTest ("Not supported in this version of MySQL" )
927
+ create_query = "CREATE TABLE test (id INTEGER) \
928
+ PARTITION BY RANGE (id) ( \
929
+ PARTITION p0 VALUES LESS THAN (1), \
930
+ PARTITION p1 VALUES LESS THAN (2), \
931
+ PARTITION p2 VALUES LESS THAN (3), \
932
+ PARTITION p3 VALUES LESS THAN (4), \
933
+ PARTITION p4 VALUES LESS THAN (5) \
934
+ )"
935
+ insert_query = "INSERT INTO test (id) VALUES(3)"
936
+ event = self .create_and_insert_value (create_query , insert_query )
937
+ self .assertEqual (event .extra_data_type , 1 )
938
+ self .assertEqual (event .partition_id , 3 )
939
+
940
+
937
941
938
942
if __name__ == "__main__" :
939
943
unittest .main ()
0 commit comments