diff options
author | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2018-09-26 12:30:23 +0300 |
---|---|---|
committer | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2018-09-26 12:30:23 +0300 |
commit | a44ca17fe6368538e4bbea9fd3c0ec0367102d4f (patch) | |
tree | 79d1398cd2bb1006a9cd83cc397d5fead8cde788 /main/mariadb | |
parent | 71dbbd5d2ee0797f02723a536fc250b80fc5d342 (diff) | |
download | aports-a44ca17fe6368538e4bbea9fd3c0ec0367102d4f.tar.bz2 aports-a44ca17fe6368538e4bbea9fd3c0ec0367102d4f.tar.xz |
main/mariadb: apply upstream pthread patch
Diffstat (limited to 'main/mariadb')
-rw-r--r-- | main/mariadb/APKBUILD | 4 | ||||
-rw-r--r-- | main/mariadb/fix-pthread-detach.patch | 48 |
2 files changed, 40 insertions, 12 deletions
diff --git a/main/mariadb/APKBUILD b/main/mariadb/APKBUILD index 586ad667b4..d53190d0c3 100644 --- a/main/mariadb/APKBUILD +++ b/main/mariadb/APKBUILD @@ -6,7 +6,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=mariadb pkgver=10.3.9 -pkgrel=1 +pkgrel=2 pkgdesc="A fast SQL database server" url="http://www.mariadb.org" pkgusers="mysql" @@ -406,6 +406,6 @@ sha512sums="7c7a678fb0c85da64b6df3df17b8cf7f2ccf862e27dcf8535f7403f8693c76b3b1a9 06751768cb00d2e433655635c38d267ef25084a5830ff40e719ac579223c7192dc34b43f919ab6faf480094632327511cbd22456064dde2d04dc15648b9e3b9f mariadb.initd 0c08198b907dad18c5a7ab89f37ff53da7cb102b0848fb58912900bd92468a0d4f853bc5c0116f655c500d5ed20dcbf20d3884dcd0040634e23c911dfeaf7001 fix-mysql-install-db-path.patch 2d42a3e4051aaeee49da52947dbc354d44d975ca50571777a0aba8bed032ccd6a07c29e0cbb9f74c396dce9937b5d16af19ab310638c285e418e0281361024f3 fix-ucontext-check.patch -b6d3b9a12e8e8c93773d449387400d41b9164bb9295df1a7842b4d11fbce3d823e2078dcbaa3b35f4ca4646841b5f170e635c732c94b76ab526a35a02edbe9aa fix-pthread-detach.patch +60450ccc3b089953cb20ddd7c81aa1afbb52aa9d28211eeec0b9c04653b2bf5f56561315d8c8e0444d263cd412c28df91936d78daf1919dda9e402beb2243a43 fix-pthread-detach.patch e9ae4613f1d8c5f0a59b39a3548c46e50674ae78e7457d0e64c49f7e1573125c13634bbce7e29179bb8865a423171f852f43b96f7ef95619a95f02edcfc71efd ppc-remove-glibc-dep.patch 70da971aa78815495098205bcbd28428430aa83c3f1050fec0231ca86af9d9def2d2108a48ee08d86812c8dc5ad8ab1ef4e17a49b4936ed5187ae0f6a7ef8f63 pcre.cmake.patch" diff --git a/main/mariadb/fix-pthread-detach.patch b/main/mariadb/fix-pthread-detach.patch index 8ac865b0fd..6729d096ae 100644 --- a/main/mariadb/fix-pthread-detach.patch +++ b/main/mariadb/fix-pthread-detach.patch @@ -1,11 +1,39 @@ ---- mariadb-10.3.9/sql/mysqld.cc -+++ mariadb-10.3.9.detach/sql/mysqld.cc -@@ -4842,8 +4842,6 @@ - init_show_explain_psi_keys(); - /* Parameter for threads created for connections */ - (void) pthread_attr_init(&connection_attrib); -- (void) pthread_attr_setdetachstate(&connection_attrib, -- PTHREAD_CREATE_DETACHED); - pthread_attr_setscope(&connection_attrib, PTHREAD_SCOPE_SYSTEM); +From c45b4a774b6d1404a080a1c1759f780fa78f223b Mon Sep 17 00:00:00 2001 +From: Sergey Vojtovich <svoj@mariadb.org> +Date: Fri, 21 Sep 2018 16:04:16 +0400 +Subject: [PATCH] MDEV-17200 - pthread_detach called for already detached + threads + +pthread_detach_this_thread() was intended to be defined to something +meaningful only on some ancient unixes, which don't have +pthread_attr_setdetachstate() defined. Otherwise, on normal unixes, +threads are created detached in the first place. + +This was broken in 0f01bf267680244ec488adaf65a42838756ed48e so that +we started calling pthread_detach() for already detached threads. +Intention was to detach aria checkpoint thread. + +However in 87007dc2f71634cc460271eb277ad851ec69c04b aria service threads +were made joinable with appropriate handling, which makes breaking +revision unneccessary. + +Revert remnants of 0f01bf267680244ec488adaf65a42838756ed48e, so that +pthread_detach_this_thread() is meaningful only on some ancient unixes +again. +--- + include/my_pthread.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/my_pthread.h b/include/my_pthread.h +index 6b830ca36d24..ae2f912f979b 100644 +--- a/include/my_pthread.h ++++ b/include/my_pthread.h +@@ -184,7 +184,7 @@ int pthread_cancel(pthread_t thread); + #define pthread_key(T,V) pthread_key_t V + #define my_pthread_getspecific_ptr(T,V) my_pthread_getspecific(T,(V)) + #define my_pthread_setspecific_ptr(T,V) pthread_setspecific(T,(void*) (V)) +-#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(tmp); } ++#define pthread_detach_this_thread() + #define pthread_handler_t EXTERNC void * + typedef void *(* pthread_handler)(void *); - #ifdef HAVE_REPLICATION |