pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/databases



Module Name:    pkgsrc
Committed By:   abs
Date:           Thu Jun 20 18:53:56 UTC 2024

Modified Files:
        pkgsrc/databases/mariadb105-client: distinfo
        pkgsrc/databases/mariadb105-client/patches: patch-sql_mysqld.cc
        pkgsrc/databases/mariadb105-server: Makefile

Log Message:
Apply fix for hang and data loss on mariadb 10.5 shutdown

Apply https://github.com/MariaDB/server/pull/3253 to fix a hang on
at least NetBSD resulting in unrecoverable database corruption when
attempting to shutdown the mariadb server


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 pkgsrc/databases/mariadb105-client/distinfo
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/databases/mariadb105-client/patches/patch-sql_mysqld.cc
cvs rdiff -u -r1.43 -r1.44 pkgsrc/databases/mariadb105-server/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/databases/mariadb105-client/distinfo
diff -u pkgsrc/databases/mariadb105-client/distinfo:1.22 pkgsrc/databases/mariadb105-client/distinfo:1.23
--- pkgsrc/databases/mariadb105-client/distinfo:1.22    Mon May 20 15:53:41 2024
+++ pkgsrc/databases/mariadb105-client/distinfo Thu Jun 20 18:53:56 2024
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.22 2024/05/20 15:53:41 nia Exp $
+$NetBSD: distinfo,v 1.23 2024/06/20 18:53:56 abs Exp $
 
 BLAKE2s (mariadb-10.5.25.tar.gz) = 4302be25824e86c52059348a346aa09b5982c079369ac0fdb2940a1b5283383f
 SHA512 (mariadb-10.5.25.tar.gz) = 82bc2b8d098a35a6ae2c950e51e710534dac9394defe78f19ebd9c39e0bf5a4fe1af03a585324b8a51764f1b3c33e57576b2ff2d77a357861b5dcf2752851cc2
@@ -14,7 +14,7 @@ SHA1 (patch-plugin_auth__socket_CMakeLis
 SHA1 (patch-plugin_auth__socket_auth__socket.c) = 850e94faff382a7e962f6d4d6ff960ddddc624c4
 SHA1 (patch-scripts_CMakeLists.txt) = 54591a4d255a8133e06ab5d52bad262acffcddda
 SHA1 (patch-scripts_mysqld__safe.sh) = 4124e4c8df1527049f5eec9f3d2d4bbe80e7c33f
-SHA1 (patch-sql_mysqld.cc) = 19d325124cde1b45376c9710cdd104dc460f4bea
+SHA1 (patch-sql_mysqld.cc) = 71400987a62be294842694cbc59c446bef578202
 SHA1 (patch-storage_columnstore_CMakeLists.txt) = 9b79ccf35992d2a76c4e2a45d8c749835dd0118a
 SHA1 (patch-storage_rocksdb_CMakeLists.txt) = 2ab237df750cc18facf92c6ad997469f5e43c63f
 SHA1 (patch-storage_rocksdb_rdb__io__watchdog.cc) = 85ee5007cfda0d3070ec20b2b774738b01f8e083

Index: pkgsrc/databases/mariadb105-client/patches/patch-sql_mysqld.cc
diff -u pkgsrc/databases/mariadb105-client/patches/patch-sql_mysqld.cc:1.1 pkgsrc/databases/mariadb105-client/patches/patch-sql_mysqld.cc:1.2
--- pkgsrc/databases/mariadb105-client/patches/patch-sql_mysqld.cc:1.1  Sat Aug  7 09:24:07 2021
+++ pkgsrc/databases/mariadb105-client/patches/patch-sql_mysqld.cc      Thu Jun 20 18:53:56 2024
@@ -1,11 +1,14 @@
-$NetBSD: patch-sql_mysqld.cc,v 1.1 2021/08/07 09:24:07 nia Exp $
+$NetBSD: patch-sql_mysqld.cc,v 1.2 2024/06/20 18:53:56 abs Exp $
 
 Add missing declaration of "concurrency".
 Fixes build on illumos. From OmniOS CE.
 
---- sql/mysqld.cc.orig 2021-08-03 14:48:41.000000000 +0000
+Apply https://github.com/MariaDB/server/pull/3253 to avoid
+hang on exit on at least NetBSD (and presumably macOS)
+
+--- sql/mysqld.cc.orig 2024-06-20 16:21:36.964589822 +0000
 +++ sql/mysqld.cc
-@@ -443,7 +443,7 @@ Atomic_counter<uint32_t> THD_count::coun
+@@ -453,7 +453,7 @@ Atomic_counter<uint32_t> THD_count::coun
  bool shutdown_wait_for_slaves;
  Atomic_counter<uint32_t> slave_open_temp_tables;
  ulong thread_created;
@@ -14,3 +17,39 @@ Fixes build on illumos. From OmniOS CE.
  ulong what_to_log;
  ulong slow_launch_time;
  ulong open_files_limit, max_binlog_size;
+@@ -3205,6 +3205,15 @@ static void start_signal_handler(void)
+   DBUG_VOID_RETURN;
+ }
+ 
++/** Called only from signal_hand function. */
++static void* exit_signal_handler()
++{
++    my_thread_end();
++    signal_thread_in_use= 0;
++    pthread_exit(0);  // Safety
++    return nullptr;  // Avoid compiler warnings
++}
++
+ 
+ /** This threads handles all signals and alarms. */
+ /* ARGSUSED */
+@@ -3265,10 +3274,7 @@ pthread_handler_t signal_hand(void *arg 
+     if (abort_loop)
+     {
+       DBUG_PRINT("quit",("signal_handler: calling my_thread_end()"));
+-      my_thread_end();
+-      signal_thread_in_use= 0;
+-      pthread_exit(0);                                // Safety
+-      return 0;                                 // Avoid compiler warnings
++      return exit_signal_handler();
+     }
+     switch (sig) {
+     case SIGTERM:
+@@ -3287,6 +3293,7 @@ pthread_handler_t signal_hand(void *arg 
+         PSI_CALL_delete_current_thread();
+         my_sigset(sig, SIG_IGN);
+         break_connect_loop(); // MIT THREAD has a alarm thread
++        return exit_signal_handler();
+       }
+       break;
+     case SIGHUP:

Index: pkgsrc/databases/mariadb105-server/Makefile
diff -u pkgsrc/databases/mariadb105-server/Makefile:1.43 pkgsrc/databases/mariadb105-server/Makefile:1.44
--- pkgsrc/databases/mariadb105-server/Makefile:1.43    Wed May 29 16:31:43 2024
+++ pkgsrc/databases/mariadb105-server/Makefile Thu Jun 20 18:53:56 2024
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.43 2024/05/29 16:31:43 adam Exp $
+# $NetBSD: Makefile,v 1.44 2024/06/20 18:53:56 abs Exp $
 
 PKGNAME=       ${DISTNAME:S/-/-server-/}
-PKGREVISION=   2
+PKGREVISION=   3
 COMMENT=       MariaDB 10.5, a free MySQL compatible database (server)
 
 CONFLICTS=     mysql-server-[0-9]*



Home | Main Index | Thread Index | Old Index