Bug #99642 some mysql_pfs_key_t variables are not defined under macro
Submitted: 20 May 2020 7:17 Modified: 20 May 2020 8:13
Reporter: zhai weixiang (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:8.0.20 OS:Any
Assigned to: CPU Architecture:Any

[20 May 2020 7:17] zhai weixiang
Description:
In log/log0meb.cc:

  62 mysql_pfs_key_t redo_log_archive_consumer_thread_key;
  63 mysql_pfs_key_t redo_log_archive_file_key;

How to repeat:
read the code

Suggested fix:
diff --git a/storage/innobase/log/log0meb.cc b/storage/innobase/log/log0meb.cc
index eb323cd..a7aa8e4 100644
--- a/storage/innobase/log/log0meb.cc
+++ b/storage/innobase/log/log0meb.cc
@@ -51,8 +51,12 @@ namespace meb {
 const std::string logmsgpfx("innodb_redo_log_archive: ");
 constexpr size_t QUEUE_BLOCK_SIZE = 4096;
 constexpr size_t QUEUE_SIZE_MAX = 16384;
+#ifdef UNIV_PFS_THREAD
 mysql_pfs_key_t redo_log_archive_consumer_thread_key;
+#endif
+#ifdef UNIV_PFS_IO
 mysql_pfs_key_t redo_log_archive_file_key;
+#endif
[20 May 2020 8:13] MySQL Verification Team
Hello zhai,

Thank you for the report and feedback.

regards,
Umesh