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
6dfa085f
Commit
6dfa085f
authored
Jul 30, 2019
by
Kentoku SHIBA
Committed by
GitHub
Jul 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-20179 Server hangs on shutdown during installation of Spider (#1368)
parent
7221b9ef
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
11 deletions
+23
-11
storage/spider/spd_include.h
storage/spider/spd_include.h
+1
-0
storage/spider/spd_malloc.h
storage/spider/spd_malloc.h
+3
-2
storage/spider/spd_table.cc
storage/spider/spd_table.cc
+19
-9
No files found.
storage/spider/spd_include.h
View file @
6dfa085f
...
...
@@ -293,6 +293,7 @@ typedef struct st_spider_thread
volatile
bool
thd_wait
;
volatile
bool
first_free_wait
;
volatile
bool
init_command
;
volatile
int
error
;
pthread_t
thread
;
pthread_cond_t
cond
;
pthread_mutex_t
mutex
;
...
...
storage/spider/spd_malloc.h
View file @
6dfa085f
/* Copyright (C) 2012-2014 Kentoku Shiba
/* Copyright (C) 2012-2019 Kentoku Shiba
Copyright (C) 2019 MariaDB corp
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
...
...
@@ -19,7 +20,7 @@
#define spider_bulk_malloc(A,B,C,...) \
spider_bulk_alloc_mem(A,B,__func__,__FILE__,__LINE__,C,__VA_ARGS__)
#define spider_current_trx \
(current_thd ? ((SPIDER_TRX *) thd_get_ha_data(current_thd, spider_hton_ptr)) : NULL)
(current_thd
&& spider_hton_ptr->slot != HA_SLOT_UNDEF
? ((SPIDER_TRX *) thd_get_ha_data(current_thd, spider_hton_ptr)) : NULL)
#define init_calc_mem(A) init_mem_calc(A,__func__,__FILE__,__LINE__)
...
...
storage/spider/spd_table.cc
View file @
6dfa085f
...
...
@@ -7380,10 +7380,16 @@ int spider_db_init(
DBUG_PRINT
(
"info"
,(
"spider before releasing mutex"
));
pthread_mutex_unlock
(
&
spider_table_sts_threads
[
0
].
mutex
);
DBUG_PRINT
(
"info"
,(
"spider after releasing mutex"
));
if
(
spider_table_sts_threads
[
0
].
error
)
{
error_num
=
spider_table_sts_threads
[
0
].
error
;
goto
error_init_sql
;
}
#endif
DBUG_RETURN
(
0
);
#ifndef WITHOUT_SPIDER_BG_SEARCH
error_init_sql:
error_init_dbton:
for
(
roop_count
--
;
roop_count
>=
0
;
roop_count
--
)
{
...
...
@@ -10033,7 +10039,8 @@ void *spider_table_bg_sts_action(
(
uint
)
spider_init_queries
[
i
].
length
,
FALSE
,
FALSE
);
if
(
unlikely
(
thd
->
is_error
()))
{
fprintf
(
stderr
,
"[ERROR] %s
\n
"
,
thd
->
get_stmt_da
()
->
message
());
thread
->
error
=
spider_stmt_da_sql_errno
(
thd
);
fprintf
(
stderr
,
"[ERROR] %s
\n
"
,
spider_stmt_da_message
(
thd
));
thd
->
clear_error
();
break
;
}
...
...
@@ -10057,17 +10064,20 @@ void *spider_table_bg_sts_action(
pthread_cond_wait
(
&
thread
->
cond
,
&
thread
->
mutex
);
thread
->
thd_wait
=
FALSE
;
}
while
(
spider_init_queries
[
i
].
length
&&
!
thd
->
killed
)
if
(
likely
(
!
thread
->
error
)
)
{
dispatch_command
(
COM_QUERY
,
thd
,
spider_init_queries
[
i
].
str
,
(
uint
)
spider_init_queries
[
i
].
length
,
FALSE
,
FALSE
);
if
(
unlikely
(
thd
->
is_error
()))
while
(
spider_init_queries
[
i
].
length
&&
!
thd
->
killed
)
{
fprintf
(
stderr
,
"[ERROR] %s
\n
"
,
thd
->
get_stmt_da
()
->
message
());
thd
->
clear_error
();
break
;
dispatch_command
(
COM_QUERY
,
thd
,
spider_init_queries
[
i
].
str
,
(
uint
)
spider_init_queries
[
i
].
length
,
FALSE
,
FALSE
);
if
(
unlikely
(
thd
->
is_error
()))
{
fprintf
(
stderr
,
"[ERROR] %s
\n
"
,
spider_stmt_da_message
(
thd
));
thd
->
clear_error
();
break
;
}
++
i
;
}
++
i
;
}
thd
->
mysys_var
->
current_cond
=
&
thread
->
cond
;
thd
->
mysys_var
->
current_mutex
=
&
thread
->
mutex
;
...
...
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