Browse Source
Remove configuration preprocessor symbols 'THREAD'
Remove configuration preprocessor symbols 'THREAD'
and 'THREAD_SAFE_CLIENT'. As of MySQL 5.5, we no longer support non-threaded builds. This patch removes all references to the obsolete THREAD and THREAD_SAFE_CLIENT preprocessor symbols. These were used to distinguish between threaded and non-threaded builds.pull/73/head
67 changed files with 94 additions and 816 deletions
-
4client/mysqladmin.cc
-
2cmd-line-utils/readline/CMakeLists.txt
-
8config.h.cmake
-
231dbug/dbug.c
-
4dbug/dbug_analyze.c
-
5dbug/my_main.c
-
5dbug/tests.c
-
1include/CMakeLists.txt
-
10include/heap.h
-
6include/my_base.h
-
2include/my_bitmap.h
-
24include/my_global.h
-
72include/my_no_pthread.h
-
8include/my_pthread.h
-
24include/my_sys.h
-
4include/myisam.h
-
2include/thr_alarm.h
-
15libmysql/client_settings.h
-
14libmysql/libmysql.c
-
72mysys/mf_brkhant.c
-
39mysys/mf_iocache.c
-
5mysys/mf_iocache2.c
-
77mysys/mf_keycache.c
-
2mysys/mf_keycaches.c
-
22mysys/my_bitmap.c
-
3mysys/my_fstream.c
-
2mysys/my_gethostbyname.c
-
19mysys/my_init.c
-
15mysys/my_lib.c
-
6mysys/my_open.c
-
8mysys/my_pread.c
-
2mysys/my_pthread.c
-
4mysys/my_read.c
-
4mysys/my_static.c
-
2mysys/my_thr_init.c
-
3mysys/my_write.c
-
4mysys/mysys_priv.h
-
15mysys/thr_alarm.c
-
13mysys/thr_lock.c
-
8mysys/thr_mutex.c
-
2mysys/thr_rwlock.c
-
24sql-common/client.c
-
6sql-common/client_plugin.c
-
3sql/client_settings.h
-
6sql/filesort.cc
-
7storage/heap/heapdef.h
-
2storage/heap/hp_block.c
-
4storage/heap/hp_create.c
-
2storage/heap/hp_open.c
-
4storage/heap/hp_static.c
-
8storage/heap/hp_test2.c
-
7storage/myisam/ha_myisam.cc
-
6storage/myisam/mi_check.c
-
2storage/myisam/mi_close.c
-
3storage/myisam/mi_delete.c
-
2storage/myisam/mi_delete_all.c
-
5storage/myisam/mi_dynrec.c
-
4storage/myisam/mi_log.c
-
6storage/myisam/mi_open.c
-
2storage/myisam/mi_static.c
-
3storage/myisam/mi_statrec.c
-
2storage/myisam/mi_update.c
-
4storage/myisam/mi_write.c
-
16storage/myisam/myisamdef.h
-
2storage/myisam/sort.c
-
2storage/myisammrg/myrg_def.h
-
10tests/thread_test.c
@ -1,72 +0,0 @@ |
|||||
#ifndef MY_NO_PTHREAD_INCLUDED |
|
||||
#define MY_NO_PTHREAD_INCLUDED |
|
||||
|
|
||||
/* Copyright (C) 2000 MySQL AB, 2008-2009 Sun Microsystems, Inc |
|
||||
|
|
||||
This program is free software; you can redistribute it and/or modify |
|
||||
it under the terms of the GNU General Public License as published by |
|
||||
the Free Software Foundation; version 2 of the License. |
|
||||
|
|
||||
This program is distributed in the hope that it will be useful, |
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
||||
GNU General Public License for more details. |
|
||||
|
|
||||
You should have received a copy of the GNU General Public License |
|
||||
along with this program; if not, write to the Free Software |
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ |
|
||||
|
|
||||
|
|
||||
#ifndef THREAD |
|
||||
|
|
||||
/* |
|
||||
This block is to access some thread-related type definitions |
|
||||
even in builds which do not need thread functions, |
|
||||
as some variables (based on these types) are declared |
|
||||
even in non-threaded builds. |
|
||||
Case in point: 'mf_keycache.c' |
|
||||
*/ |
|
||||
#if defined(__WIN__) |
|
||||
#else /* Normal threads */ |
|
||||
#include <pthread.h> |
|
||||
|
|
||||
#endif /* defined(__WIN__) */ |
|
||||
|
|
||||
|
|
||||
/* |
|
||||
This undefs some pthread mutex locks when one isn't using threads |
|
||||
to make thread safe code, that should also work in single thread |
|
||||
environment, easier to use. |
|
||||
*/ |
|
||||
#define pthread_mutex_init(A,B) |
|
||||
#define pthread_mutex_lock(A) |
|
||||
#define pthread_mutex_unlock(A) |
|
||||
#define pthread_mutex_destroy(A) |
|
||||
#define my_rwlock_init(A,B) |
|
||||
#define rw_rdlock(A) |
|
||||
#define rw_wrlock(A) |
|
||||
#define rw_unlock(A) |
|
||||
#define rwlock_destroy(A) |
|
||||
#define safe_mutex_assert_owner(mp) |
|
||||
|
|
||||
#define mysql_mutex_init(A, B, C) do {} while (0) |
|
||||
#define mysql_mutex_lock(A) do {} while (0) |
|
||||
#define mysql_mutex_unlock(A) do {} while (0) |
|
||||
#define mysql_mutex_destroy(A) do {} while (0) |
|
||||
|
|
||||
#define mysql_rwlock_init(A, B, C) do {} while (0) |
|
||||
#define mysql_rwlock_rdlock(A) do {} while (0) |
|
||||
#define mysql_rwlock_wrlock(A) do {} while (0) |
|
||||
#define mysql_rwlock_unlock(A) do {} while (0) |
|
||||
#define mysql_rwlock_destroy(A) do {} while (0) |
|
||||
|
|
||||
typedef int my_pthread_once_t; |
|
||||
#define MY_PTHREAD_ONCE_INIT 0 |
|
||||
#define MY_PTHREAD_ONCE_DONE 1 |
|
||||
|
|
||||
#define my_pthread_once(C,F) do { \ |
|
||||
if (*(C) != MY_PTHREAD_ONCE_DONE) { F(); *(C)= MY_PTHREAD_ONCE_DONE; } \ |
|
||||
} while(0) |
|
||||
|
|
||||
#endif |
|
||||
#endif /* MY_NO_PTHREAD_INCLUDED */ |
|
||||
@ -1,72 +0,0 @@ |
|||||
/* Copyright (C) 2000 MySQL AB |
|
||||
|
|
||||
This program is free software; you can redistribute it and/or modify |
|
||||
it under the terms of the GNU General Public License as published by |
|
||||
the Free Software Foundation; version 2 of the License. |
|
||||
|
|
||||
This program is distributed in the hope that it will be useful, |
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
||||
GNU General Public License for more details. |
|
||||
|
|
||||
You should have received a copy of the GNU General Public License |
|
||||
along with this program; if not, write to the Free Software |
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ |
|
||||
|
|
||||
/* Dont let the user break when you are doing something important */ |
|
||||
/* Remembers if it got 'SIGINT' and executes it on allow_break */ |
|
||||
/* A static buffer is used; don't call dont_break() twice in a row */ |
|
||||
|
|
||||
#include "mysys_priv.h" |
|
||||
#include "my_static.h" |
|
||||
|
|
||||
/* Set variable that we can't break */ |
|
||||
|
|
||||
#if !defined(THREAD) |
|
||||
void dont_break(void) |
|
||||
{ |
|
||||
my_dont_interrupt=1; |
|
||||
return; |
|
||||
} /* dont_break */ |
|
||||
|
|
||||
void allow_break(void) |
|
||||
{ |
|
||||
{ |
|
||||
reg1 int index; |
|
||||
|
|
||||
my_dont_interrupt=0; |
|
||||
if (_my_signals) |
|
||||
{ |
|
||||
if (_my_signals > MAX_SIGNALS) |
|
||||
_my_signals=MAX_SIGNALS; |
|
||||
for (index=0 ; index < _my_signals ; index++) |
|
||||
{ |
|
||||
if (_my_sig_remember[index].func) /* Safequard */ |
|
||||
{ |
|
||||
(*_my_sig_remember[index].func)(_my_sig_remember[index].number); |
|
||||
_my_sig_remember[index].func=0; |
|
||||
} |
|
||||
} |
|
||||
_my_signals=0; |
|
||||
} |
|
||||
} |
|
||||
} /* dont_break */ |
|
||||
#endif |
|
||||
|
|
||||
/* Set old status */ |
|
||||
|
|
||||
#if !defined(THREAD) |
|
||||
void my_remember_signal(int signal_number, sig_handler (*func) (int)) |
|
||||
{ |
|
||||
#ifndef __WIN__ |
|
||||
reg1 int index; |
|
||||
|
|
||||
index=_my_signals++; /* Nobody can break a ++ ? */ |
|
||||
if (index < MAX_SIGNALS) |
|
||||
{ |
|
||||
_my_sig_remember[index].number=signal_number; |
|
||||
_my_sig_remember[index].func=func; |
|
||||
} |
|
||||
#endif /* __WIN__ */ |
|
||||
} /* my_remember_signal */ |
|
||||
#endif /* THREAD */ |
|
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue