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
64239419
Commit
64239419
authored
Oct 19, 2018
by
Sergey Vojtovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused code.
parent
4ac85d6f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1 addition
and
90 deletions
+1
-90
sql/ha_partition.h
sql/ha_partition.h
+0
-1
sql/lock.cc
sql/lock.cc
+0
-17
sql/lock.h
sql/lock.h
+0
-1
sql/sql_base.cc
sql/sql_base.cc
+0
-70
sql/sql_insert.cc
sql/sql_insert.cc
+1
-1
No files found.
sql/ha_partition.h
View file @
64239419
...
...
@@ -251,7 +251,6 @@ class ha_partition :public handler
/*
Variables for lock structures.
*/
THR_LOCK_DATA
lock
;
/* MySQL lock */
bool
auto_increment_lock
;
/**< lock reading/updating auto_inc */
/**
...
...
sql/lock.cc
View file @
64239419
...
...
@@ -541,23 +541,6 @@ void mysql_lock_remove(THD *thd, MYSQL_LOCK *locked,TABLE *table)
}
/** Abort all other threads waiting to get lock in table. */
void
mysql_lock_abort
(
THD
*
thd
,
TABLE
*
table
,
bool
upgrade_lock
)
{
MYSQL_LOCK
*
locked
;
DBUG_ENTER
(
"mysql_lock_abort"
);
if
((
locked
=
get_lock_data
(
thd
,
&
table
,
1
,
GET_LOCK_UNLOCK
)))
{
for
(
uint
i
=
0
;
i
<
locked
->
lock_count
;
i
++
)
thr_abort_locks
(
locked
->
locks
[
i
]
->
lock
,
upgrade_lock
);
my_free
(
locked
);
}
DBUG_VOID_RETURN
;
}
/**
Abort one thread / table combination.
...
...
sql/lock.h
View file @
64239419
...
...
@@ -32,7 +32,6 @@ void mysql_unlock_tables(THD *thd, MYSQL_LOCK *sql_lock, bool free_lock= 1);
void
mysql_unlock_read_tables
(
THD
*
thd
,
MYSQL_LOCK
*
sql_lock
);
void
mysql_unlock_some_tables
(
THD
*
thd
,
TABLE
**
table
,
uint
count
);
void
mysql_lock_remove
(
THD
*
thd
,
MYSQL_LOCK
*
locked
,
TABLE
*
table
);
void
mysql_lock_abort
(
THD
*
thd
,
TABLE
*
table
,
bool
upgrade_lock
);
bool
mysql_lock_abort_for_thread
(
THD
*
thd
,
TABLE
*
table
);
MYSQL_LOCK
*
mysql_lock_merge
(
MYSQL_LOCK
*
a
,
MYSQL_LOCK
*
b
);
/* Lock based on name */
...
...
sql/sql_base.cc
View file @
64239419
...
...
@@ -9100,76 +9100,6 @@ my_bool mysql_rm_tmp_tables(void)
unireg support functions
*****************************************************************************/
/**
A callback to the server internals that is used to address
special cases of the locking protocol.
Invoked when acquiring an exclusive lock, for each thread that
has a conflicting shared metadata lock.
This function:
- aborts waiting of the thread on a data lock, to make it notice
the pending exclusive lock and back off.
- if the thread is an INSERT DELAYED thread, sends it a KILL
signal to terminate it.
@note This function does not wait for the thread to give away its
locks. Waiting is done outside for all threads at once.
@param thd Current thread context
@param in_use The thread to wake up
@param needs_thr_lock_abort Indicates that to wake up thread
this call needs to abort its waiting
on table-level lock.
@retval TRUE if the thread was woken up
@retval FALSE otherwise.
@note It is one of two places where border between MDL and the
rest of the server is broken.
*/
bool
mysql_notify_thread_having_shared_lock
(
THD
*
thd
,
THD
*
in_use
,
bool
needs_thr_lock_abort
)
{
bool
signalled
=
FALSE
;
if
((
in_use
->
system_thread
&
SYSTEM_THREAD_DELAYED_INSERT
)
&&
!
in_use
->
killed
)
{
in_use
->
killed
=
KILL_SYSTEM_THREAD
;
mysql_mutex_lock
(
&
in_use
->
mysys_var
->
mutex
);
if
(
in_use
->
mysys_var
->
current_cond
)
{
mysql_mutex_lock
(
in_use
->
mysys_var
->
current_mutex
);
mysql_cond_broadcast
(
in_use
->
mysys_var
->
current_cond
);
mysql_mutex_unlock
(
in_use
->
mysys_var
->
current_mutex
);
}
mysql_mutex_unlock
(
&
in_use
->
mysys_var
->
mutex
);
signalled
=
TRUE
;
}
if
(
needs_thr_lock_abort
)
{
mysql_mutex_lock
(
&
in_use
->
LOCK_thd_data
);
for
(
TABLE
*
thd_table
=
in_use
->
open_tables
;
thd_table
;
thd_table
=
thd_table
->
next
)
{
/*
Check for TABLE::needs_reopen() is needed since in some places we call
handler::close() for table instance (and set TABLE::db_stat to 0)
and do not remove such instances from the THD::open_tables
for some time, during which other thread can see those instances
(e.g. see partitioning code).
*/
if
(
!
thd_table
->
needs_reopen
())
signalled
|=
mysql_lock_abort_for_thread
(
thd
,
thd_table
);
}
mysql_mutex_unlock
(
&
in_use
->
LOCK_thd_data
);
}
return
signalled
;
}
int
setup_ftfuncs
(
SELECT_LEX
*
select_lex
)
{
List_iterator
<
Item_func_match
>
li
(
*
(
select_lex
->
ftfunc_list
)),
...
...
sql/sql_insert.cc
View file @
64239419
...
...
@@ -2353,7 +2353,7 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd)
The thread could be killed with an error message if
di->handle_inserts() or di->open_and_lock_table() fails.
The thread could be killed without an error message if
killed using
mysql_notify_thread_having
_shared_lock() or
killed using
THD::notify
_shared_lock() or
kill_delayed_threads_for_table().
*/
if
(
!
thd
.
is_error
())
...
...
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