Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
add70fc1
Commit
add70fc1
authored
Mar 26, 2001
by
monty@donna.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed pthread_mutex_init() to use new MY_MUTEX_INIT.. macro
(For glibc 2.2)
parent
76e59081
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
44 additions
and
44 deletions
+44
-44
client/thread_test.c
client/thread_test.c
+1
-1
dbug/dbug.c
dbug/dbug.c
+1
-1
heap/hp_open.c
heap/hp_open.c
+1
-1
isam/open.c
isam/open.c
+1
-1
myisam/mi_open.c
myisam/mi_open.c
+1
-1
mysys/thr_alarm.c
mysys/thr_alarm.c
+2
-2
mysys/thr_lock.c
mysys/thr_lock.c
+2
-2
mysys/thr_rwlock.c
mysys/thr_rwlock.c
+1
-1
sql/ha_berkeley.cc
sql/ha_berkeley.cc
+2
-2
sql/ha_innobase.cc
sql/ha_innobase.cc
+2
-2
sql/hash_filo.h
sql/hash_filo.h
+1
-1
sql/hostname.cc
sql/hostname.cc
+1
-1
sql/item_func.cc
sql/item_func.cc
+1
-1
sql/log.cc
sql/log.cc
+2
-2
sql/mysqld.cc
sql/mysqld.cc
+20
-20
sql/slave.h
sql/slave.h
+1
-1
sql/sql_class.cc
sql/sql_class.cc
+1
-1
sql/sql_class.h
sql/sql_class.h
+1
-1
sql/sql_insert.cc
sql/sql_insert.cc
+1
-1
sql/sql_udf.cc
sql/sql_udf.cc
+1
-1
No files found.
client/thread_test.c
View file @
add70fc1
...
@@ -229,7 +229,7 @@ int main(int argc, char **argv)
...
@@ -229,7 +229,7 @@ int main(int argc, char **argv)
error
,
errno
);
error
,
errno
);
exit
(
1
);
exit
(
1
);
}
}
pthread_mutex_init
(
&
LOCK_thread_count
,
NULL
);
pthread_mutex_init
(
&
LOCK_thread_count
,
MY_MUTEX_INIT_FAST
);
if
((
error
=
pthread_attr_init
(
&
thr_attr
)))
if
((
error
=
pthread_attr_init
(
&
thr_attr
)))
{
{
...
...
dbug/dbug.c
View file @
add70fc1
...
@@ -341,7 +341,7 @@ pthread_mutex_t THR_LOCK_dbug;
...
@@ -341,7 +341,7 @@ pthread_mutex_t THR_LOCK_dbug;
static
void
init_dbug_state
(
void
)
static
void
init_dbug_state
(
void
)
{
{
pthread_mutex_init
(
&
THR_LOCK_dbug
,
NULL
);
pthread_mutex_init
(
&
THR_LOCK_dbug
,
MY_MUTEX_INIT_FAST
);
}
}
static
CODE_STATE
*
code_state
(
void
)
static
CODE_STATE
*
code_state
(
void
)
...
...
heap/hp_open.c
View file @
add70fc1
...
@@ -88,7 +88,7 @@ HP_INFO *heap_open(const char *name, int mode, uint keys, HP_KEYDEF *keydef,
...
@@ -88,7 +88,7 @@ HP_INFO *heap_open(const char *name, int mode, uint keys, HP_KEYDEF *keydef,
}
}
#ifdef THREAD
#ifdef THREAD
thr_lock_init
(
&
share
->
lock
);
thr_lock_init
(
&
share
->
lock
);
VOID
(
pthread_mutex_init
(
&
share
->
intern_lock
,
NULL
));
VOID
(
pthread_mutex_init
(
&
share
->
intern_lock
,
MY_MUTEX_INIT_FAST
));
#endif
#endif
share
->
open_list
.
data
=
(
void
*
)
share
;
share
->
open_list
.
data
=
(
void
*
)
share
;
heap_share_list
=
list_add
(
heap_share_list
,
&
share
->
open_list
);
heap_share_list
=
list_add
(
heap_share_list
,
&
share
->
open_list
);
...
...
isam/open.c
View file @
add70fc1
...
@@ -270,7 +270,7 @@ N_INFO *nisam_open(const char *name, int mode, uint handle_locking)
...
@@ -270,7 +270,7 @@ N_INFO *nisam_open(const char *name, int mode, uint handle_locking)
setup_functions
(
share
);
setup_functions
(
share
);
#ifdef THREAD
#ifdef THREAD
thr_lock_init
(
&
share
->
lock
);
thr_lock_init
(
&
share
->
lock
);
VOID
(
pthread_mutex_init
(
&
share
->
intern_lock
,
NULL
));
VOID
(
pthread_mutex_init
(
&
share
->
intern_lock
,
MY_MUTEX_INIT_FAST
));
#endif
#endif
}
}
else
else
...
...
myisam/mi_open.c
View file @
add70fc1
...
@@ -393,7 +393,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
...
@@ -393,7 +393,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
setup_functions
(
share
);
setup_functions
(
share
);
#ifdef THREAD
#ifdef THREAD
thr_lock_init
(
&
share
->
lock
);
thr_lock_init
(
&
share
->
lock
);
VOID
(
pthread_mutex_init
(
&
share
->
intern_lock
,
NULL
));
VOID
(
pthread_mutex_init
(
&
share
->
intern_lock
,
MY_MUTEX_INIT_FAST
));
for
(
i
=
0
;
i
<
keys
;
i
++
)
for
(
i
=
0
;
i
<
keys
;
i
++
)
VOID
(
my_rwlock_init
(
&
share
->
key_root_lock
[
i
],
NULL
));
VOID
(
my_rwlock_init
(
&
share
->
key_root_lock
[
i
],
NULL
));
if
(
!
thr_lock_inited
)
if
(
!
thr_lock_inited
)
...
...
mysys/thr_alarm.c
View file @
add70fc1
...
@@ -71,7 +71,7 @@ void init_thr_alarm(uint max_alarms)
...
@@ -71,7 +71,7 @@ void init_thr_alarm(uint max_alarms)
init_queue
(
&
alarm_queue
,
max_alarms
+
1
,
offsetof
(
ALARM
,
expire_time
),
0
,
init_queue
(
&
alarm_queue
,
max_alarms
+
1
,
offsetof
(
ALARM
,
expire_time
),
0
,
compare_ulong
,
NullS
);
compare_ulong
,
NullS
);
sigfillset
(
&
full_signal_set
);
/* Neaded to block signals */
sigfillset
(
&
full_signal_set
);
/* Neaded to block signals */
pthread_mutex_init
(
&
LOCK_alarm
,
NULL
);
pthread_mutex_init
(
&
LOCK_alarm
,
MY_MUTEX_INIT_FAST
);
#if THR_CLIENT_ALARM != SIGALRM || defined(USE_ALARM_THREAD)
#if THR_CLIENT_ALARM != SIGALRM || defined(USE_ALARM_THREAD)
#if defined(HAVE_mit_thread)
#if defined(HAVE_mit_thread)
sigset
(
THR_CLIENT_ALARM
,
thread_alarm
);
/* int. thread system calls */
sigset
(
THR_CLIENT_ALARM
,
thread_alarm
);
/* int. thread system calls */
...
@@ -862,7 +862,7 @@ int main(int argc __attribute__((unused)),char **argv __attribute__((unused)))
...
@@ -862,7 +862,7 @@ int main(int argc __attribute__((unused)),char **argv __attribute__((unused)))
if
(
argc
>
1
&&
argv
[
1
][
0
]
==
'-'
&&
argv
[
1
][
1
]
==
'#'
)
if
(
argc
>
1
&&
argv
[
1
][
0
]
==
'-'
&&
argv
[
1
][
1
]
==
'#'
)
DBUG_PUSH
(
argv
[
1
]
+
2
);
DBUG_PUSH
(
argv
[
1
]
+
2
);
pthread_mutex_init
(
&
LOCK_thread_count
,
NULL
);
pthread_mutex_init
(
&
LOCK_thread_count
,
MY_MUTEX_INIT_FAST
);
pthread_cond_init
(
&
COND_thread_count
,
NULL
);
pthread_cond_init
(
&
COND_thread_count
,
NULL
);
/* Start a alarm handling thread */
/* Start a alarm handling thread */
...
...
mysys/thr_lock.c
View file @
add70fc1
...
@@ -288,7 +288,7 @@ void thr_lock_init(THR_LOCK *lock)
...
@@ -288,7 +288,7 @@ void thr_lock_init(THR_LOCK *lock)
{
{
DBUG_ENTER
(
"thr_lock_init"
);
DBUG_ENTER
(
"thr_lock_init"
);
bzero
((
char
*
)
lock
,
sizeof
(
*
lock
));
bzero
((
char
*
)
lock
,
sizeof
(
*
lock
));
VOID
(
pthread_mutex_init
(
&
lock
->
mutex
,
NULL
));
VOID
(
pthread_mutex_init
(
&
lock
->
mutex
,
MY_MUTEX_INIT_FAST
));
lock
->
read
.
last
=
&
lock
->
read
.
data
;
lock
->
read
.
last
=
&
lock
->
read
.
data
;
lock
->
read_wait
.
last
=
&
lock
->
read_wait
.
data
;
lock
->
read_wait
.
last
=
&
lock
->
read_wait
.
data
;
lock
->
write_wait
.
last
=
&
lock
->
write_wait
.
data
;
lock
->
write_wait
.
last
=
&
lock
->
write_wait
.
data
;
...
@@ -1218,7 +1218,7 @@ int main(int argc __attribute__((unused)),char **argv __attribute__((unused)))
...
@@ -1218,7 +1218,7 @@ int main(int argc __attribute__((unused)),char **argv __attribute__((unused)))
error
,
errno
);
error
,
errno
);
exit
(
1
);
exit
(
1
);
}
}
if
((
error
=
pthread_mutex_init
(
&
LOCK_thread_count
,
NULL
)))
if
((
error
=
pthread_mutex_init
(
&
LOCK_thread_count
,
MY_MUTEX_INIT_FAST
)))
{
{
fprintf
(
stderr
,
"Got error: %d from pthread_cond_init (errno: %d)"
,
fprintf
(
stderr
,
"Got error: %d from pthread_cond_init (errno: %d)"
,
error
,
errno
);
error
,
errno
);
...
...
mysys/thr_rwlock.c
View file @
add70fc1
...
@@ -63,7 +63,7 @@ int my_rwlock_init( rw_lock_t *rwp, void *arg __attribute__((unused)))
...
@@ -63,7 +63,7 @@ int my_rwlock_init( rw_lock_t *rwp, void *arg __attribute__((unused)))
{
{
pthread_condattr_t
cond_attr
;
pthread_condattr_t
cond_attr
;
pthread_mutex_init
(
&
rwp
->
lock
,
NULL
);
pthread_mutex_init
(
&
rwp
->
lock
,
MY_MUTEX_INIT_FAST
);
pthread_condattr_init
(
&
cond_attr
);
pthread_condattr_init
(
&
cond_attr
);
pthread_cond_init
(
&
rwp
->
readers
,
&
cond_attr
);
pthread_cond_init
(
&
rwp
->
readers
,
&
cond_attr
);
pthread_cond_init
(
&
rwp
->
writers
,
&
cond_attr
);
pthread_cond_init
(
&
rwp
->
writers
,
&
cond_attr
);
...
...
sql/ha_berkeley.cc
View file @
add70fc1
...
@@ -171,7 +171,7 @@ bool berkeley_init(void)
...
@@ -171,7 +171,7 @@ bool berkeley_init(void)
(
void
)
hash_init
(
&
bdb_open_tables
,
32
,
0
,
0
,
(
void
)
hash_init
(
&
bdb_open_tables
,
32
,
0
,
0
,
(
hash_get_key
)
bdb_get_key
,
0
,
0
);
(
hash_get_key
)
bdb_get_key
,
0
,
0
);
pthread_mutex_init
(
&
bdb_mutex
,
NULL
);
pthread_mutex_init
(
&
bdb_mutex
,
MY_MUTEX_INIT_FAST
);
DBUG_RETURN
(
db_env
==
0
);
DBUG_RETURN
(
db_env
==
0
);
}
}
...
@@ -2151,7 +2151,7 @@ static BDB_SHARE *get_share(const char *table_name, TABLE *table)
...
@@ -2151,7 +2151,7 @@ static BDB_SHARE *get_share(const char *table_name, TABLE *table)
return
0
;
/* purecov: inspected */
return
0
;
/* purecov: inspected */
}
}
thr_lock_init
(
&
share
->
lock
);
thr_lock_init
(
&
share
->
lock
);
pthread_mutex_init
(
&
share
->
mutex
,
NULL
);
pthread_mutex_init
(
&
share
->
mutex
,
MY_MUTEX_INIT_FAST
);
}
}
}
}
pthread_mutex_unlock
(
&
bdb_mutex
);
pthread_mutex_unlock
(
&
bdb_mutex
);
...
...
sql/ha_innobase.cc
View file @
add70fc1
...
@@ -476,7 +476,7 @@ innobase_init(void)
...
@@ -476,7 +476,7 @@ innobase_init(void)
}
}
(
void
)
hash_init
(
&
innobase_open_tables
,
32
,
0
,
0
,
(
void
)
hash_init
(
&
innobase_open_tables
,
32
,
0
,
0
,
(
hash_get_key
)
innobase_get_key
,
0
,
0
);
(
hash_get_key
)
innobase_get_key
,
0
,
0
);
pthread_mutex_init
(
&
innobase_mutex
,
NULL
);
pthread_mutex_init
(
&
innobase_mutex
,
MY_MUTEX_INIT_FAST
);
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
}
}
...
@@ -2642,7 +2642,7 @@ static INNOBASE_SHARE *get_share(const char *table_name)
...
@@ -2642,7 +2642,7 @@ static INNOBASE_SHARE *get_share(const char *table_name)
return
0
;
return
0
;
}
}
thr_lock_init
(
&
share
->
lock
);
thr_lock_init
(
&
share
->
lock
);
pthread_mutex_init
(
&
share
->
mutex
,
NULL
);
pthread_mutex_init
(
&
share
->
mutex
,
MY_MUTEX_INIT_FAST
);
}
}
}
}
share
->
use_count
++
;
share
->
use_count
++
;
...
...
sql/hash_filo.h
View file @
add70fc1
...
@@ -70,7 +70,7 @@ class hash_filo
...
@@ -70,7 +70,7 @@ class hash_filo
if
(
!
init
)
if
(
!
init
)
{
{
init
=
1
;
init
=
1
;
(
void
)
pthread_mutex_init
(
&
lock
,
NULL
);
(
void
)
pthread_mutex_init
(
&
lock
,
MY_MUTEX_INIT_FAST
);
}
}
if
(
!
locked
)
if
(
!
locked
)
(
void
)
pthread_mutex_lock
(
&
lock
);
(
void
)
pthread_mutex_lock
(
&
lock
);
...
...
sql/hostname.cc
View file @
add70fc1
...
@@ -57,7 +57,7 @@ void hostname_cache_refresh()
...
@@ -57,7 +57,7 @@ void hostname_cache_refresh()
bool
hostname_cache_init
()
bool
hostname_cache_init
()
{
{
(
void
)
pthread_mutex_init
(
&
LOCK_hostname
,
NULL
);
(
void
)
pthread_mutex_init
(
&
LOCK_hostname
,
MY_MUTEX_INIT_SLOW
);
if
(
!
(
hostname_cache
=
new
hash_filo
(
HOST_CACHE_SIZE
,
offsetof
(
host_entry
,
ip
),
if
(
!
(
hostname_cache
=
new
hash_filo
(
HOST_CACHE_SIZE
,
offsetof
(
host_entry
,
ip
),
sizeof
(
struct
in_addr
),
NULL
,
sizeof
(
struct
in_addr
),
NULL
,
(
void
(
*
)(
void
*
))
free
)))
(
void
(
*
)(
void
*
))
free
)))
...
...
sql/item_func.cc
View file @
add70fc1
...
@@ -1370,7 +1370,7 @@ char *ull_get_key(const ULL *ull,uint *length,
...
@@ -1370,7 +1370,7 @@ char *ull_get_key(const ULL *ull,uint *length,
void
item_user_lock_init
(
void
)
void
item_user_lock_init
(
void
)
{
{
pthread_mutex_init
(
&
LOCK_user_locks
,
NULL
);
pthread_mutex_init
(
&
LOCK_user_locks
,
MY_MUTEX_INIT_SLOW
);
hash_init
(
&
hash_user_locks
,
16
,
0
,
0
,(
hash_get_key
)
ull_get_key
,
NULL
,
0
);
hash_init
(
&
hash_user_locks
,
16
,
0
,
0
,(
hash_get_key
)
ull_get_key
,
NULL
,
0
);
}
}
...
...
sql/log.cc
View file @
add70fc1
...
@@ -141,8 +141,8 @@ void MYSQL_LOG::open(const char *log_name, enum_log_type log_type_arg,
...
@@ -141,8 +141,8 @@ void MYSQL_LOG::open(const char *log_name, enum_log_type log_type_arg,
if
(
!
inited
)
if
(
!
inited
)
{
{
inited
=
1
;
inited
=
1
;
(
void
)
pthread_mutex_init
(
&
LOCK_log
,
NULL
);
(
void
)
pthread_mutex_init
(
&
LOCK_log
,
MY_MUTEX_INIT_SLOW
);
(
void
)
pthread_mutex_init
(
&
LOCK_index
,
NULL
);
(
void
)
pthread_mutex_init
(
&
LOCK_index
,
MY_MUTEX_INIT_SLOW
);
if
(
log_type_arg
==
LOG_BIN
&&
*
fn_ext
(
log_name
))
if
(
log_type_arg
==
LOG_BIN
&&
*
fn_ext
(
log_name
))
no_rotate
=
1
;
no_rotate
=
1
;
}
}
...
...
sql/mysqld.cc
View file @
add70fc1
...
@@ -1568,31 +1568,31 @@ int main(int argc, char **argv)
...
@@ -1568,31 +1568,31 @@ int main(int argc, char **argv)
/* These must be set early */
/* These must be set early */
(
void
)
pthread_mutex_init
(
&
LOCK_mysql_create_db
,
MY_MUTEX_INIT_SLOW
);
(
void
)
pthread_mutex_init
(
&
LOCK_Acl
,
MY_MUTEX_INIT_SLOW
);
(
void
)
pthread_mutex_init
(
&
LOCK_grant
,
MY_MUTEX_INIT_FAST
);
(
void
)
pthread_mutex_init
(
&
LOCK_open
,
MY_MUTEX_INIT_FAST
);
(
void
)
pthread_mutex_init
(
&
LOCK_thread_count
,
MY_MUTEX_INIT_FAST
);
(
void
)
pthread_mutex_init
(
&
LOCK_mapped_file
,
MY_MUTEX_INIT_SLOW
);
(
void
)
pthread_mutex_init
(
&
LOCK_status
,
MY_MUTEX_INIT_FAST
);
(
void
)
pthread_mutex_init
(
&
LOCK_error_log
,
MY_MUTEX_INIT_FAST
);
(
void
)
pthread_mutex_init
(
&
LOCK_delayed_insert
,
MY_MUTEX_INIT_FAST
);
(
void
)
pthread_mutex_init
(
&
LOCK_delayed_status
,
MY_MUTEX_INIT_FAST
);
(
void
)
pthread_mutex_init
(
&
LOCK_delayed_create
,
MY_MUTEX_INIT_SLOW
);
(
void
)
pthread_mutex_init
(
&
LOCK_manager
,
MY_MUTEX_INIT_FAST
);
(
void
)
pthread_mutex_init
(
&
LOCK_crypt
,
MY_MUTEX_INIT_FAST
);
(
void
)
pthread_mutex_init
(
&
LOCK_bytes_sent
,
MY_MUTEX_INIT_FAST
);
(
void
)
pthread_mutex_init
(
&
LOCK_bytes_received
,
MY_MUTEX_INIT_FAST
);
(
void
)
pthread_mutex_init
(
&
LOCK_timezone
,
MY_MUTEX_INIT_FAST
);
(
void
)
pthread_mutex_init
(
&
LOCK_binlog_update
,
MY_MUTEX_INIT_FAST
);
// QQ NOT USED
(
void
)
pthread_mutex_init
(
&
LOCK_slave
,
MY_MUTEX_INIT_FAST
);
(
void
)
pthread_mutex_init
(
&
LOCK_server_id
,
MY_MUTEX_INIT_FAST
);
(
void
)
pthread_mutex_init
(
&
LOCK_user_conn
,
MY_MUTEX_INIT_FAST
);
(
void
)
pthread_cond_init
(
&
COND_thread_count
,
NULL
);
(
void
)
pthread_cond_init
(
&
COND_thread_count
,
NULL
);
(
void
)
pthread_mutex_init
(
&
LOCK_mysql_create_db
,
NULL
);
(
void
)
pthread_mutex_init
(
&
LOCK_Acl
,
NULL
);
(
void
)
pthread_mutex_init
(
&
LOCK_grant
,
NULL
);
(
void
)
pthread_mutex_init
(
&
LOCK_open
,
NULL
);
(
void
)
pthread_mutex_init
(
&
LOCK_thread_count
,
NULL
);
(
void
)
pthread_mutex_init
(
&
LOCK_mapped_file
,
NULL
);
(
void
)
pthread_mutex_init
(
&
LOCK_status
,
NULL
);
(
void
)
pthread_mutex_init
(
&
LOCK_error_log
,
NULL
);
(
void
)
pthread_mutex_init
(
&
LOCK_delayed_insert
,
NULL
);
(
void
)
pthread_mutex_init
(
&
LOCK_delayed_status
,
NULL
);
(
void
)
pthread_mutex_init
(
&
LOCK_delayed_create
,
NULL
);
(
void
)
pthread_cond_init
(
&
COND_refresh
,
NULL
);
(
void
)
pthread_cond_init
(
&
COND_refresh
,
NULL
);
(
void
)
pthread_cond_init
(
&
COND_thread_cache
,
NULL
);
(
void
)
pthread_cond_init
(
&
COND_thread_cache
,
NULL
);
(
void
)
pthread_cond_init
(
&
COND_flush_thread_cache
,
NULL
);
(
void
)
pthread_cond_init
(
&
COND_flush_thread_cache
,
NULL
);
(
void
)
pthread_cond_init
(
&
COND_manager
,
NULL
);
(
void
)
pthread_cond_init
(
&
COND_manager
,
NULL
);
(
void
)
pthread_mutex_init
(
&
LOCK_manager
,
NULL
);
(
void
)
pthread_mutex_init
(
&
LOCK_crypt
,
NULL
);
(
void
)
pthread_mutex_init
(
&
LOCK_bytes_sent
,
NULL
);
(
void
)
pthread_mutex_init
(
&
LOCK_bytes_received
,
NULL
);
(
void
)
pthread_mutex_init
(
&
LOCK_timezone
,
NULL
);
(
void
)
pthread_mutex_init
(
&
LOCK_binlog_update
,
NULL
);
(
void
)
pthread_mutex_init
(
&
LOCK_slave
,
NULL
);
(
void
)
pthread_mutex_init
(
&
LOCK_server_id
,
NULL
);
(
void
)
pthread_mutex_init
(
&
LOCK_user_conn
,
NULL
);
(
void
)
pthread_cond_init
(
&
COND_binlog_update
,
NULL
);
(
void
)
pthread_cond_init
(
&
COND_binlog_update
,
NULL
);
(
void
)
pthread_cond_init
(
&
COND_slave_stopped
,
NULL
);
(
void
)
pthread_cond_init
(
&
COND_slave_stopped
,
NULL
);
(
void
)
pthread_cond_init
(
&
COND_slave_start
,
NULL
);
(
void
)
pthread_cond_init
(
&
COND_slave_start
,
NULL
);
...
...
sql/slave.h
View file @
add70fc1
...
@@ -20,7 +20,7 @@ typedef struct st_master_info
...
@@ -20,7 +20,7 @@ typedef struct st_master_info
st_master_info
()
:
pending
(
0
),
fd
(
-
1
),
inited
(
0
)
st_master_info
()
:
pending
(
0
),
fd
(
-
1
),
inited
(
0
)
{
{
host
[
0
]
=
0
;
user
[
0
]
=
0
;
password
[
0
]
=
0
;
host
[
0
]
=
0
;
user
[
0
]
=
0
;
password
[
0
]
=
0
;
pthread_mutex_init
(
&
lock
,
NULL
);
pthread_mutex_init
(
&
lock
,
MY_MUTEX_INIT_FAST
);
pthread_cond_init
(
&
cond
,
NULL
);
pthread_cond_init
(
&
cond
,
NULL
);
}
}
...
...
sql/sql_class.cc
View file @
add70fc1
...
@@ -110,7 +110,7 @@ THD::THD():user_time(0),fatal_error(0),last_insert_id_used(0),
...
@@ -110,7 +110,7 @@ THD::THD():user_time(0),fatal_error(0),last_insert_id_used(0),
#endif
#endif
#ifdef SIGNAL_WITH_VIO_CLOSE
#ifdef SIGNAL_WITH_VIO_CLOSE
active_vio
=
0
;
active_vio
=
0
;
pthread_mutex_init
(
&
active_vio_lock
,
NULL
);
pthread_mutex_init
(
&
active_vio_lock
,
MY_MUTEX_INIT_FAST
);
#endif
#endif
/* Variables with default values */
/* Variables with default values */
...
...
sql/sql_class.h
View file @
add70fc1
...
@@ -45,7 +45,7 @@ typedef struct st_log_info
...
@@ -45,7 +45,7 @@ typedef struct st_log_info
my_off_t
pos
;
my_off_t
pos
;
bool
fatal
;
// if the purge happens to give us a negative offset
bool
fatal
;
// if the purge happens to give us a negative offset
pthread_mutex_t
lock
;
pthread_mutex_t
lock
;
st_log_info
()
:
fatal
(
0
)
{
pthread_mutex_init
(
&
lock
,
NULL
);}
st_log_info
()
:
fatal
(
0
)
{
pthread_mutex_init
(
&
lock
,
MY_MUTEX_INIT_FAST
);}
~
st_log_info
()
{
pthread_mutex_destroy
(
&
lock
);}
~
st_log_info
()
{
pthread_mutex_destroy
(
&
lock
);}
}
LOG_INFO
;
}
LOG_INFO
;
...
...
sql/sql_insert.cc
View file @
add70fc1
...
@@ -498,7 +498,7 @@ class delayed_insert :public ilink {
...
@@ -498,7 +498,7 @@ class delayed_insert :public ilink {
bzero
((
char
*
)
&
thd
.
net
,
sizeof
(
thd
.
net
));
// Safety
bzero
((
char
*
)
&
thd
.
net
,
sizeof
(
thd
.
net
));
// Safety
thd
.
system_thread
=
1
;
thd
.
system_thread
=
1
;
bzero
((
char
*
)
&
info
,
sizeof
(
info
));
bzero
((
char
*
)
&
info
,
sizeof
(
info
));
pthread_mutex_init
(
&
mutex
,
NULL
);
pthread_mutex_init
(
&
mutex
,
MY_MUTEX_INIT_FAST
);
pthread_cond_init
(
&
cond
,
NULL
);
pthread_cond_init
(
&
cond
,
NULL
);
pthread_cond_init
(
&
cond_client
,
NULL
);
pthread_cond_init
(
&
cond_client
,
NULL
);
VOID
(
pthread_mutex_lock
(
&
LOCK_thread_count
));
VOID
(
pthread_mutex_lock
(
&
LOCK_thread_count
));
...
...
sql/sql_udf.cc
View file @
add70fc1
...
@@ -105,7 +105,7 @@ void udf_init()
...
@@ -105,7 +105,7 @@ void udf_init()
if
(
initialized
)
if
(
initialized
)
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
pthread_mutex_init
(
&
THR_LOCK_udf
,
NULL
);
pthread_mutex_init
(
&
THR_LOCK_udf
,
MY_MUTEX_INIT_SLOW
);
init_sql_alloc
(
&
mem
,
1024
,
0
);
init_sql_alloc
(
&
mem
,
1024
,
0
);
THD
*
new_thd
=
new
THD
;
THD
*
new_thd
=
new
THD
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment