diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2023-04-13 13:26:18 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2023-04-13 13:26:18 +0300 |
commit | 86d7b121d74f8b7671175c38ae54e675b23e9f84 (patch) | |
tree | 46e47d0a9448549f63290377f22d615be9617600 | |
parent | d0680e70eb6157168c20702c8614b0e3ac618cba (diff) | |
download | mariadb-git-bb-11.1-MDEV-29911.tar.gz |
squash! f6fa068076419395cc82d3757cfa8a0bd4b0cf56bb-11.1-MDEV-29911
recv_sys_t::is_initialised(): Refer to end_lsn.
-rw-r--r-- | storage/innobase/include/log0recv.h | 2 | ||||
-rw-r--r-- | storage/innobase/log/log0recv.cc | 10 | ||||
-rw-r--r-- | storage/innobase/srv/srv0start.cc | 2 |
3 files changed, 8 insertions, 6 deletions
diff --git a/storage/innobase/include/log0recv.h b/storage/innobase/include/log0recv.h index 5974d4e99a1..9a5149e022a 100644 --- a/storage/innobase/include/log0recv.h +++ b/storage/innobase/include/log0recv.h @@ -323,7 +323,7 @@ public: /** Clean up after create() */ void close(); - bool is_initialised() const { return lsn != 0; } + bool is_initialised() const { return end_lsn != 0; } /** Find the latest checkpoint. @return error code or DB_SUCCESS */ diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc index 4bab5908180..c7f810d2b66 100644 --- a/storage/innobase/log/log0recv.cc +++ b/storage/innobase/log/log0recv.cc @@ -1287,7 +1287,7 @@ void recv_sys_t::close() deferred_spaces.clear(); ut_d(mysql_mutex_unlock(&mutex)); - lsn= 0; + end_lsn= 0; mysql_mutex_destroy(&mutex); } @@ -1308,7 +1308,8 @@ void recv_sys_t::create() len = 0; offset = 0; - lsn = 1; + lsn = 0; + end_lsn = 1; found_corrupt_log = false; found_corrupt_fs = false; file_checkpoint = 0; @@ -3987,7 +3988,7 @@ static bool recv_scan_log(bool last_phase) ut_ad(!last_phase); rewound_lsn= recv_sys.lsn; store= false; - if (!recv_sys.end_lsn) + if (recv_sys.end_lsn <= 1) goto skip_the_rest; ut_ad(recv_sys.file_checkpoint); goto func_exit; @@ -3998,7 +3999,8 @@ static bool recv_scan_log(bool last_phase) { ut_ad(r == recv_sys_t::GOT_EOF); got_eof: - if (recv_sys.end_lsn) + ut_ad(recv_sys.is_initialised()); + if (recv_sys.end_lsn > 1) { ut_ad(recv_sys.end_lsn == recv_sys.lsn); break; diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc index b1e7f542071..05cecddadbf 100644 --- a/storage/innobase/srv/srv0start.cc +++ b/storage/innobase/srv/srv0start.cc @@ -1874,7 +1874,7 @@ skip_monitors: "%s" #endif "; transaction id " TRX_ID_FMT, - recv_sys.lsn > 1 ? recv_sys.lsn : 0, + recv_sys.lsn, #ifdef HAVE_PMEM log_sys.is_pmem() ? " (memory-mapped)" : "", |