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
3595bcd7
Commit
3595bcd7
authored
Dec 27, 2004
by
heikki@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Plain Diff
Merge hundin.mysql.fi:/home/heikki/mysql-4.0
into hundin.mysql.fi:/home/heikki/mysql-4.1
parents
fbc96c79
b8d576d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
5 deletions
+37
-5
innobase/row/row0ins.c
innobase/row/row0ins.c
+26
-0
innobase/row/row0mysql.c
innobase/row/row0mysql.c
+11
-5
No files found.
innobase/row/row0ins.c
View file @
3595bcd7
...
...
@@ -1415,8 +1415,34 @@ row_ins_check_foreign_constraints(
row_mysql_freeze_data_dictionary
(
trx
);
}
if
(
foreign
->
referenced_table
)
{
mutex_enter
(
&
(
dict_sys
->
mutex
));
(
foreign
->
referenced_table
->
n_foreign_key_checks_running
)
++
;
mutex_exit
(
&
(
dict_sys
->
mutex
));
}
/* NOTE that if the thread ends up waiting for a lock
we will release dict_operation_lock temporarily!
But the counter on the table protects the referenced
table from being dropped while the check is running. */
err
=
row_ins_check_foreign_constraint
(
TRUE
,
foreign
,
table
,
entry
,
thr
);
if
(
foreign
->
referenced_table
)
{
mutex_enter
(
&
(
dict_sys
->
mutex
));
ut_a
(
foreign
->
referenced_table
->
n_foreign_key_checks_running
>
0
);
(
foreign
->
referenced_table
->
n_foreign_key_checks_running
)
--
;
mutex_exit
(
&
(
dict_sys
->
mutex
));
}
if
(
got_s_lock
)
{
row_mysql_unfreeze_data_dictionary
(
trx
);
}
...
...
innobase/row/row0mysql.c
View file @
3595bcd7
...
...
@@ -1833,6 +1833,12 @@ row_drop_table_for_mysql_in_background(
trx
=
trx_allocate_for_background
();
/* If the original transaction was dropping a table referenced by
foreign keys, we must set the following to be able to drop the
table: */
trx
->
check_foreigns
=
FALSE
;
/* fputs("InnoDB: Error: Dropping table ", stderr);
ut_print_name(stderr, name);
fputs(" in background drop list\n", stderr); */
...
...
@@ -1906,16 +1912,16 @@ row_drop_tables_for_mysql_in_background(void)
goto
already_dropped
;
}
if
(
table
->
n_mysql_handles_opened
>
0
||
table
->
n_foreign_key_checks_running
>
0
)
{
if
(
DB_SUCCESS
!=
row_drop_table_for_mysql_in_background
(
drop
->
table_name
))
{
/* If the DROP fails for some table, we return, and let the
main thread retry later */
return
(
n_tables
+
n_tables_dropped
);
}
n_tables_dropped
++
;
row_drop_table_for_mysql_in_background
(
drop
->
table_name
);
already_dropped:
mutex_enter
(
&
kernel_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