+diff -ur mysql-8.2.0.orig/sql/iterators/composite_iterators.cc mysql-8.2.0/sql/iterators/composite_iterators.cc
+--- mysql-8.2.0.orig/sql/iterators/composite_iterators.cc 2023-12-18 01:19:35.299294336 +0100
++++ mysql-8.2.0/sql/iterators/composite_iterators.cc 2023-12-18 02:13:09.216002357 +0100
+@@ -35,7 +35,7 @@
+ #include "my_dbug.h"
+ #include "my_inttypes.h"
+ #include "my_sys.h"
+-#include "my_xxhash.h"
++#include <xxhash.h>
+ #include "mysqld_error.h"
+ #include "prealloced_array.h"
+ #include "scope_guard.h"
+@@ -2255,7 +2255,7 @@
+ const ulonglong primary_hash =
+ static_cast<ulonglong>(m_materialized_table->hash_field->val_int());
+ const uint64_t chunk_hash =
+- MY_XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed);
++ XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed);
+
+ const size_t chunk_index = hash_to_chunk_index(chunk_hash);
+ m_offending_row.m_chunk_offset = chunk_offset(chunk_index);
+@@ -2331,7 +2331,7 @@
+ const ulonglong primary_hash =
+ static_cast<ulonglong>(m_materialized_table->hash_field->val_int());
+ const uint64_t chunk_hash =
+- MY_XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed);
++ XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed);
+ const size_t chunk_index = hash_to_chunk_index(chunk_hash);
+ const size_t set_index = chunk_index_to_set(chunk_index);
+ const size_t offset = chunk_offset(chunk_index);
+@@ -2396,7 +2396,7 @@
+ const ulonglong primary_hash =
+ static_cast<ulonglong>(m_materialized_table->hash_field->val_int());
+ const uint64_t chunk_hash =
+- MY_XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed);
++ XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed);
+ const size_t chunk_index = hash_to_chunk_index(chunk_hash);
+ const size_t set_index = chunk_index_to_set(chunk_index);
+ const size_t offset = chunk_offset(chunk_index);
+@@ -2491,7 +2491,7 @@
+ m_materialized_table->hash_field->store(
+ static_cast<longlong>(primary_hash), true);
+ const uint64_t chunk_hash =
+- MY_XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed);
++ XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed);
+ const size_t chunk_index = hash_to_chunk_index(chunk_hash);
+ const size_t set_index = chunk_index_to_set(chunk_index);
+ const size_t offset = chunk_offset(chunk_index);
+@@ -2548,7 +2548,7 @@
+ const ulonglong primary_hash =
+ static_cast<ulonglong>(m_materialized_table->hash_field->val_int());
+ const uint64_t chunk_hash =
+- MY_XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed);
++ XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed);
+ const size_t chunk_index = hash_to_chunk_index(chunk_hash);
+ const size_t set_index = chunk_index_to_set(chunk_index);
+ assert(chunk_offset(chunk_index) == chunk_idx);
+@@ -2787,7 +2787,7 @@
+ const ulonglong primary_hash = static_cast<ulonglong>(
+ m_materialized_table->hash_field->val_int());
+ const uint64_t chunk_hash =
+- MY_XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed);
++ XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed);
+ const size_t chunk_index = hash_to_chunk_index(chunk_hash);
+ const size_t set_index = chunk_index_to_set(chunk_index);
+ assert(chunk_offset(chunk_index) == m_current_chunk_idx);
+@@ -2820,7 +2820,7 @@
+ const ulonglong primary_hash = static_cast<ulonglong>(
+ m_materialized_table->hash_field->val_int());
+ const uint64_t chunk_hash =
+- MY_XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed);
++ XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed);
+ const size_t chunk_index = hash_to_chunk_index(chunk_hash);
+ assert(chunk_index_to_set(chunk_index) == set_idx);
+ assert(chunk_offset(chunk_index) == m_current_chunk_idx);
+@@ -2909,7 +2909,7 @@
+ const ulonglong primary_hash = static_cast<ulonglong>(
+ m_materialized_table->hash_field->val_int());
+ const uint64_t chunk_hash =
+- MY_XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed);
++ XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed);
+ const size_t chunk_index = hash_to_chunk_index(chunk_hash);
+ assert(chunk_index_to_set(chunk_index) == set_idx);
+ assert(chunk_offset(chunk_index) == m_current_chunk_idx);
+diff -ur mysql-8.2.0.orig/sql/iterators/hash_join_iterator.cc mysql-8.2.0/sql/iterators/hash_join_iterator.cc
+--- mysql-8.2.0.orig/sql/iterators/hash_join_iterator.cc 2023-12-18 01:19:35.299294336 +0100
++++ mysql-8.2.0/sql/iterators/hash_join_iterator.cc 2023-12-18 01:20:07.132718589 +0100