mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
MariaDB port (#11803)
Co-authored-by: DigitalBox98 <digitalbox098@gmail.com>
This commit is contained in:
58
dev-db/mariadb/additional-files/README-INSTALL
Normal file
58
dev-db/mariadb/additional-files/README-INSTALL
Normal file
@@ -0,0 +1,58 @@
|
||||
README-INSTALL
|
||||
==============
|
||||
|
||||
Complete the setup
|
||||
------------------
|
||||
|
||||
You need to complete the setup on Haiku operating system with the below commands:
|
||||
|
||||
mariadb-secure-installation
|
||||
|
||||
Enter current password for root (enter for none):
|
||||
Enable unix_socket authentication? [Y/n] n
|
||||
Set root password? [Y/n] Y
|
||||
New password:
|
||||
Re-enter new password:
|
||||
Remove anonymous users? [Y/n] n
|
||||
Disallow root login remotely? [Y/n]
|
||||
Remove test database and access to it? [Y/n] n
|
||||
Reload privilege tables now? [Y/n] Y
|
||||
|
||||
|
||||
First connection
|
||||
----------------
|
||||
|
||||
mariadb -u root -p
|
||||
|
||||
or use a SQL client (SquirrelSQL, DBVisualizer, ...)
|
||||
|
||||
|
||||
Server administration
|
||||
---------------------
|
||||
|
||||
If you need to stop the server :
|
||||
mariadb-admin -u root -p shutdown
|
||||
|
||||
If you need to start the server :
|
||||
mariadbd --user=user --datadir=/var/mysql
|
||||
|
||||
|
||||
Uninstall
|
||||
---------
|
||||
|
||||
Uninstallation of the package doesn't suppress the folder with the databases.
|
||||
|
||||
If you need to clean-up the databases then type :
|
||||
|
||||
rm -rf /var/mysql
|
||||
|
||||
Enjoy !
|
||||
|
||||
|
||||
More information
|
||||
----------------
|
||||
|
||||
You can check : https://wiki.archlinux.org/title/MariaDB
|
||||
|
||||
|
||||
|
||||
21
dev-db/mariadb/additional-files/setup-mariadb.sh
Normal file
21
dev-db/mariadb/additional-files/setup-mariadb.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
# create mysqld directory
|
||||
mkdir -p /var/run/mysqld
|
||||
chmod 755 /var/run/mysqld
|
||||
|
||||
# Check if /var/mysql already contains a MariaDB database
|
||||
if [ -f "/var/mysql/ibdata1" ]; then
|
||||
notify --icon /system/kernel_`uname -p` "MariaDB already exists in /var/mysql"
|
||||
else
|
||||
# Create the MariaDB system tables
|
||||
/system/bin/mariadb-install-db --user=user --datadir=/var/mysql --auth-root-authentication-method=normal
|
||||
|
||||
# Notify the user
|
||||
notify --icon /system/kernel_`uname -p` "MariaDB system tables have been created"
|
||||
|
||||
# Show an alert to read the README file
|
||||
alert "MariaDB installation is finished, please restart your system and check the README-INSTALL instructions to complete the setup." "OK"
|
||||
|
||||
fi
|
||||
|
||||
6
dev-db/mariadb/additional-files/userlaunch.in
Normal file
6
dev-db/mariadb/additional-files/userlaunch.in
Normal file
@@ -0,0 +1,6 @@
|
||||
job x-vnd.@APP@ {
|
||||
launch @BIN@
|
||||
no_safemode
|
||||
legacy
|
||||
on initial_volumes_mounted
|
||||
}
|
||||
305
dev-db/mariadb/mariadb-11.7.2.recipe
Normal file
305
dev-db/mariadb/mariadb-11.7.2.recipe
Normal file
@@ -0,0 +1,305 @@
|
||||
SUMMARY="Maria DB is an open-source relational database management system (RDBMS)"
|
||||
DESCRIPTION="MariaDB server is a community developed fork of MySQL server. \
|
||||
Started by core members of the original MySQL team, MariaDB actively works \
|
||||
with outside developers to deliver the most featureful, stable, and sanely \
|
||||
licensed open SQL server in the industry."
|
||||
HOMEPAGE="https://www.mariadb.org/"
|
||||
COPYRIGHT="2009-2025 MariaDB Foundation"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/MariaDB/server/archive/refs/tags/mariadb-11.7.2.tar.gz"
|
||||
CHECKSUM_SHA256="63abb60682d7c62f0195e8aa85301775af11ef0b7e700775dd8f232068fbe448"
|
||||
|
||||
SOURCE_DIR="server-mariadb-$portVersion"
|
||||
SOURCE_URI_2="https://github.com/mariadb-corporation/mariadb-connector-c/archive/refs/tags/v3.4.4.tar.gz"
|
||||
CHECKSUM_SHA256_2="79a1c5a3de86e7daa0a456c502d60dc15debe105932ad6a0d25024908603f433"
|
||||
SOURCE_FILENAME_2="mariadb-connector-c-v3.4.4.tar.gz"
|
||||
|
||||
srcGitRev_3="70cd967f5e249b53d6cce90e2e4198641c564381"
|
||||
SOURCE_URI_3="https://github.com/codership/wsrep-lib/archive/$srcGitRev_3.tar.gz"
|
||||
CHECKSUM_SHA256_3="bd44ee719f8fb303e8f90aaab105db836edc44cd8bb73004f20810248a0e6758"
|
||||
SOURCE_FILENAME_3="wsrep-lib-$srcGitRev_3.tar.gz"
|
||||
|
||||
srcGitRev_4="9dd8571b61ac2ffc577714ddbf6d2590843d3e8e"
|
||||
SOURCE_URI_4="https://github.com/codership/wsrep-API/archive/$srcGitRev_4.tar.gz"
|
||||
CHECKSUM_SHA256_4="626fd5123d36c38f1bc2211d3b18d7d07f93b338257efd05732143cf3581ca74"
|
||||
SOURCE_FILENAME_4="wsrep-API-$srcGitRev_3.tar.gz"
|
||||
|
||||
SOURCE_URI_5="https://github.com/mariadb-corporation/libmarias3/archive/refs/tags/libmarias3-3.2.0.tar.gz"
|
||||
CHECKSUM_SHA256_5="1ede2b212149e75348df0df04a3b8f13a6033f23a5a6562a2b7ad807f059720e"
|
||||
|
||||
SOURCE_URI_6="https://github.com/mariadb-corporation/mariadb-columnstore-engine/archive/refs/tags/vcolumnstore-23.10.1-1.tar.gz"
|
||||
CHECKSUM_SHA256_6="27632daa87bda8ce85f0e2d827915b6f12b34db7acfe8c5a689eb81e6e2069fa"
|
||||
|
||||
SOURCE_URI_7="https://github.com/fmtlib/fmt/releases/download/11.1.2/fmt-11.1.2.zip#noarchive"
|
||||
CHECKSUM_SHA256_7="ef54df1d4ba28519e31bf179f6a4fb5851d684c328ca051ce5da1b52bf8b1641"
|
||||
|
||||
PATCHES="mariadb-11.7.2.patchset
|
||||
mroonga-mrn-lib-dirs-path-reproducible-build.patch
|
||||
mariadb-libfmt.patch"
|
||||
|
||||
ADDITIONAL_FILES="
|
||||
userlaunch.in
|
||||
setup-mariadb.sh
|
||||
README-INSTALL
|
||||
"
|
||||
|
||||
POST_INSTALL_SCRIPTS="
|
||||
$relativePostInstallDir/setup-mariadb.sh
|
||||
"
|
||||
|
||||
ARCHITECTURES="?all x86_64"
|
||||
SECONDARY_ARCHITECTURES="!x86"
|
||||
|
||||
PROVIDES="
|
||||
mariadb$secondaryArchSuffix = $portVersion
|
||||
cmd:aria_chk$secondaryArchSuffix
|
||||
cmd:aria_dump_log$secondaryArchSuffix
|
||||
cmd:aria_ftdump$secondaryArchSuffix
|
||||
cmd:aria_pack$secondaryArchSuffix
|
||||
cmd:aria_read_log$secondaryArchSuffix
|
||||
cmd:galera_new_cluster$secondaryArchSuffix
|
||||
cmd:innochecksum$secondaryArchSuffix
|
||||
cmd:mariabackup$secondaryArchSuffix
|
||||
cmd:mariadb$secondaryArchSuffix
|
||||
cmd:mariadbd$secondaryArchSuffix
|
||||
cmd:mariadb_access$secondaryArchSuffix
|
||||
cmd:mariadb_admin$secondaryArchSuffix
|
||||
cmd:mariadb_backup$secondaryArchSuffix
|
||||
cmd:mariadb_binlog$secondaryArchSuffix
|
||||
cmd:mariadb_check$secondaryArchSuffix
|
||||
cmd:mariadb_client_test$secondaryArchSuffix
|
||||
cmd:mariadb_conv$secondaryArchSuffix
|
||||
cmd:mariadb_convert_table_format$secondaryArchSuffix
|
||||
cmd:mariadb_dump$secondaryArchSuffix
|
||||
cmd:mariadb_dumpslow$secondaryArchSuffix
|
||||
cmd:mariadb_find_rows$secondaryArchSuffix
|
||||
cmd:mariadb_fix_extensions$secondaryArchSuffix
|
||||
cmd:mariadb_hotcopy$secondaryArchSuffix
|
||||
cmd:mariadb_import$secondaryArchSuffix
|
||||
cmd:mariadb_install_db$secondaryArchSuffix
|
||||
cmd:mariadb_plugin$secondaryArchSuffix
|
||||
cmd:mariadb_secure_installation$secondaryArchSuffix
|
||||
cmd:mariadb_setpermission$secondaryArchSuffix
|
||||
cmd:mariadb_show$secondaryArchSuffix
|
||||
cmd:mariadb_slap$secondaryArchSuffix
|
||||
cmd:mariadb_test$secondaryArchSuffix
|
||||
cmd:mariadb_tzinfo_to_sql$secondaryArchSuffix
|
||||
cmd:mariadb_upgrade$secondaryArchSuffix
|
||||
cmd:mariadb_waitpid$secondaryArchSuffix
|
||||
cmd:mariadb_config$secondaryArchSuffix
|
||||
cmd:mariadbd_multi$secondaryArchSuffix
|
||||
cmd:mariadbd_safe$secondaryArchSuffix
|
||||
cmd:mariadbd_safe_helper$secondaryArchSuffix
|
||||
cmd:mbstream$secondaryArchSuffix
|
||||
cmd:msql2mysql$secondaryArchSuffix
|
||||
cmd:my_print_defaults$secondaryArchSuffix
|
||||
cmd:myisam_ftdump$secondaryArchSuffix
|
||||
cmd:myisamchk$secondaryArchSuffix
|
||||
cmd:myisamlog$secondaryArchSuffix
|
||||
cmd:myisampack$secondaryArchSuffix
|
||||
cmd:mysql$secondaryArchSuffix
|
||||
cmd:mysqld$secondaryArchSuffix
|
||||
cmd:mysql_client_test$secondaryArchSuffix
|
||||
cmd:mysql_config$secondaryArchSuffix
|
||||
cmd:mysql_convert_table_format$secondaryArchSuffix
|
||||
cmd:mysql_find_rows$secondaryArchSuffix
|
||||
cmd:mysql_fix_extensions$secondaryArchSuffix
|
||||
cmd:mysql_install_db$secondaryArchSuffix
|
||||
cmd:mysql_plugin$secondaryArchSuffix
|
||||
cmd:mysql_secure_installation$secondaryArchSuffix
|
||||
cmd:mysql_setpermission$secondaryArchSuffix
|
||||
cmd:mysql_tzinfo_to_sql$secondaryArchSuffix
|
||||
cmd:mysql_upgrade$secondaryArchSuffix
|
||||
cmd:mysql_waitpid$secondaryArchSuffix
|
||||
cmd:mysqlaccess$secondaryArchSuffix
|
||||
cmd:mysqladmin$secondaryArchSuffix
|
||||
cmd:mysqlbinlog$secondaryArchSuffix
|
||||
cmd:mysqlcheck$secondaryArchSuffix
|
||||
cmd:mysqld_multi$secondaryArchSuffix
|
||||
cmd:mysqld_safe$secondaryArchSuffix
|
||||
cmd:mysqld_safe_helper$secondaryArchSuffix
|
||||
cmd:mysqldump$secondaryArchSuffix
|
||||
cmd:mysqldumpslow$secondaryArchSuffix
|
||||
cmd:mysqlhotcopy$secondaryArchSuffix
|
||||
cmd:mysqlimport$secondaryArchSuffix
|
||||
cmd:mysqlshow$secondaryArchSuffix
|
||||
cmd:mysqlslap$secondaryArchSuffix
|
||||
cmd:mysqltest$secondaryArchSuffix
|
||||
cmd:mytop$secondaryArchSuffix
|
||||
cmd:perror$secondaryArchSuffix
|
||||
cmd:rcmysql$secondaryArchSuffix
|
||||
cmd:replace$secondaryArchSuffix
|
||||
cmd:resolve_stack_dump$secondaryArchSuffix
|
||||
cmd:resolveip$secondaryArchSuffix
|
||||
cmd:wsrep_sst_backup$secondaryArchSuffix
|
||||
cmd:wsrep_sst_common$secondaryArchSuffix
|
||||
cmd:wsrep_sst_mariabackup$secondaryArchSuffix
|
||||
cmd:wsrep_sst_mysqldump$secondaryArchSuffix
|
||||
cmd:wsrep_sst_rsync$secondaryArchSuffix
|
||||
cmd:wsrep_sst_rsync_wan$secondaryArchSuffix
|
||||
lib:libmariadb$secondaryArchSuffix
|
||||
lib:libmysqlclient$secondaryArchSuffix
|
||||
lib:libmysqlclient_r$secondaryArchSuffix
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libboost_system$secondaryArchSuffix
|
||||
lib:libbz2$secondaryArchSuffix
|
||||
lib:libcrypto$secondaryArchSuffix
|
||||
lib:libexecinfo$secondaryArchSuffix
|
||||
lib:libgssapi_krb5$secondaryArchSuffix
|
||||
lib:liblz4$secondaryArchSuffix
|
||||
lib:liblzma$secondaryArchSuffix
|
||||
lib:liblzo2$secondaryArchSuffix
|
||||
lib:libncursesw$secondaryArchSuffix
|
||||
lib:libpcre2_8$secondaryArchSuffix
|
||||
lib:libsnappy$secondaryArchSuffix
|
||||
lib:libssl$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
lib:libzstd$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
mariadb${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libmariadb$secondaryArchSuffix
|
||||
devel:libmariadbclient$secondaryArchSuffix
|
||||
devel:libmysqlclient$secondaryArchSuffix
|
||||
devel:libmysqlclient_r$secondaryArchSuffix
|
||||
devel:libmysqlservices$secondaryArchSuffix
|
||||
"
|
||||
REQUIRES_devel="
|
||||
mariadb$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libboost_system$secondaryArchSuffix >= 1.83.0
|
||||
devel:libbz2$secondaryArchSuffix
|
||||
devel:libevent$secondaryArchSuffix
|
||||
devel:libexecinfo$secondaryArchSuffix
|
||||
devel:libfmt$secondaryArchSuffix >= 11
|
||||
devel:libgssapi_krb5$secondaryArchSuffix
|
||||
devel:liblz4$secondaryArchSuffix
|
||||
devel:liblzma$secondaryArchSuffix
|
||||
devel:libmsgpackc$secondaryArchSuffix
|
||||
devel:libncurses$secondaryArchSuffix >= 6
|
||||
devel:libpcre2_8$secondaryArchSuffix
|
||||
devel:libsnappy$secondaryArchSuffix
|
||||
devel:libssl$secondaryArchSuffix >= 3
|
||||
devel:libstemmer$secondaryArchSuffix
|
||||
devel:libxml2$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
devel:liblzo2$secondaryArchSuffix
|
||||
devel:libzmq$secondaryArchSuffix
|
||||
devel:libzstd$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:bison
|
||||
cmd:cmake
|
||||
cmd:g++$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:ninja
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
# cmd:python3
|
||||
cmd:which
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
# required sources
|
||||
cp -r $sourceDir2/mariadb-connector-c-3.4.4/* $sourceDir/libmariadb/
|
||||
cp -r $sourceDir3/wsrep-lib-$srcGitRev_3/* $sourceDir/wsrep-lib
|
||||
cp -r $sourceDir4/wsrep-API-$srcGitRev_4/* $sourceDir/wsrep-lib/wsrep-API/v26
|
||||
|
||||
# additional sources for libmarias3 / columnstore
|
||||
cp -r $sourceDir5/libmarias3-libmarias3-3.2.0/* $sourceDir/storage/maria/libmarias3
|
||||
cp -r $sourceDir6/mariadb-columnstore-engine-vcolumnstore-23.10.1-1/* $sourceDir/storage/columnstore/columnstore
|
||||
|
||||
mkdir -p build/extra/libfmt
|
||||
cp -r $sourceDir7/fmt-11.1.2.zip build/extra/libfmt
|
||||
|
||||
# even if Release build is indicated, mariadbd binary is with debug info
|
||||
cmake -B build -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DINSTALL_SYSCONFDIR=/etc \
|
||||
-DINSTALL_SYSCONF2DIR=/etc/my.cnf.d \
|
||||
-DTMPDIR=/var/tmp \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="-lnetwork" \
|
||||
-DCMAKE_SHARED_LINKER_FLAGS="-lnetwork" \
|
||||
$cmakeDirArgs \
|
||||
-DINSTALL_DOCDIR=$docDir \
|
||||
-DINSTALL_DOCREADMEDIR=$docDir \
|
||||
-DINSTALL_INCLUDEDIR=develop/headers \
|
||||
-DINSTALL_INFODIR=$infoDir \
|
||||
-DINSTALL_LIBDIR=lib \
|
||||
-DINSTALL_MANDIR=$manDir \
|
||||
-DINSTALL_PCDIR=lib/pkgconfig \
|
||||
-DINSTALL_MYSQLSHAREDIR=$dataDir/mysql \
|
||||
-DINSTALL_MYSQLTESTDIR=$dataDir/mysql/mariadb-test \
|
||||
-DINSTALL_PLUGINDIR=lib/mysql/plugin \
|
||||
-DINSTALL_SCRIPTDIR=bin \
|
||||
-DINSTALL_SBINDIR=bin \
|
||||
-DINSTALL_SHAREDIR=$dataDir \
|
||||
-DINSTALL_SUPPORTFILESDIR=$dataDir/mysql/support-files \
|
||||
-DINSTALL_MYSQLDATADIR=/var/mysql \
|
||||
-DINSTALL_MYSQLINCLUDEDIR=$dataDir/mysql \
|
||||
-DINSTALL_SQLBENCHDIR=$dataDir/mysql \
|
||||
-DINSTALL_UNIX_ADDRDIR=/var/run/mysqld/mysqld.sock \
|
||||
-DGRN_DATA_DIR=$dataDir/mysql/mariadb-server/groonga \
|
||||
-DGROONGA_NORMALIZER_MYSQL_PROJECT_NAME=mariadb-server/groonga-normalizer-mysql \
|
||||
-DPLUGIN_TOKUDB=NO \
|
||||
-DPLUGIN_CONNECT=NO \
|
||||
-DWITH_PCRE=system \
|
||||
-DWITH_SSL=system \
|
||||
-DWITH_SYSTEMD=no \
|
||||
-DWITH_UNIT_TESTS=OFF \
|
||||
-DWITHOUT_AIO=ON \
|
||||
-DWITHOUT_ROCKSDB=ON \
|
||||
-Wno-dev
|
||||
|
||||
cmake --build build $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
# post install script installation
|
||||
mkdir -p $postInstallDir
|
||||
cp -f $portDir/additional-files/setup-mariadb.sh $postInstallDir
|
||||
chmod a+rx "$postInstallDir/setup-mariadb.sh"
|
||||
|
||||
# install mariadb
|
||||
cmake --install build
|
||||
|
||||
# cleanup static libraries
|
||||
rm -f $libDir/{libmariadb.a,libmysqlclient.a,libmysqlclient_r.a}
|
||||
|
||||
# copy the README-INSTALL6
|
||||
mv $documentationDir/mariadb-server $docDir
|
||||
cp -f $portDir/additional-files/README-INSTALL $docDir
|
||||
|
||||
# patch script "bin/mariadb-secure-installation"
|
||||
sed -i 's/config=".my.cnf.$$"/config="\/etc\/.my.cnf.$$"/' $binDir/mariadb-secure-installation
|
||||
sed -i 's/command=".mysql.$$"/command="\/etc\/.mysql.$$"/' $binDir/mariadb-secure-installation
|
||||
sed -i 's/output=".my.output.$$"/output="\/etc\/.my.output.$$"/' $binDir/mariadb-secure-installation
|
||||
|
||||
# launch_daemon setup
|
||||
mkdir -p $dataDir/user_launch
|
||||
sed \
|
||||
-e "s|@APP@|mariadbd|" \
|
||||
-e "s|@BIN@|\/system\/bin\/mariadbd --user=user --datadir=\/var\/mysql\/|" \
|
||||
$portDir/additional-files/userlaunch.in > $dataDir/user_launch/mariadbd
|
||||
|
||||
prepareInstalledDevelLibs \
|
||||
libmariadb \
|
||||
libmariadbclient \
|
||||
libmysqlclient \
|
||||
libmysqlclient_r \
|
||||
libmysqlservices
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$dataDir/aclocal
|
||||
}
|
||||
|
||||
512
dev-db/mariadb/patches/mariadb-11.7.2.patchset
Normal file
512
dev-db/mariadb/patches/mariadb-11.7.2.patchset
Normal file
@@ -0,0 +1,512 @@
|
||||
From 6405565ec48af1ddc66efe72d1e9f3f96592e583 Mon Sep 17 00:00:00 2001
|
||||
From: DigitalBox98 <digitalbox098@gmail.com>
|
||||
Date: Tue, 18 Feb 2025 13:31:11 +0000
|
||||
Subject: m_string.h patch
|
||||
|
||||
|
||||
diff --git a/include/m_string.h b/include/m_string.h
|
||||
index 060ab2c..faa43de 100644
|
||||
--- a/include/m_string.h
|
||||
+++ b/include/m_string.h
|
||||
@@ -55,7 +55,9 @@
|
||||
|
||||
# define bmove_align(A,B,C) memcpy((A),(B),(C))
|
||||
|
||||
+#ifndef bcmp
|
||||
# define bcmp(A,B,C) memcmp((A),(B),(C))
|
||||
+#endif
|
||||
|
||||
#if !defined(bzero)
|
||||
# define bzero(A,B) memset((A),0,(B))
|
||||
--
|
||||
2.45.2
|
||||
|
||||
|
||||
From 2a90430c37143ed0c8d449fd72eca598c7ebb3b6 Mon Sep 17 00:00:00 2001
|
||||
From: DigitalBox98 <digitalbox098@gmail.com>
|
||||
Date: Tue, 18 Feb 2025 16:50:22 +0000
|
||||
Subject: patch vector_mhnsw.cc
|
||||
|
||||
|
||||
diff --git a/sql/vector_mhnsw.cc b/sql/vector_mhnsw.cc
|
||||
index 4ef5f64..0081b5d 100644
|
||||
--- a/sql/vector_mhnsw.cc
|
||||
+++ b/sql/vector_mhnsw.cc
|
||||
@@ -119,77 +119,8 @@ struct FVector
|
||||
abs2= scale * scale * dot_product(dims, dims, vec_len) / 2;
|
||||
}
|
||||
|
||||
-#ifdef AVX2_IMPLEMENTATION
|
||||
- /************* AVX2 *****************************************************/
|
||||
- static constexpr size_t AVX2_bytes= 256/8;
|
||||
- static constexpr size_t AVX2_dims= AVX2_bytes/sizeof(int16_t);
|
||||
-
|
||||
- AVX2_IMPLEMENTATION
|
||||
- static float dot_product(const int16_t *v1, const int16_t *v2, size_t len)
|
||||
- {
|
||||
- typedef float v8f __attribute__((vector_size(AVX2_bytes)));
|
||||
- union { v8f v; __m256 i; } tmp;
|
||||
- __m256i *p1= (__m256i*)v1;
|
||||
- __m256i *p2= (__m256i*)v2;
|
||||
- v8f d= {0};
|
||||
- for (size_t i= 0; i < (len + AVX2_dims-1)/AVX2_dims; p1++, p2++, i++)
|
||||
- {
|
||||
- tmp.i= _mm256_cvtepi32_ps(_mm256_madd_epi16(*p1, *p2));
|
||||
- d+= tmp.v;
|
||||
- }
|
||||
- return d[0] + d[1] + d[2] + d[3] + d[4] + d[5] + d[6] + d[7];
|
||||
- }
|
||||
-
|
||||
- AVX2_IMPLEMENTATION
|
||||
- static size_t alloc_size(size_t n)
|
||||
- { return alloc_header + MY_ALIGN(n*2, AVX2_bytes) + AVX2_bytes - 1; }
|
||||
-
|
||||
- AVX2_IMPLEMENTATION
|
||||
- static FVector *align_ptr(void *ptr)
|
||||
- { return (FVector*)(MY_ALIGN(((intptr)ptr) + alloc_header, AVX2_bytes)
|
||||
- - alloc_header); }
|
||||
-
|
||||
- AVX2_IMPLEMENTATION
|
||||
- void fix_tail(size_t vec_len)
|
||||
- {
|
||||
- bzero(dims + vec_len, (MY_ALIGN(vec_len, AVX2_dims) - vec_len)*2);
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
-#ifdef AVX512_IMPLEMENTATION
|
||||
- /************* AVX512 ****************************************************/
|
||||
- static constexpr size_t AVX512_bytes= 512/8;
|
||||
- static constexpr size_t AVX512_dims= AVX512_bytes/sizeof(int16_t);
|
||||
-
|
||||
- AVX512_IMPLEMENTATION
|
||||
- static float dot_product(const int16_t *v1, const int16_t *v2, size_t len)
|
||||
- {
|
||||
- __m512i *p1= (__m512i*)v1;
|
||||
- __m512i *p2= (__m512i*)v2;
|
||||
- __m512 d= _mm512_setzero_ps();
|
||||
- for (size_t i= 0; i < (len + AVX512_dims-1)/AVX512_dims; p1++, p2++, i++)
|
||||
- d= _mm512_add_ps(d, _mm512_cvtepi32_ps(_mm512_madd_epi16(*p1, *p2)));
|
||||
- return _mm512_reduce_add_ps(d);
|
||||
- }
|
||||
-
|
||||
- AVX512_IMPLEMENTATION
|
||||
- static size_t alloc_size(size_t n)
|
||||
- { return alloc_header + MY_ALIGN(n*2, AVX512_bytes) + AVX512_bytes - 1; }
|
||||
-
|
||||
- AVX512_IMPLEMENTATION
|
||||
- static FVector *align_ptr(void *ptr)
|
||||
- { return (FVector*)(MY_ALIGN(((intptr)ptr) + alloc_header, AVX512_bytes)
|
||||
- - alloc_header); }
|
||||
-
|
||||
- AVX512_IMPLEMENTATION
|
||||
- void fix_tail(size_t vec_len)
|
||||
- {
|
||||
- bzero(dims + vec_len, (MY_ALIGN(vec_len, AVX512_dims) - vec_len)*2);
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
/************* no-SIMD default ******************************************/
|
||||
- DEFAULT_IMPLEMENTATION
|
||||
+ #ifdef DEFAULT_IMPLEMENTATION
|
||||
static float dot_product(const int16_t *v1, const int16_t *v2, size_t len)
|
||||
{
|
||||
int64_t d= 0;
|
||||
@@ -198,15 +129,13 @@ struct FVector
|
||||
return static_cast<float>(d);
|
||||
}
|
||||
|
||||
- DEFAULT_IMPLEMENTATION
|
||||
static size_t alloc_size(size_t n) { return alloc_header + n*2; }
|
||||
|
||||
- DEFAULT_IMPLEMENTATION
|
||||
static FVector *align_ptr(void *ptr) { return (FVector*)ptr; }
|
||||
|
||||
- DEFAULT_IMPLEMENTATION
|
||||
void fix_tail(size_t) { }
|
||||
-
|
||||
+ #endif
|
||||
+
|
||||
float distance_to(const FVector *other, size_t vec_len) const
|
||||
{
|
||||
return abs2 + other->abs2 - scale * other->scale *
|
||||
--
|
||||
2.45.2
|
||||
|
||||
|
||||
From 0d419757657a13ade783223076e60d7d6987e1c3 Mon Sep 17 00:00:00 2001
|
||||
From: DigitalBox98 <digitalbox098@gmail.com>
|
||||
Date: Tue, 18 Feb 2025 18:57:18 +0000
|
||||
Subject: fix
|
||||
|
||||
|
||||
diff --git a/sql/vector_mhnsw.cc b/sql/vector_mhnsw.cc
|
||||
index 0081b5d..2f67b4d 100644
|
||||
--- a/sql/vector_mhnsw.cc
|
||||
+++ b/sql/vector_mhnsw.cc
|
||||
@@ -120,7 +120,7 @@ struct FVector
|
||||
}
|
||||
|
||||
/************* no-SIMD default ******************************************/
|
||||
- #ifdef DEFAULT_IMPLEMENTATION
|
||||
+#ifdef DEFAULT_IMPLEMENTATION
|
||||
static float dot_product(const int16_t *v1, const int16_t *v2, size_t len)
|
||||
{
|
||||
int64_t d= 0;
|
||||
@@ -134,8 +134,9 @@ struct FVector
|
||||
static FVector *align_ptr(void *ptr) { return (FVector*)ptr; }
|
||||
|
||||
void fix_tail(size_t) { }
|
||||
- #endif
|
||||
-
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
float distance_to(const FVector *other, size_t vec_len) const
|
||||
{
|
||||
return abs2 + other->abs2 - scale * other->scale *
|
||||
--
|
||||
2.45.2
|
||||
|
||||
|
||||
From fbb56d530eb7d205b7fbf9e7b2ce96d5ed1e2f60 Mon Sep 17 00:00:00 2001
|
||||
From: DigitalBox98 <digitalbox098@gmail.com>
|
||||
Date: Tue, 18 Feb 2025 19:29:24 +0000
|
||||
Subject: patch mysqld.cc
|
||||
|
||||
|
||||
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
|
||||
index 5cad7ac..04921a8 100644
|
||||
--- a/sql/mysqld.cc
|
||||
+++ b/sql/mysqld.cc
|
||||
@@ -224,10 +224,6 @@ inline void setup_fpu()
|
||||
#endif /* FP_X_DNML */
|
||||
#endif /* __FreeBSD__ && HAVE_IEEEFP_H && !HAVE_FEDISABLEEXCEPT && FP_X_INV */
|
||||
|
||||
-#ifdef HAVE_FEDISABLEEXCEPT
|
||||
- fedisableexcept(FE_ALL_EXCEPT);
|
||||
-#endif
|
||||
-
|
||||
#ifdef HAVE_FESETROUND
|
||||
/* Set FPU rounding mode to "round-to-nearest" */
|
||||
fesetround(FE_TONEAREST);
|
||||
--
|
||||
2.45.2
|
||||
|
||||
|
||||
From 8d9d2f0cbb842089b36b63a9772bb42ea6594951 Mon Sep 17 00:00:00 2001
|
||||
From: DigitalBox98 <digitalbox098@gmail.com>
|
||||
Date: Tue, 18 Feb 2025 19:55:21 +0000
|
||||
Subject: Fix for bloom_filters.h
|
||||
|
||||
|
||||
diff --git a/sql/bloom_filters.h b/sql/bloom_filters.h
|
||||
index 315673d..ca5ca93 100644
|
||||
--- a/sql/bloom_filters.h
|
||||
+++ b/sql/bloom_filters.h
|
||||
@@ -59,124 +59,6 @@ struct PatternedSimdBloomFilter
|
||||
return std::max<uint32_t>(512, static_cast<uint32_t>(bits_per_val * n + 0.5));
|
||||
}
|
||||
|
||||
-#ifdef AVX2_IMPLEMENTATION
|
||||
- AVX2_IMPLEMENTATION
|
||||
- __m256i CalcHash(__m256i vecData)
|
||||
- {
|
||||
- // (almost) xxHash parallel version, 64bit input, 64bit output, seed=0
|
||||
- static constexpr __m256i rotl48={
|
||||
- 0x0504030201000706ULL, 0x0D0C0B0A09080F0EULL,
|
||||
- 0x1514131211101716ULL, 0x1D1C1B1A19181F1EULL
|
||||
- };
|
||||
- static constexpr __m256i rotl24={
|
||||
- 0x0201000706050403ULL, 0x0A09080F0E0D0C0BULL,
|
||||
- 0x1211101716151413ULL, 0x1A19181F1E1D1C1BULL,
|
||||
- };
|
||||
- static constexpr uint64_t prime_mx2= 0x9FB21C651E98DF25ULL;
|
||||
- static constexpr uint64_t bitflip= 0xC73AB174C5ECD5A2ULL;
|
||||
- __m256i step1= _mm256_xor_si256(vecData, _mm256_set1_epi64x(bitflip));
|
||||
- __m256i step2= _mm256_shuffle_epi8(step1, rotl48);
|
||||
- __m256i step3= _mm256_shuffle_epi8(step1, rotl24);
|
||||
- __m256i step4= _mm256_xor_si256(step1, _mm256_xor_si256(step2, step3));
|
||||
- __m256i step5= _mm256_mul_epi32(step4, _mm256_set1_epi64x(prime_mx2));
|
||||
- __m256i step6= _mm256_srli_epi64(step5, 35);
|
||||
- __m256i step7= _mm256_add_epi64(step6, _mm256_set1_epi64x(8));
|
||||
- __m256i step8= _mm256_xor_si256(step5, step7);
|
||||
- __m256i step9= _mm256_mul_epi32(step8, _mm256_set1_epi64x(prime_mx2));
|
||||
- return _mm256_xor_si256(step9, _mm256_srli_epi64(step9, 28));
|
||||
- }
|
||||
-
|
||||
- AVX2_IMPLEMENTATION
|
||||
- __m256i GetBlockIdx(__m256i vecHash)
|
||||
- {
|
||||
- __m256i vecNumBlocksMask = _mm256_set1_epi64x(num_blocks - 1);
|
||||
- __m256i vecBlockIdx = _mm256_srli_epi64(vecHash, mask_idx_bits + rotate_bits);
|
||||
- return _mm256_and_si256(vecBlockIdx, vecNumBlocksMask);
|
||||
- }
|
||||
-
|
||||
- AVX2_IMPLEMENTATION
|
||||
- __m256i ConstructMask(__m256i vecHash)
|
||||
- {
|
||||
- __m256i vecMaskIdxMask = _mm256_set1_epi64x((1 << mask_idx_bits) - 1);
|
||||
- __m256i vecMaskMask = _mm256_set1_epi64x((1ull << bits_per_mask) - 1);
|
||||
- __m256i vec64 = _mm256_set1_epi64x(64);
|
||||
-
|
||||
- __m256i vecMaskIdx = _mm256_and_si256(vecHash, vecMaskIdxMask);
|
||||
- __m256i vecMaskByteIdx = _mm256_srli_epi64(vecMaskIdx, 3);
|
||||
- __m256i vecMaskBitIdx = _mm256_and_si256(vecMaskIdx, _mm256_set1_epi64x(0x7));
|
||||
- __m256i vecRawMasks = _mm256_i64gather_epi64((const longlong *)masks, vecMaskByteIdx, 1);
|
||||
- __m256i vecUnrotated = _mm256_and_si256(_mm256_srlv_epi64(vecRawMasks, vecMaskBitIdx), vecMaskMask);
|
||||
-
|
||||
- __m256i vecRotation = _mm256_and_si256(_mm256_srli_epi64(vecHash, mask_idx_bits), _mm256_set1_epi64x((1 << rotate_bits) - 1));
|
||||
- __m256i vecShiftUp = _mm256_sllv_epi64(vecUnrotated, vecRotation);
|
||||
- __m256i vecShiftDown = _mm256_srlv_epi64(vecUnrotated, _mm256_sub_epi64(vec64, vecRotation));
|
||||
- return _mm256_or_si256(vecShiftDown, vecShiftUp);
|
||||
- }
|
||||
-
|
||||
- AVX2_IMPLEMENTATION
|
||||
- void Insert(const T **data)
|
||||
- {
|
||||
- __m256i vecDataA = _mm256_loadu_si256(reinterpret_cast<__m256i *>(data + 0));
|
||||
- __m256i vecDataB = _mm256_loadu_si256(reinterpret_cast<__m256i *>(data + 4));
|
||||
-
|
||||
- __m256i vecHashA= CalcHash(vecDataA);
|
||||
- __m256i vecHashB= CalcHash(vecDataB);
|
||||
-
|
||||
- __m256i vecMaskA = ConstructMask(vecHashA);
|
||||
- __m256i vecMaskB = ConstructMask(vecHashB);
|
||||
-
|
||||
- __m256i vecBlockIdxA = GetBlockIdx(vecHashA);
|
||||
- __m256i vecBlockIdxB = GetBlockIdx(vecHashB);
|
||||
-
|
||||
- uint64_t block0 = _mm256_extract_epi64(vecBlockIdxA, 0);
|
||||
- uint64_t block1 = _mm256_extract_epi64(vecBlockIdxA, 1);
|
||||
- uint64_t block2 = _mm256_extract_epi64(vecBlockIdxA, 2);
|
||||
- uint64_t block3 = _mm256_extract_epi64(vecBlockIdxA, 3);
|
||||
- uint64_t block4 = _mm256_extract_epi64(vecBlockIdxB, 0);
|
||||
- uint64_t block5 = _mm256_extract_epi64(vecBlockIdxB, 1);
|
||||
- uint64_t block6 = _mm256_extract_epi64(vecBlockIdxB, 2);
|
||||
- uint64_t block7 = _mm256_extract_epi64(vecBlockIdxB, 3);
|
||||
-
|
||||
- bv[block0] |= _mm256_extract_epi64(vecMaskA, 0);
|
||||
- bv[block1] |= _mm256_extract_epi64(vecMaskA, 1);
|
||||
- bv[block2] |= _mm256_extract_epi64(vecMaskA, 2);
|
||||
- bv[block3] |= _mm256_extract_epi64(vecMaskA, 3);
|
||||
- bv[block4] |= _mm256_extract_epi64(vecMaskB, 0);
|
||||
- bv[block5] |= _mm256_extract_epi64(vecMaskB, 1);
|
||||
- bv[block6] |= _mm256_extract_epi64(vecMaskB, 2);
|
||||
- bv[block7] |= _mm256_extract_epi64(vecMaskB, 3);
|
||||
- }
|
||||
-
|
||||
- AVX2_IMPLEMENTATION
|
||||
- uint8_t Query(T **data)
|
||||
- {
|
||||
- __m256i vecDataA = _mm256_loadu_si256(reinterpret_cast<__m256i *>(data + 0));
|
||||
- __m256i vecDataB = _mm256_loadu_si256(reinterpret_cast<__m256i *>(data + 4));
|
||||
-
|
||||
- __m256i vecHashA= CalcHash(vecDataA);
|
||||
- __m256i vecHashB= CalcHash(vecDataB);
|
||||
-
|
||||
- __m256i vecMaskA = ConstructMask(vecHashA);
|
||||
- __m256i vecMaskB = ConstructMask(vecHashB);
|
||||
-
|
||||
- __m256i vecBlockIdxA = GetBlockIdx(vecHashA);
|
||||
- __m256i vecBlockIdxB = GetBlockIdx(vecHashB);
|
||||
-
|
||||
- __m256i vecBloomA = _mm256_i64gather_epi64(bv.data(), vecBlockIdxA, sizeof(longlong));
|
||||
- __m256i vecBloomB = _mm256_i64gather_epi64(bv.data(), vecBlockIdxB, sizeof(longlong));
|
||||
- __m256i vecCmpA = _mm256_cmpeq_epi64(_mm256_and_si256(vecMaskA, vecBloomA), vecMaskA);
|
||||
- __m256i vecCmpB = _mm256_cmpeq_epi64(_mm256_and_si256(vecMaskB, vecBloomB), vecMaskB);
|
||||
- uint32_t res_a = static_cast<uint32_t>(_mm256_movemask_epi8(vecCmpA));
|
||||
- uint32_t res_b = static_cast<uint32_t>(_mm256_movemask_epi8(vecCmpB));
|
||||
- uint64_t res_bytes = res_a | (static_cast<uint64_t>(res_b) << 32);
|
||||
- uint8_t res_bits = static_cast<uint8_t>(_mm256_movemask_epi8(_mm256_set1_epi64x(res_bytes)) & 0xff);
|
||||
- return res_bits;
|
||||
- }
|
||||
-
|
||||
- /* AVX-512 version can be (and was) implemented, but the speedup is,
|
||||
- basically, unnoticeable, well below the noise level */
|
||||
-#endif
|
||||
-
|
||||
/********************************************************
|
||||
********* non-SIMD fallback version ********************/
|
||||
|
||||
@@ -216,7 +98,6 @@ struct PatternedSimdBloomFilter
|
||||
: unrotated;
|
||||
}
|
||||
|
||||
- DEFAULT_IMPLEMENTATION
|
||||
void Insert(const T **data)
|
||||
{
|
||||
for (size_t i = 0; i < 8; i++)
|
||||
@@ -227,7 +108,6 @@ struct PatternedSimdBloomFilter
|
||||
}
|
||||
}
|
||||
|
||||
- DEFAULT_IMPLEMENTATION
|
||||
uint8_t Query(T **data)
|
||||
{
|
||||
uint8_t res_bits = 0;
|
||||
diff --git a/sql/vector_mhnsw.cc b/sql/vector_mhnsw.cc
|
||||
index 2f67b4d..d32c3cb 100644
|
||||
--- a/sql/vector_mhnsw.cc
|
||||
+++ b/sql/vector_mhnsw.cc
|
||||
@@ -120,7 +120,7 @@ struct FVector
|
||||
}
|
||||
|
||||
/************* no-SIMD default ******************************************/
|
||||
-#ifdef DEFAULT_IMPLEMENTATION
|
||||
+ #ifdef DEFAULT_IMPLEMENTATION
|
||||
static float dot_product(const int16_t *v1, const int16_t *v2, size_t len)
|
||||
{
|
||||
int64_t d= 0;
|
||||
@@ -134,7 +134,7 @@ struct FVector
|
||||
static FVector *align_ptr(void *ptr) { return (FVector*)ptr; }
|
||||
|
||||
void fix_tail(size_t) { }
|
||||
-#endif
|
||||
+ #endif
|
||||
|
||||
|
||||
float distance_to(const FVector *other, size_t vec_len) const
|
||||
--
|
||||
2.45.2
|
||||
|
||||
|
||||
From f90d32ff8a29578fadd1d412b1cd1bdbdf654b40 Mon Sep 17 00:00:00 2001
|
||||
From: DigitalBox98 <digitalbox098@gmail.com>
|
||||
Date: Tue, 18 Feb 2025 20:14:27 +0000
|
||||
Subject: fix sql_plugin.cc
|
||||
|
||||
|
||||
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
|
||||
index 0c297db..d439078 100644
|
||||
--- a/sql/sql_plugin.cc
|
||||
+++ b/sql/sql_plugin.cc
|
||||
@@ -48,9 +48,14 @@ static PSI_memory_key key_memory_mysql_plugin;
|
||||
static PSI_memory_key key_memory_mysql_plugin_dl;
|
||||
static PSI_memory_key key_memory_plugin_bookmark;
|
||||
|
||||
-#ifdef HAVE_LINK_H
|
||||
-#include <link.h>
|
||||
-#endif
|
||||
+//#ifdef HAVE_LINK_H
|
||||
+//#include <link.h>
|
||||
+//#endif
|
||||
+
|
||||
+struct link_map {
|
||||
+ void *l_addr; // Base address shared object is loaded at
|
||||
+ char *l_name; // Absolute file name object was found in
|
||||
+};
|
||||
|
||||
extern struct st_maria_plugin *mysql_optional_plugins[];
|
||||
extern struct st_maria_plugin *mysql_mandatory_plugins[];
|
||||
--
|
||||
2.45.2
|
||||
|
||||
|
||||
From 6b43d25e976d2cba21808adb6c5297b3b3885bc0 Mon Sep 17 00:00:00 2001
|
||||
From: DigitalBox98 <digitalbox098@gmail.com>
|
||||
Date: Thu, 20 Feb 2025 23:33:06 +0000
|
||||
Subject: Fix socket.cpp
|
||||
|
||||
|
||||
diff --git a/plugin/handler_socket/libhsclient/socket.cpp b/plugin/handler_socket/libhsclient/socket.cpp
|
||||
index f1cdc9f..e881d7b 100644
|
||||
--- a/plugin/handler_socket/libhsclient/socket.cpp
|
||||
+++ b/plugin/handler_socket/libhsclient/socket.cpp
|
||||
@@ -174,7 +174,7 @@ socket_accept(int listen_fd, auto_file& fd, const socket_args& args,
|
||||
sockaddr_storage& addr_r, size_socket& addrlen_r, std::string& err_r)
|
||||
{
|
||||
fd.reset(accept(listen_fd, reinterpret_cast<sockaddr *>(&addr_r),
|
||||
- &addrlen_r));
|
||||
+ (socklen_t*)&addrlen_r));
|
||||
if (fd.get() < 0) {
|
||||
return errno_string("accept", errno, err_r);
|
||||
}
|
||||
--
|
||||
2.45.2
|
||||
|
||||
|
||||
From 0029a0d17b8ea5936f6ad0c615436768e86e2cf7 Mon Sep 17 00:00:00 2001
|
||||
From: DigitalBox98 <digitalbox098@gmail.com>
|
||||
Date: Thu, 20 Feb 2025 23:35:58 +0000
|
||||
Subject: Fix my_global.h
|
||||
|
||||
|
||||
diff --git a/include/my_global.h b/include/my_global.h
|
||||
index b51d34b..e3397f2 100644
|
||||
--- a/include/my_global.h
|
||||
+++ b/include/my_global.h
|
||||
@@ -915,10 +915,14 @@ typedef long longlong;
|
||||
#endif
|
||||
#endif
|
||||
#ifndef HAVE_INT64
|
||||
-typedef longlong int64;
|
||||
+ #ifndef __haiku_int64
|
||||
+ typedef longlong int64;
|
||||
+ #endif
|
||||
#endif
|
||||
#ifndef HAVE_UINT64
|
||||
-typedef ulonglong uint64;
|
||||
+ #ifndef __haiku_uint64
|
||||
+ typedef ulonglong uint64;
|
||||
+ #endif
|
||||
#endif
|
||||
|
||||
#if defined(NO_CLIENT_LONG_LONG)
|
||||
--
|
||||
2.45.2
|
||||
|
||||
|
||||
From 8849b696dc0ebc07b9fe3b1d02200a824328513c Mon Sep 17 00:00:00 2001
|
||||
From: Begasus <begasus@gmail.com>
|
||||
Date: Thu, 20 Feb 2025 17:30:26 +0100
|
||||
Subject: Fix install path
|
||||
|
||||
|
||||
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
|
||||
index 5452b56..18574fc 100644
|
||||
--- a/include/CMakeLists.txt
|
||||
+++ b/include/CMakeLists.txt
|
||||
@@ -104,7 +104,7 @@ IF(NOT ${CMAKE_CURRENT_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
ENDIF()
|
||||
|
||||
MACRO(INSTALL_COMPAT_HEADER file footer)
|
||||
- INSTALL(CODE "FILE(WRITE \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDEDIR}/${file}
|
||||
+ INSTALL(CODE "FILE(WRITE \$ENV{DESTDIR}\/${INSTALL_INCLUDEDIR}/${file}
|
||||
\"/* Do not edit this file directly, it was auto-generated by cmake */
|
||||
|
||||
#warning This file should not be included by clients, include only <mysql.h>
|
||||
diff --git a/storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql/CMakeLists.txt b/storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql/CMakeLists.txt
|
||||
index 96f9b3e..bf42ab9 100644
|
||||
--- a/storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql/CMakeLists.txt
|
||||
+++ b/storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql/CMakeLists.txt
|
||||
@@ -78,4 +78,4 @@ endif()
|
||||
install(FILES
|
||||
"README.md"
|
||||
"doc/text/lgpl-2.0.txt"
|
||||
- DESTINATION "share/${GROONGA_NORMALIZER_MYSQL_PROJECT_NAME}")
|
||||
+ DESTINATION "documentation/${GROONGA_NORMALIZER_MYSQL_PROJECT_NAME}")
|
||||
--
|
||||
2.45.2
|
||||
|
||||
|
||||
From 0552732c00bc6cf145551e7abb1447d5470e60c6 Mon Sep 17 00:00:00 2001
|
||||
From: Begasus <begasus@gmail.com>
|
||||
Date: Sun, 23 Feb 2025 19:16:05 +0100
|
||||
Subject: Add missing ctype.h
|
||||
|
||||
|
||||
diff --git a/mysys/get_password.c b/mysys/get_password.c
|
||||
index bf47491..ffa57f8 100644
|
||||
--- a/mysys/get_password.c
|
||||
+++ b/mysys/get_password.c
|
||||
@@ -31,6 +31,7 @@
|
||||
#else /* ! HAVE_GETPASS */
|
||||
#ifndef _WIN32
|
||||
#include <sys/ioctl.h>
|
||||
+#include <ctype.h>
|
||||
#ifdef HAVE_TERMIOS_H /* For tty-password */
|
||||
#include <termios.h>
|
||||
#define TERMIO struct termios
|
||||
--
|
||||
2.45.2
|
||||
|
||||
32
dev-db/mariadb/patches/mariadb-libfmt.patch
Normal file
32
dev-db/mariadb/patches/mariadb-libfmt.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
MariaDB upstream uses an old version (8.0) of the FMT library, unlike Fedora which packs a current one (10.2)
|
||||
https://src.fedoraproject.org/rpms/fmt
|
||||
https://github.com/MariaDB/server/blob/10.11/cmake/libfmt.cmake#L18
|
||||
|
||||
There is a breaking change between the FMT library version 8 and 10.
|
||||
Sergei Golubchik from MariaDB upstream noticed that and decided to not rebase to the newer version for now. In the same commit:
|
||||
https://github.com/MariaDB/server/commit/b5c367cd88e37091ab5f8dab0396c01c97d037e2
|
||||
He also fixed the CMake file controlling the FMT library.
|
||||
It now correctly detects, whether the system version is able to compile a given code in an expected way.
|
||||
|
||||
The incompatibility between FMT library version has been reported both agains Fedora and FMT upstream
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2266807
|
||||
The upstream created a patch and Fedora backported it
|
||||
https://src.fedoraproject.org/rpms/fmt/c/7d6d6e2c33e845b3cbf3fcaf83f14dfeddfa8a70?branch=rawhide
|
||||
but only in F40 and later.
|
||||
|
||||
To avoid potential issues on systems with FMT library between 8.0 and the one with the fix backported,
|
||||
introduce a bundling mechanism for use on such distributions.
|
||||
We pre-download the sources archive and supply the CMake with it, instead of the web URL.
|
||||
|
||||
--- mariadb-10.11.10/cmake/libfmt.cmake 2024-10-29 15:32:31.000000000 +0100
|
||||
+++ mariadb-10.11.10/cmake/libfmt.cmake_patched 2024-11-14 12:06:35.961435488 +0100
|
||||
@@ -15,7 +15,7 @@ MACRO(BUNDLE_LIBFMT)
|
||||
ExternalProject_Add(
|
||||
libfmt
|
||||
PREFIX "${dir}"
|
||||
- URL "https://github.com/fmtlib/fmt/releases/download/11.0.2/fmt-11.0.2.zip"
|
||||
- URL_MD5 c622dca45ec3fc95254c48370a9f7a1d
|
||||
+ URL "file:///${dir}/fmt-11.1.2.zip"
|
||||
+ URL_MD5 7a9dbe6e81fa13f5e718141fc178df5a
|
||||
INSTALL_COMMAND ""
|
||||
CONFIGURE_COMMAND ""
|
||||
@@ -0,0 +1,46 @@
|
||||
From: Sutou Kouhei <kou@clear-code.com>
|
||||
Date: Sat, 5 Feb 2022 11:05:39 +0900
|
||||
Subject: cmake: add support for reproducible buildS
|
||||
|
||||
We should use relative path not absolute path. We can use target without
|
||||
breaking reproducibility.
|
||||
|
||||
Origin: https://github.com/mroonga/mroonga/issues/298#issuecomment-1030815927
|
||||
Bug: https://github.com/mroonga/mroonga/issues/298
|
||||
Forwarded: not-needed
|
||||
---
|
||||
storage/mroonga/CMakeLists.txt | 12 ++++--------
|
||||
1 file changed, 4 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/storage/mroonga/CMakeLists.txt b/storage/mroonga/CMakeLists.txt
|
||||
index 399201a..f1b26dd 100644
|
||||
--- a/storage/mroonga/CMakeLists.txt
|
||||
+++ b/storage/mroonga/CMakeLists.txt
|
||||
@@ -214,7 +214,7 @@ set(MYSQL_INCLUDE_DIRS
|
||||
|
||||
if(MRN_BUNDLED)
|
||||
set(MYSQL_PLUGIN_DIR "${INSTALL_PLUGINDIR}")
|
||||
- set(MYSQL_SERVICES_LIB_DIR "${MYSQL_BUILD_DIR}/libservices")
|
||||
+ set(MYSQL_SERVICES_LIB_DIR)
|
||||
set(MYSQL_CFLAGS "${CMAKE_C_FLAGS}")
|
||||
set(MYSQL_VERSION "${MYSQL_BASE_VERSION}")
|
||||
else()
|
||||
@@ -253,15 +253,11 @@ endif()
|
||||
|
||||
if(MRN_GROONGA_BUNDLED)
|
||||
set(GROONGA_INCLUDE_DIRS "${MRN_BUNDLED_GROONGA_DIR}/include")
|
||||
- set(GROONGA_LIBRARY_DIRS "${MRN_BUNDLED_GROONGA_DIR}/lib")
|
||||
- set(GROONGA_LIBRARIES "libgroonga")
|
||||
+ set(GROONGA_LIBRARY "libgroonga")
|
||||
|
||||
- set(MRN_LIBRARY_DIRS ${GROONGA_LIBRARY_DIRS})
|
||||
- set(MRN_LIBRARIES ${GROONGA_LIBRARIES})
|
||||
+ set(MRN_LIBRARY_DIRS)
|
||||
+ set(MRN_LIBRARIES ${GROONGA_LIBRARY})
|
||||
if(MRN_GROONGA_NORMALIZER_MYSQL_EMBED)
|
||||
- set(MRN_LIBRARY_DIRS
|
||||
- ${MRN_LIBRARY_DIRS}
|
||||
- "${MRN_BUNDLED_GROONGA_NORMALIZER_MYSQL_DIR}/normalizers")
|
||||
set(MRN_LIBRARIES ${MRN_LIBRARIES} mysql_normalizer)
|
||||
endif()
|
||||
else()
|
||||
Reference in New Issue
Block a user