Skip to content

Plugin build failures on MySQL 8.0.42 #9

@reillski

Description

@reillski

Hi Team,
I've tried building the videx plugin on MySQL CE 8.0.42(released last week) but have been running into build failures.

Issue 1:
Seems same happens with latest Percona 8.0 releases too. Based on my troubleshooting, it seems related to this fix implemented in MySQL 8.0.40: Commit Bug#33334911 - Multi-valued index performance is too slow: d2ab06a

diff --git a/storage/videx/ha_videx.cc b/storage/videx/ha_videx.cc
.
.
@@ -1113,6 +1113,7 @@ ha_rows ha_videx::multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq,
                                                  void *seq_init_param,
                                                  uint n_ranges, uint *bufsz,
                                                  uint *flags,
+                                                 bool *force_default_mrr [[maybe_unused]],
                                                  Cost_estimate *cost) {
   videx_log_ins.markHaFuncPassby(FUNC_FILE_LINE);
   /* See comments in ha_myisam::multi_range_read_info_const */

diff --git a/storage/videx/ha_videx.h b/storage/videx/ha_videx.h
index bb89cbb421b..49550dff26e 100644
--- a/storage/videx/ha_videx.h
+++ b/storage/videx/ha_videx.h
@@ -174,6 +174,7 @@ class ha_videx : public handler {
   ha_rows multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq,
                                       void *seq_init_param, uint n_ranges,
                                       uint *bufsz, uint *flags,
+                                      bool *force_default_mrr [[maybe_unused]],
                                       Cost_estimate *cost) override;

Issue 2:
Videx seems to have the curl version hard coded, which can change between releases. To build on 8042 I had to make the following change, but perhaps it should be dynamic.

diff --git a/storage/videx/CMakeLists.txt b/storage/videx/CMakeLists.txt
index 36286c28224..6f02f6b8c17 100644
--- a/storage/videx/CMakeLists.txt
+++ b/storage/videx/CMakeLists.txt
@@ -28,7 +28,7 @@ INCLUDE_DIRECTORIES(
         ${CMAKE_SOURCE_DIR}/sql
         ${CMAKE_SOURCE_DIR}/sql/auth
         ${CMAKE_SOURCE_DIR}/extra/rapidjson/include
-        ${CMAKE_SOURCE_DIR}/extra/curl/curl-8.1.2/include
+        ${CMAKE_SOURCE_DIR}/extra/curl/curl-8.12.1/include
 )

Issue 3:
There are some unsupported features in MySQL, that are present in Percona server. Here I had to comment out the following:

diff --git a/storage/videx/ha_videx.cc b/storage/videx/ha_videx.cc
index 194026c6e6a..03e65e17dd8 100644
--- a/storage/videx/ha_videx.cc
+++ b/storage/videx/ha_videx.cc
@@ -266,7 +266,7 @@ static int videx_init_func(void *p) {
        HTON_SUPPORTS_SECONDARY_ENGINE |  // Supports secondary storage engine
        //      HTON_SUPPORTS_TABLE_ENCRYPTION |  // Supports table encryption (commented out)
        //      HTON_SUPPORTS_ONLINE_BACKUPS |    // Supports online backups (commented out)
-       HTON_SUPPORTS_COMPRESSED_COLUMNS |  // Supports compressed columns
+       //HTON_SUPPORTS_COMPRESSED_COLUMNS |  // Supports compressed columns
        HTON_SUPPORTS_GENERATED_INVISIBLE_PK;  // Supports generated invisible primary keys

has_gap_locks() seems to be Percona server specific too: Commit 3728e66 MYR-15 : Optionally block/log queries relying on Gap Locks

   int index_last(uchar *buf) override;

-  bool has_gap_locks() const noexcept override {
-    videx_log_ins.markPassbyUnexpected(FUNC_FILE_LINE);
-    return true; }
+  /** Seems to be PS Server only:
+   * see https://github.com/percona/percona-server/commit/3728e668711cd0b096f6492254b4430920d42980
+   * bool has_gap_locks() const noexcept override {
+   *  videx_log_ins.markPassbyUnexpected(FUNC_FILE_LINE);
+   *  return true; }
+  */

After making the above changes, 8042 builds successfully.

Thanks,
Marc

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions