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
6e530d4d
Commit
6e530d4d
authored
Dec 20, 2017
by
Aleksey Midenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-14685 Assertion `!fully || (bool) hist_part' failed in Vers_part_info::initialized
parent
4bc268d4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
sql/partition_info.cc
sql/partition_info.cc
+12
-0
sql/vers_utils.h
sql/vers_utils.h
+13
-0
No files found.
sql/partition_info.cc
View file @
6e530d4d
...
...
@@ -33,6 +33,7 @@
#include "sql_acl.h" // *_ACL
#include "sql_base.h" // fill_record
#include "sql_statistics.h" // vers_stat_end
#include "vers_utils.h"
#ifdef WITH_PARTITION_STORAGE_ENGINE
#include "ha_partition.h"
...
...
@@ -1168,6 +1169,17 @@ bool partition_info::vers_setup_stats(THD * thd, bool is_create_table_ind)
bool
error
=
false
;
TABLE_LIST
tl
;
tl
.
init_one_table
(
LEX_STRING_WITH_LEN
(
table
->
s
->
db
),
LEX_STRING_WITH_LEN
(
table
->
s
->
table_name
),
table
->
s
->
table_name
.
str
,
TL_WRITE
);
MDL_auto_lock
mdl_lock
(
thd
,
tl
);
if
(
mdl_lock
.
acquire_error
())
return
true
;
mysql_mutex_lock
(
&
table
->
s
->
LOCK_rotation
);
if
(
table
->
s
->
busy_rotation
)
{
...
...
sql/vers_utils.h
View file @
6e530d4d
...
...
@@ -16,8 +16,21 @@ class MDL_auto_lock
thd
(
_thd
),
table
(
_table
)
{
DBUG_ASSERT
(
thd
);
MDL_request
protection_request
;
if
(
thd
->
global_read_lock
.
can_acquire_protection
())
{
error
=
true
;
return
;
}
protection_request
.
init
(
MDL_key
::
GLOBAL
,
""
,
""
,
MDL_INTENTION_EXCLUSIVE
,
MDL_EXPLICIT
);
error
=
thd
->
mdl_context
.
acquire_lock
(
&
protection_request
,
thd
->
variables
.
lock_wait_timeout
);
if
(
error
)
return
;
table
.
mdl_request
.
init
(
MDL_key
::
TABLE
,
table
.
db
,
table
.
table_name
,
MDL_EXCLUSIVE
,
MDL_EXPLICIT
);
error
=
thd
->
mdl_context
.
acquire_lock
(
&
table
.
mdl_request
,
thd
->
variables
.
lock_wait_timeout
);
thd
->
mdl_context
.
release_lock
(
protection_request
.
ticket
);
}
~
MDL_auto_lock
()
{
...
...
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