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
24ec8eaf
Commit
24ec8eaf
authored
Dec 02, 2020
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-15532 after-merge fixes from Monty
The Galera tests were massively failing with debug assertions.
parent
589cf8db
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
22 additions
and
22 deletions
+22
-22
plugin/handler_socket/handlersocket/database.cpp
plugin/handler_socket/handlersocket/database.cpp
+1
-3
sql/mdl.cc
sql/mdl.cc
+2
-3
sql/mdl.h
sql/mdl.h
+1
-1
sql/rpl_gtid.cc
sql/rpl_gtid.cc
+1
-1
sql/rpl_rli.cc
sql/rpl_rli.cc
+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/wsrep_client_service.cc
sql/wsrep_client_service.cc
+1
-1
sql/wsrep_high_priority_service.cc
sql/wsrep_high_priority_service.cc
+3
-3
sql/wsrep_mysqld.cc
sql/wsrep_mysqld.cc
+1
-1
sql/wsrep_schema.cc
sql/wsrep_schema.cc
+1
-1
sql/wsrep_server_service.cc
sql/wsrep_server_service.cc
+1
-1
sql/wsrep_storage_service.cc
sql/wsrep_storage_service.cc
+2
-2
sql/xa.cc
sql/xa.cc
+4
-1
No files found.
plugin/handler_socket/handlersocket/database.cpp
View file @
24ec8eaf
...
@@ -471,9 +471,7 @@ dbcontext::close_tables_if()
...
@@ -471,9 +471,7 @@ dbcontext::close_tables_if()
unlock_tables_if
();
unlock_tables_if
();
DENA_VERBOSE
(
100
,
fprintf
(
stderr
,
"HNDSOCK close tables
\n
"
));
DENA_VERBOSE
(
100
,
fprintf
(
stderr
,
"HNDSOCK close tables
\n
"
));
close_thread_tables
(
thd
);
close_thread_tables
(
thd
);
#if MYSQL_VERSION_ID >= 50505
thd
->
mdl_context
.
release_transactional_locks
(
thd
);
thd
->
mdl_context
.
release_transactional_locks
();
#endif
if
(
!
table_vec
.
empty
())
{
if
(
!
table_vec
.
empty
())
{
statistic_increment
(
close_tables_count
,
&
LOCK_status
);
statistic_increment
(
close_tables_count
,
&
LOCK_status
);
table_vec
.
clear
();
table_vec
.
clear
();
...
...
sql/mdl.cc
View file @
24ec8eaf
...
@@ -3033,18 +3033,17 @@ void MDL_context::rollback_to_savepoint(const MDL_savepoint &mdl_savepoint)
...
@@ -3033,18 +3033,17 @@ void MDL_context::rollback_to_savepoint(const MDL_savepoint &mdl_savepoint)
implementation of COMMIT (implicit or explicit) and ROLLBACK.
implementation of COMMIT (implicit or explicit) and ROLLBACK.
*/
*/
void
MDL_context
::
release_transactional_locks
()
void
MDL_context
::
release_transactional_locks
(
THD
*
thd
)
{
{
DBUG_ENTER
(
"MDL_context::release_transactional_locks"
);
DBUG_ENTER
(
"MDL_context::release_transactional_locks"
);
/* Fail if there are active transactions */
/* Fail if there are active transactions */
DBUG_ASSERT
(
!
(
current_
thd
->
server_status
&
DBUG_ASSERT
(
!
(
thd
->
server_status
&
(
SERVER_STATUS_IN_TRANS
|
SERVER_STATUS_IN_TRANS_READONLY
)));
(
SERVER_STATUS_IN_TRANS
|
SERVER_STATUS_IN_TRANS_READONLY
)));
release_locks_stored_before
(
MDL_STATEMENT
,
NULL
);
release_locks_stored_before
(
MDL_STATEMENT
,
NULL
);
release_locks_stored_before
(
MDL_TRANSACTION
,
NULL
);
release_locks_stored_before
(
MDL_TRANSACTION
,
NULL
);
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
}
void
MDL_context
::
release_statement_locks
()
void
MDL_context
::
release_statement_locks
()
{
{
DBUG_ENTER
(
"MDL_context::release_transactional_locks"
);
DBUG_ENTER
(
"MDL_context::release_transactional_locks"
);
...
...
sql/mdl.h
View file @
24ec8eaf
...
@@ -901,7 +901,7 @@ class MDL_context
...
@@ -901,7 +901,7 @@ class MDL_context
void
set_lock_duration
(
MDL_ticket
*
mdl_ticket
,
enum_mdl_duration
duration
);
void
set_lock_duration
(
MDL_ticket
*
mdl_ticket
,
enum_mdl_duration
duration
);
void
release_statement_locks
();
void
release_statement_locks
();
void
release_transactional_locks
();
void
release_transactional_locks
(
THD
*
thd
);
void
release_explicit_locks
();
void
release_explicit_locks
();
void
rollback_to_savepoint
(
const
MDL_savepoint
&
mdl_savepoint
);
void
rollback_to_savepoint
(
const
MDL_savepoint
&
mdl_savepoint
);
...
...
sql/rpl_gtid.cc
View file @
24ec8eaf
...
@@ -733,7 +733,7 @@ rpl_slave_state::record_gtid(THD *thd, const rpl_gtid *gtid, uint64 sub_id,
...
@@ -733,7 +733,7 @@ rpl_slave_state::record_gtid(THD *thd, const rpl_gtid *gtid, uint64 sub_id,
if
(
in_transaction
)
if
(
in_transaction
)
thd
->
mdl_context
.
release_statement_locks
();
thd
->
mdl_context
.
release_statement_locks
();
else
else
thd
->
mdl_context
.
release_transactional_locks
();
thd
->
release_transactional_locks
();
}
}
thd
->
lex
->
restore_backup_query_tables_list
(
&
lex_backup
);
thd
->
lex
->
restore_backup_query_tables_list
(
&
lex_backup
);
thd
->
variables
.
option_bits
=
thd_saved_option
;
thd
->
variables
.
option_bits
=
thd_saved_option
;
...
...
sql/rpl_rli.cc
View file @
24ec8eaf
...
@@ -1675,7 +1675,7 @@ scan_one_gtid_slave_pos_table(THD *thd, HASH *hash, DYNAMIC_ARRAY *array,
...
@@ -1675,7 +1675,7 @@ scan_one_gtid_slave_pos_table(THD *thd, HASH *hash, DYNAMIC_ARRAY *array,
{
{
*
out_hton
=
table
->
s
->
db_type
();
*
out_hton
=
table
->
s
->
db_type
();
close_thread_tables
(
thd
);
close_thread_tables
(
thd
);
thd
->
mdl_context
.
release_transactional_locks
();
thd
->
mdl_context
.
release_transactional_locks
(
thd
);
}
}
return
err
;
return
err
;
}
}
...
...
sql/sql_class.cc
View file @
24ec8eaf
...
@@ -1544,7 +1544,7 @@ void THD::cleanup(void)
...
@@ -1544,7 +1544,7 @@ void THD::cleanup(void)
and left the mode a few lines above), there will be outstanding
and left the mode a few lines above), there will be outstanding
metadata locks. Release them.
metadata locks. Release them.
*/
*/
mdl_context
.
release_transactional_locks
();
mdl_context
.
release_transactional_locks
(
this
);
backup_end
(
this
);
backup_end
(
this
);
backup_unlock
(
this
);
backup_unlock
(
this
);
...
...
sql/sql_class.h
View file @
24ec8eaf
...
@@ -4579,7 +4579,7 @@ class THD: public THD_count, /* this must be first */
...
@@ -4579,7 +4579,7 @@ class THD: public THD_count, /* this must be first */
{
{
if
(
!
(
server_status
&
if
(
!
(
server_status
&
(
SERVER_STATUS_IN_TRANS
|
SERVER_STATUS_IN_TRANS_READONLY
)))
(
SERVER_STATUS_IN_TRANS
|
SERVER_STATUS_IN_TRANS_READONLY
)))
mdl_context
.
release_transactional_locks
();
mdl_context
.
release_transactional_locks
(
this
);
}
}
int
decide_logging_format
(
TABLE_LIST
*
tables
);
int
decide_logging_format
(
TABLE_LIST
*
tables
);
/*
/*
...
...
sql/sql_insert.cc
View file @
24ec8eaf
...
@@ -2241,7 +2241,7 @@ class Delayed_insert :public ilink {
...
@@ -2241,7 +2241,7 @@ class Delayed_insert :public ilink {
if
(
table
)
if
(
table
)
{
{
close_thread_tables
(
&
thd
);
close_thread_tables
(
&
thd
);
thd
.
mdl_context
.
release_transactional_locks
();
thd
.
mdl_context
.
release_transactional_locks
(
&
thd
);
}
}
mysql_mutex_destroy
(
&
mutex
);
mysql_mutex_destroy
(
&
mutex
);
mysql_cond_destroy
(
&
cond
);
mysql_cond_destroy
(
&
cond
);
...
...
sql/wsrep_client_service.cc
View file @
24ec8eaf
...
@@ -345,7 +345,7 @@ int Wsrep_client_service::bf_rollback()
...
@@ -345,7 +345,7 @@ int Wsrep_client_service::bf_rollback()
{
{
m_thd
->
global_read_lock
.
unlock_global_read_lock
(
m_thd
);
m_thd
->
global_read_lock
.
unlock_global_read_lock
(
m_thd
);
}
}
m_thd
->
mdl_context
.
release_transactional_locks
();
m_thd
->
release_transactional_locks
();
m_thd
->
mdl_context
.
release_explicit_locks
();
m_thd
->
mdl_context
.
release_explicit_locks
();
DBUG_RETURN
(
ret
);
DBUG_RETURN
(
ret
);
...
...
sql/wsrep_high_priority_service.cc
View file @
24ec8eaf
...
@@ -274,7 +274,7 @@ int Wsrep_high_priority_service::append_fragment_and_commit(
...
@@ -274,7 +274,7 @@ int Wsrep_high_priority_service::append_fragment_and_commit(
ret
=
ret
||
trans_commit
(
m_thd
);
ret
=
ret
||
trans_commit
(
m_thd
);
m_thd
->
wsrep_cs
().
after_applying
();
m_thd
->
wsrep_cs
().
after_applying
();
m_thd
->
mdl_context
.
release_transactional_locks
();
m_thd
->
release_transactional_locks
();
free_root
(
m_thd
->
mem_root
,
MYF
(
MY_KEEP_PREALLOC
));
free_root
(
m_thd
->
mem_root
,
MYF
(
MY_KEEP_PREALLOC
));
...
@@ -316,7 +316,7 @@ int Wsrep_high_priority_service::commit(const wsrep::ws_handle& ws_handle,
...
@@ -316,7 +316,7 @@ int Wsrep_high_priority_service::commit(const wsrep::ws_handle& ws_handle,
m_rgi
->
cleanup_context
(
thd
,
0
);
m_rgi
->
cleanup_context
(
thd
,
0
);
}
}
m_thd
->
mdl_context
.
release_transactional_locks
();
m_thd
->
release_transactional_locks
();
thd_proc_info
(
thd
,
"wsrep applier committed"
);
thd_proc_info
(
thd
,
"wsrep applier committed"
);
...
@@ -354,7 +354,7 @@ int Wsrep_high_priority_service::rollback(const wsrep::ws_handle& ws_handle,
...
@@ -354,7 +354,7 @@ int Wsrep_high_priority_service::rollback(const wsrep::ws_handle& ws_handle,
DBUG_ENTER
(
"Wsrep_high_priority_service::rollback"
);
DBUG_ENTER
(
"Wsrep_high_priority_service::rollback"
);
m_thd
->
wsrep_cs
().
prepare_for_ordering
(
ws_handle
,
ws_meta
,
false
);
m_thd
->
wsrep_cs
().
prepare_for_ordering
(
ws_handle
,
ws_meta
,
false
);
int
ret
=
(
trans_rollback_stmt
(
m_thd
)
||
trans_rollback
(
m_thd
));
int
ret
=
(
trans_rollback_stmt
(
m_thd
)
||
trans_rollback
(
m_thd
));
m_thd
->
mdl_context
.
release_transactional_locks
();
m_thd
->
release_transactional_locks
();
m_thd
->
mdl_context
.
release_explicit_locks
();
m_thd
->
mdl_context
.
release_explicit_locks
();
free_root
(
m_thd
->
mem_root
,
MYF
(
MY_KEEP_PREALLOC
));
free_root
(
m_thd
->
mem_root
,
MYF
(
MY_KEEP_PREALLOC
));
...
...
sql/wsrep_mysqld.cc
View file @
24ec8eaf
...
@@ -1187,7 +1187,7 @@ wsrep_append_fk_parent_table(THD* thd, TABLE_LIST* tables, wsrep::key_array* key
...
@@ -1187,7 +1187,7 @@ wsrep_append_fk_parent_table(THD* thd, TABLE_LIST* tables, wsrep::key_array* key
if
(
!
WSREP
(
thd
)
||
!
WSREP_CLIENT
(
thd
))
return
;
if
(
!
WSREP
(
thd
)
||
!
WSREP_CLIENT
(
thd
))
return
;
TABLE_LIST
*
table
;
TABLE_LIST
*
table
;
thd
->
mdl_context
.
release_transactional_locks
();
thd
->
release_transactional_locks
();
uint
counter
;
uint
counter
;
MDL_savepoint
mdl_savepoint
=
thd
->
mdl_context
.
mdl_savepoint
();
MDL_savepoint
mdl_savepoint
=
thd
->
mdl_context
.
mdl_savepoint
();
...
...
sql/wsrep_schema.cc
View file @
24ec8eaf
...
@@ -855,7 +855,7 @@ Wsrep_view Wsrep_schema::restore_view(THD* thd, const Wsrep_id& own_id) const {
...
@@ -855,7 +855,7 @@ Wsrep_view Wsrep_schema::restore_view(THD* thd, const Wsrep_id& own_id) const {
close_thread_tables
(
thd
);
close_thread_tables
(
thd
);
}
}
}
}
thd
->
mdl_context
.
release_transactional_locks
();
thd
->
release_transactional_locks
();
thd
->
variables
.
wsrep_sync_wait
=
wsrep_sync_wait_saved
;
thd
->
variables
.
wsrep_sync_wait
=
wsrep_sync_wait_saved
;
...
...
sql/wsrep_server_service.cc
View file @
24ec8eaf
...
@@ -248,7 +248,7 @@ void Wsrep_server_service::log_view(
...
@@ -248,7 +248,7 @@ void Wsrep_server_service::log_view(
WSREP_WARN
(
"Failed to commit transaction for store view"
);
WSREP_WARN
(
"Failed to commit transaction for store view"
);
}
}
}
}
applier
->
m_thd
->
mdl_context
.
release_transactional_locks
();
applier
->
m_thd
->
release_transactional_locks
();
}
}
/*
/*
...
...
sql/wsrep_storage_service.cc
View file @
24ec8eaf
...
@@ -176,7 +176,7 @@ int Wsrep_storage_service::commit(const wsrep::ws_handle& ws_handle,
...
@@ -176,7 +176,7 @@ int Wsrep_storage_service::commit(const wsrep::ws_handle& ws_handle,
trans_rollback
(
m_thd
);
trans_rollback
(
m_thd
);
}
}
m_thd
->
wsrep_cs
().
after_applying
();
m_thd
->
wsrep_cs
().
after_applying
();
m_thd
->
mdl_context
.
release_transactional_locks
();
m_thd
->
release_transactional_locks
();
DBUG_RETURN
(
ret
);
DBUG_RETURN
(
ret
);
}
}
...
@@ -191,7 +191,7 @@ int Wsrep_storage_service::rollback(const wsrep::ws_handle& ws_handle,
...
@@ -191,7 +191,7 @@ int Wsrep_storage_service::rollback(const wsrep::ws_handle& ws_handle,
ws_handle
,
ws_meta
,
false
)
||
ws_handle
,
ws_meta
,
false
)
||
trans_rollback
(
m_thd
));
trans_rollback
(
m_thd
));
m_thd
->
wsrep_cs
().
after_applying
();
m_thd
->
wsrep_cs
().
after_applying
();
m_thd
->
mdl_context
.
release_transactional_locks
();
m_thd
->
release_transactional_locks
();
DBUG_RETURN
(
ret
);
DBUG_RETURN
(
ret
);
}
}
...
...
sql/xa.cc
View file @
24ec8eaf
...
@@ -399,6 +399,7 @@ static bool xa_trans_force_rollback(THD *thd)
...
@@ -399,6 +399,7 @@ static bool xa_trans_force_rollback(THD *thd)
xid_cache_delete
(
thd
,
&
thd
->
transaction
.
xid_state
);
xid_cache_delete
(
thd
,
&
thd
->
transaction
.
xid_state
);
trans_track_end_trx
(
thd
);
trans_track_end_trx
(
thd
);
thd
->
mdl_context
.
release_transactional_locks
(
thd
);
return
rc
;
return
rc
;
}
}
...
@@ -603,7 +604,7 @@ bool trans_xa_commit(THD *thd)
...
@@ -603,7 +604,7 @@ bool trans_xa_commit(THD *thd)
xid_cache_delete
(
thd
,
&
thd
->
transaction
.
xid_state
);
xid_cache_delete
(
thd
,
&
thd
->
transaction
.
xid_state
);
trans_track_end_trx
(
thd
);
trans_track_end_trx
(
thd
);
thd
->
mdl_context
.
release_transactional_locks
();
thd
->
mdl_context
.
release_transactional_locks
(
thd
);
DBUG_RETURN
(
res
);
DBUG_RETURN
(
res
);
}
}
...
@@ -677,6 +678,8 @@ bool trans_xa_detach(THD *thd)
...
@@ -677,6 +678,8 @@ bool trans_xa_detach(THD *thd)
thd
->
transaction
.
all
.
no_2pc
=
0
;
thd
->
transaction
.
all
.
no_2pc
=
0
;
thd
->
server_status
&=
~
(
SERVER_STATUS_IN_TRANS
|
thd
->
server_status
&=
~
(
SERVER_STATUS_IN_TRANS
|
SERVER_STATUS_IN_TRANS_READONLY
);
SERVER_STATUS_IN_TRANS_READONLY
);
thd
->
mdl_context
.
release_transactional_locks
(
thd
);
return
false
;
return
false
;
#endif
#endif
}
}
...
...
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