@@ -907,37 +907,34 @@ fil_name_process(char* name, ulint len, ulint space_id, bool deleted)
907
907
/* * Clean up after recv_sys_t::create() */
908
908
void recv_sys_t::close ()
909
909
{
910
- ut_ad (this == &recv_sys);
911
- ut_ad (!recv_writer_thread_active);
912
-
913
- if (is_initialised ()) {
914
- dblwr.pages .clear ();
915
- ut_d (mutex_enter (&mutex));
916
- clear ();
917
- ut_d (mutex_exit (&mutex));
910
+ ut_ad (this == &recv_sys);
911
+ ut_ad (!recv_writer_thread_active);
918
912
919
- if (flush_start) {
920
- os_event_destroy (flush_start);
921
- }
913
+ if (is_initialised ())
914
+ {
915
+ dblwr.pages .clear ();
916
+ ut_d (mutex_enter (&mutex));
917
+ clear ();
918
+ ut_d (mutex_exit (&mutex));
922
919
923
- if (flush_end) {
924
- os_event_destroy (flush_end);
925
- }
920
+ os_event_destroy (flush_start);
921
+ os_event_destroy (flush_end);
926
922
927
- if (buf) {
928
- ut_free_dodump (buf, RECV_PARSING_BUF_SIZE);
929
- buf = NULL ;
930
- }
923
+ if (buf)
924
+ {
925
+ ut_free_dodump (buf, RECV_PARSING_BUF_SIZE);
926
+ buf= nullptr ;
927
+ }
931
928
932
- last_stored_lsn = 0 ;
933
- mutex_free (&writer_mutex);
934
- mutex_free (&mutex);
935
- }
929
+ last_stored_lsn = 0 ;
930
+ mutex_free (&writer_mutex);
931
+ mutex_free (&mutex);
932
+ }
936
933
937
- recv_spaces.clear ();
938
- mlog_init.clear ();
934
+ recv_spaces.clear ();
935
+ mlog_init.clear ();
939
936
940
- files. clear ();
937
+ close_files ();
941
938
}
942
939
943
940
/* *****************************************************************/ /* *
@@ -1060,24 +1057,25 @@ inline void recv_sys_t::clear()
1060
1057
/* * Free most recovery data structures. */
1061
1058
void recv_sys_t::debug_free ()
1062
1059
{
1063
- ut_ad (this == &recv_sys);
1064
- ut_ad (is_initialised ());
1065
- mutex_enter (&mutex);
1060
+ ut_ad (this == &recv_sys);
1061
+ ut_ad (is_initialised ());
1062
+ mutex_enter (&mutex);
1066
1063
1067
- pages.clear ();
1068
- ut_free_dodump (buf, RECV_PARSING_BUF_SIZE);
1064
+ pages.clear ();
1065
+ ut_free_dodump (buf, RECV_PARSING_BUF_SIZE);
1069
1066
1070
- buf = NULL ;
1067
+ buf= nullptr ;
1071
1068
1072
- /* wake page cleaner up to progress */
1073
- if (!srv_read_only_mode) {
1074
- ut_ad (!recv_recovery_is_on ());
1075
- ut_ad (!recv_writer_thread_active);
1076
- os_event_reset (buf_flush_event);
1077
- os_event_set (flush_start);
1078
- }
1069
+ /* wake page cleaner up to progress */
1070
+ if (!srv_read_only_mode)
1071
+ {
1072
+ ut_ad (!recv_recovery_is_on ());
1073
+ ut_ad (!recv_writer_thread_active);
1074
+ os_event_reset (buf_flush_event);
1075
+ os_event_set (flush_start);
1076
+ }
1079
1077
1080
- mutex_exit (&mutex);
1078
+ mutex_exit (&mutex);
1081
1079
}
1082
1080
1083
1081
inline void *recv_sys_t ::alloc(size_t len)
0 commit comments