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:43 UTC 2024

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

Log Message:
Apply fix for hang and data loss on mariadb 10.6 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.18 -r1.19 pkgsrc/databases/mariadb106-client/distinfo
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/databases/mariadb106-client/patches/patch-sql_mysqld.cc
cvs rdiff -u -r1.33 -r1.34 pkgsrc/databases/mariadb106-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/mariadb106-client/distinfo
diff -u pkgsrc/databases/mariadb106-client/distinfo:1.18 pkgsrc/databases/mariadb106-client/distinfo:1.19
--- pkgsrc/databases/mariadb106-client/distinfo:1.18    Mon May 20 11:59:10 2024
+++ pkgsrc/databases/mariadb106-client/distinfo Thu Jun 20 18:53:43 2024
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.18 2024/05/20 11:59:10 nia Exp $
+$NetBSD: distinfo,v 1.19 2024/06/20 18:53:43 abs Exp $
 
 BLAKE2s (mariadb-10.6.18.tar.gz) = 4f8e6c2ba6e75abea5a0191649f456d186ca8a7226ee70d8710179f327e3939b
 SHA512 (mariadb-10.6.18.tar.gz) = c4e89639775a8c6063851fa191cb1096b11299d3d22f19657848bc60ba67b2774978f38ca7625d1741ca80b7932fa65727427ae197899d286f921d5c6fc38af5
@@ -13,7 +13,7 @@ SHA1 (patch-mysys_my__gethwaddr.c) = c3f
 SHA1 (patch-plugin_auth__socket_CMakeLists.txt) = b2fddab1d94ba75c69cbf660f546f8e5821e1d51
 SHA1 (patch-scripts_CMakeLists.txt) = b8a13304e314162ab0a1fc06c5620d6b757975f5
 SHA1 (patch-scripts_mysqld__safe.sh) = 4124e4c8df1527049f5eec9f3d2d4bbe80e7c33f
-SHA1 (patch-sql_mysqld.cc) = 19d325124cde1b45376c9710cdd104dc460f4bea
+SHA1 (patch-sql_mysqld.cc) = 71400987a62be294842694cbc59c446bef578202
 SHA1 (patch-storage_innobase_include_transactional__lock__guard.h) = d5ff507acdd21858791246ef5a2559e653cb7833
 SHA1 (patch-storage_rocksdb_rdb__io__watchdog.cc) = 85ee5007cfda0d3070ec20b2b774738b01f8e083
 SHA1 (patch-storage_rocksdb_rdb__io__watchdog.h) = d790c092d7d35d014c5ef209635c18614c3a8301

Index: pkgsrc/databases/mariadb106-client/patches/patch-sql_mysqld.cc
diff -u pkgsrc/databases/mariadb106-client/patches/patch-sql_mysqld.cc:1.1 pkgsrc/databases/mariadb106-client/patches/patch-sql_mysqld.cc:1.2
--- pkgsrc/databases/mariadb106-client/patches/patch-sql_mysqld.cc:1.1  Sat Aug  7 08:55:50 2021
+++ pkgsrc/databases/mariadb106-client/patches/patch-sql_mysqld.cc      Thu Jun 20 18:53:43 2024
@@ -1,11 +1,14 @@
-$NetBSD: patch-sql_mysqld.cc,v 1.1 2021/08/07 08:55:50 nia Exp $
+$NetBSD: patch-sql_mysqld.cc,v 1.2 2024/06/20 18:53:43 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/mariadb106-server/Makefile
diff -u pkgsrc/databases/mariadb106-server/Makefile:1.33 pkgsrc/databases/mariadb106-server/Makefile:1.34
--- pkgsrc/databases/mariadb106-server/Makefile:1.33    Wed May 29 16:31:43 2024
+++ pkgsrc/databases/mariadb106-server/Makefile Thu Jun 20 18:53:43 2024
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.33 2024/05/29 16:31:43 adam Exp $
+# $NetBSD: Makefile,v 1.34 2024/06/20 18:53:43 abs Exp $
 
 PKGNAME=       ${DISTNAME:S/-/-server-/}
-PKGREVISION=   2
+PKGREVISION=   3
 COMMENT=       MariaDB 10.6, a free MySQL compatible database (server)
 
 CONFLICTS=     mysql-server-[0-9]*



Home | Main Index | Thread Index | Old Index