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
1b5b5cbe
Commit
1b5b5cbe
authored
Oct 24, 2010
by
Jimmy Yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug #57700 Latching order violation in row_truncate_table_for_mysql().
Approved by Sunny Bains
parent
59f35ce8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
9 deletions
+20
-9
storage/innodb_plugin/ChangeLog
storage/innodb_plugin/ChangeLog
+6
-0
storage/innodb_plugin/row/row0mysql.c
storage/innodb_plugin/row/row0mysql.c
+14
-9
No files found.
storage/innodb_plugin/ChangeLog
View file @
1b5b5cbe
2010-10-24 The InnoDB Team
* row/row0mysql.c
Fix Bug #57700 Latching order violation in
row_truncate_table_for_mysql()
2010-10-20 The InnoDB Team
2010-10-20 The InnoDB Team
* dict/dict0load.c
* dict/dict0load.c
...
...
storage/innodb_plugin/row/row0mysql.c
View file @
1b5b5cbe
...
@@ -2771,15 +2771,6 @@ row_truncate_table_for_mysql(
...
@@ -2771,15 +2771,6 @@ row_truncate_table_for_mysql(
trx
->
table_id
=
table
->
id
;
trx
->
table_id
=
table
->
id
;
/* Lock all index trees for this table, as we will
truncate the table/index and possibly change their metadata.
All DML/DDL are blocked by table level lock, with
a few exceptions such as queries into information schema
about the table, MySQL could try to access index stats
for this kind of query, we need to use index locks to
sync up */
dict_table_x_lock_indexes
(
table
);
if
(
table
->
space
&&
!
table
->
dir_path_of_temp_table
)
{
if
(
table
->
space
&&
!
table
->
dir_path_of_temp_table
)
{
/* Discard and create the single-table tablespace. */
/* Discard and create the single-table tablespace. */
ulint
space
=
table
->
space
;
ulint
space
=
table
->
space
;
...
@@ -2792,6 +2783,11 @@ row_truncate_table_for_mysql(
...
@@ -2792,6 +2783,11 @@ row_truncate_table_for_mysql(
dict_hdr_get_new_id
(
NULL
,
NULL
,
&
space
);
dict_hdr_get_new_id
(
NULL
,
NULL
,
&
space
);
/* Lock all index trees for this table. We must
do so after dict_hdr_get_new_id() to preserve
the latch order */
dict_table_x_lock_indexes
(
table
);
if
(
space
==
ULINT_UNDEFINED
if
(
space
==
ULINT_UNDEFINED
||
fil_create_new_single_table_tablespace
(
||
fil_create_new_single_table_tablespace
(
space
,
table
->
name
,
FALSE
,
flags
,
space
,
table
->
name
,
FALSE
,
flags
,
...
@@ -2825,6 +2821,15 @@ row_truncate_table_for_mysql(
...
@@ -2825,6 +2821,15 @@ row_truncate_table_for_mysql(
FIL_IBD_FILE_INITIAL_SIZE
,
&
mtr
);
FIL_IBD_FILE_INITIAL_SIZE
,
&
mtr
);
mtr_commit
(
&
mtr
);
mtr_commit
(
&
mtr
);
}
}
}
else
{
/* Lock all index trees for this table, as we will
truncate the table/index and possibly change their metadata.
All DML/DDL are blocked by table level lock, with
a few exceptions such as queries into information schema
about the table, MySQL could try to access index stats
for this kind of query, we need to use index locks to
sync up */
dict_table_x_lock_indexes
(
table
);
}
}
/* scan SYS_INDEXES for all indexes of the table */
/* scan SYS_INDEXES for all indexes of the table */
...
...
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