git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #91944 from Izorkin/mariadb-update

mariadb: 10.4.15 -> 10.5.8

commit1cf298791b255bee486b3068e3758273751d4993 authorAaron Andersen <aaron@fosslib.net> dateTue 12 Jan 2021, 12:13 (6 years ago) parentec4a166856a8b6
4 files changed+28−32
nixos/doc/manual/release-notes/rl-2103.xml+16 nixos/tests/mysql/mysql.nix+1−15 pkgs/servers/sql/mariadb/default.nix+11−14 pkgs/top-level/all-packages.nix−3
nixos/doc/manual/release-notes/rl-2103.xml+16
@@ -256,6 +256,22 @@
256256 which is the new stable release. OpenAFS 1.6 was removed.
257257 </para>
258258 </listitem>
259+ <listitem>
260+ <para>
261+ MariaDB has been updated to 10.5.
262+ Before you upgrade, it would be best to take a backup of your database and read
263+ <link xlink:href="https://mariadb.com/kb/en/upgrading-from-mariadb-104-to-mariadb-105/#incompatible-changes-between-104-and-105">
264+ Incompatible Changes Between 10.4 and 10.5</link>.
265+ After the upgrade you will need to run <literal>mysql_upgrade</literal>.
266+ </para>
267+ </listitem>
268+ <listitem>
269+ <para>
270+ The TokuDB storage engine dropped in <package>mariadb</package> 10.5 and removed in <package>mariadb</package> 10.6.
271+ It is recommended to switch to RocksDB. See also <link xlink:href="https://mariadb.com/kb/en/tokudb/">TokuDB</link> and
272+ <link xlink:href="https://jira.mariadb.org/browse/MDEV-19780">MDEV-19780: Remove the TokuDB storage engine</link>.
273+ </para>
274+ </listitem>
259275 <listitem>
260276 <para>
261277 The <literal>openldap</literal> module now has support for OLC-style
nixos/tests/mysql/mysql.nix+1−15
@@ -98,7 +98,7 @@ import ./../make-test-python.nix ({ pkgs, ...} : {
9898 }];
9999 services.mysql.settings = {
100100 mysqld = {
101− plugin-load-add = [ "ha_tokudb.so" "ha_rocksdb.so" ];
101+ plugin-load-add = [ "ha_rocksdb.so" ];
102102 };
103103 };
104104 services.mysql.package = pkgs.mariadb;
@@ -185,19 +185,5 @@ import ./../make-test-python.nix ({ pkgs, ...} : {
185185 mariadb.succeed(
186186 "echo 'use testdb; drop table rocksdb;' | sudo -u testuser mysql -u testuser"
187187 )
188− '' + pkgs.lib.optionalString pkgs.stdenv.isx86_64 ''
189− # Check if TokuDB plugin works
190− mariadb.succeed(
191− "echo 'use testdb; create table tokudb (test_id INT, PRIMARY KEY (test_id)) ENGINE = TokuDB;' | sudo -u testuser mysql -u testuser"
192− )
193− mariadb.succeed(
194− "echo 'use testdb; insert into tokudb values (25);' | sudo -u testuser mysql -u testuser"
195− )
196− mariadb.succeed(
197− "echo 'use testdb; select test_id from tokudb;' | sudo -u testuser mysql -u testuser -N | grep 25"
198− )
199− mariadb.succeed(
200− "echo 'use testdb; drop table tokudb;' | sudo -u testuser mysql -u testuser"
201− )
202188 '';
203189})
pkgs/servers/sql/mariadb/default.nix+11−14
@@ -1,12 +1,11 @@
11{ stdenv, fetchurl, fetchFromGitHub, cmake, pkgconfig, makeWrapper, ncurses, nixosTests
2−, libiconv, openssl, pcre, boost, judy, bison, libxml2, libkrb5, linux-pam, curl
3−, libaio, libevent, jemalloc450, jemalloc, cracklib, systemd, perl
2+, libiconv, openssl, pcre2, boost, judy, bison, libxml2, libkrb5, linux-pam, curl
3+, libaio, libevent, jemalloc, cracklib, systemd, perl
44, bzip2, lz4, lzo, snappy, xz, zlib, zstd
55, fixDarwinDylibNames, cctools, CoreServices, less
66, numactl # NUMA Support
77, withStorageMroonga ? true, kytea, msgpack, zeromq
88, withStorageRocks ? true
9−, withStorageToku ? true
109}:
1110
1211with stdenv.lib;
@@ -23,14 +22,14 @@ mariadb = server // {
2322};
2423
2524common = rec { # attributes common to both builds
26− version = "10.4.15";
25+ version = "10.5.8";
2726
2827 src = fetchurl {
2928 urls = [
3029 "https://downloads.mariadb.org/f/mariadb-${version}/source/mariadb-${version}.tar.gz"
3130 "https://downloads.mariadb.com/MariaDB/mariadb-${version}/source/mariadb-${version}.tar.gz"
3231 ];
33− sha256 = "0cdfzr768cb7n9ag9gqahr8c6igfn513md67xn4rf98ajmnxg0r7";
32+ sha256 = "1s3vfm73911cddjhgpcbkya6nz7ag2zygg56qqzwscn5ybv28j7b";
3433 name = "mariadb-${version}.tar.gz";
3534 };
3635
@@ -38,11 +37,10 @@ common = rec { # attributes common to both builds
3837 ++ optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
3938
4039 buildInputs = [
41− ncurses openssl zlib pcre libiconv curl
40+ ncurses openssl zlib pcre2 libiconv curl
4241 ] ++ optionals stdenv.hostPlatform.isLinux [ libaio systemd libkrb5 ]
4342 ++ optionals stdenv.hostPlatform.isDarwin [ perl cctools CoreServices ]
44− ++ optional (!stdenv.hostPlatform.isDarwin && withStorageToku) [ jemalloc450 ]
45− ++ optional (!stdenv.hostPlatform.isDarwin && !withStorageToku) [ jemalloc ];
43+ ++ optional (!stdenv.hostPlatform.isDarwin) [ jemalloc ];
4644
4745 prePatch = ''
4846 sed -i 's,[^"]*/var/log,/var/log,g' storage/mroonga/vendor/groonga/CMakeLists.txt
@@ -174,6 +172,7 @@ server = stdenv.mkDerivation (common // {
174172 "-DWITH_INNODB_DISALLOW_WRITES=ON"
175173 "-DWITHOUT_EXAMPLE=1"
176174 "-DWITHOUT_FEDERATED=1"
175+ "-DWITHOUT_TOKUDB=1"
177176 ] ++ optional (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch32) [
178177 "-DWITH_NUMA=ON"
179178 ] ++ optional (!withStorageMroonga) [
@@ -182,13 +181,12 @@ server = stdenv.mkDerivation (common // {
182181 "-DWITHOUT_ROCKSDB=1"
183182 ] ++ optional (!stdenv.hostPlatform.isDarwin && withStorageRocks) [
184183 "-DWITH_ROCKSDB_JEMALLOC=ON"
185− ] ++ optional (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isMusl || !withStorageToku) [
186− "-DWITHOUT_TOKUDB=1"
187− ] ++ optional (!stdenv.hostPlatform.isDarwin && withStorageToku) [
188− "-DWITH_JEMALLOC=static"
189− ] ++ optional stdenv.hostPlatform.isDarwin [
184+ ] ++ optional (!stdenv.hostPlatform.isDarwin) [
185+ "-DWITH_JEMALLOC=yes"
186+ ] ++ optionals stdenv.hostPlatform.isDarwin [
190187 "-DPLUGIN_AUTH_PAM=OFF"
191188 "-DWITHOUT_OQGRAPH=1"
189+ "-DWITHOUT_PLUGIN_S3=1"
192190 ];
193191
194192 preConfigure = optionalString (!stdenv.hostPlatform.isDarwin) ''
@@ -198,7 +196,6 @@ server = stdenv.mkDerivation (common // {
198196 postInstall = common.postInstall + ''
199197 chmod +x "$out"/bin/wsrep_sst_common
200198 rm "$out"/bin/{mariadb-client-test,mariadb-test,mysql_client_test,mysqltest}
201− rm -r "$out"/data # Don't need testing data
202199 '' + optionalString withStorageMroonga ''
203200 mv "$out"/share/{groonga,groonga-normalizer-mysql} "$out"/share/doc/mysql
204201 '' + optionalString (!stdenv.hostPlatform.isDarwin) ''
pkgs/top-level/all-packages.nix−3
@@ -17787,9 +17787,6 @@ in
1778717787 };
1778817788
1778917789 mariadb = callPackage ../servers/sql/mariadb {
17790− # As per mariadb's cmake, "static jemalloc_pic.a can only be used up to jemalloc 4".
17791− # https://jira.mariadb.org/browse/MDEV-15034
17792− jemalloc450 = jemalloc450.override ({ disableInitExecTls = true; });
1779317790 inherit (darwin) cctools;
1779417791 inherit (pkgs.darwin.apple_sdk.frameworks) CoreServices;
1779517792 };