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
55bb279c
Commit
55bb279c
authored
Feb 11, 2019
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctly resolve the conflict around commit_cache_norebuild()
parent
69e55227
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
mysql-test/suite/innodb/r/foreign_key.result
mysql-test/suite/innodb/r/foreign_key.result
+0
-1
storage/innobase/handler/handler0alter.cc
storage/innobase/handler/handler0alter.cc
+12
-11
No files found.
mysql-test/suite/innodb/r/foreign_key.result
View file @
55bb279c
...
...
@@ -233,7 +233,6 @@ ALTER TABLE t1 ADD FOREIGN KEY (f) REFERENCES non_existing_table (x);
SET SESSION FOREIGN_KEY_CHECKS = ON;
ALTER TABLE t1 ADD FULLTEXT INDEX ft1 (f);
Warnings:
Warning 124 InnoDB rebuilding table to add column FTS_DOC_ID
Warning 1088 failed to load FOREIGN KEY constraints
ALTER TABLE t1 ADD FULLTEXT INDEX ft2 (f);
Warnings:
...
...
storage/innobase/handler/handler0alter.cc
View file @
55bb279c
...
...
@@ -9084,9 +9084,10 @@ after a successful commit_try_norebuild() call.
@param ctx In-place ALTER TABLE context for the current partition
@param table the TABLE before the ALTER
@param trx Data dictionary transaction
(will be started and committed, for DROP INDEX) */
(will be started and committed, for DROP INDEX)
@return whether all replacements were found for dropped indexes */
inline
MY_ATTRIBUTE
((
nonnull
))
void
bool
commit_cache_norebuild
(
/*===================*/
Alter_inplace_info
*
ha_alter_info
,
...
...
@@ -9099,6 +9100,8 @@ commit_cache_norebuild(
DBUG_ASSERT
(
ctx
->
new_table
->
space
!=
fil_system
.
temp_space
);
DBUG_ASSERT
(
!
ctx
->
new_table
->
is_temporary
());
bool
found
=
true
;
if
(
ctx
->
page_compression_level
)
{
DBUG_ASSERT
(
ctx
->
new_table
->
space
!=
fil_system
.
sys_space
);
ctx
->
new_table
->
flags
&=
...
...
@@ -9201,7 +9204,7 @@ commit_cache_norebuild(
if
(
!
dict_foreign_replace_index
(
index
->
table
,
ctx
->
col_names
,
index
))
{
ut_a
(
!
ctx
->
prebuilt
->
trx
->
check_foreigns
)
;
found
=
false
;
}
/* Mark the index dropped
...
...
@@ -9253,7 +9256,7 @@ commit_cache_norebuild(
:
NULL
;
DBUG_ASSERT
((
ctx
->
new_table
->
fts
==
NULL
)
==
(
ctx
->
new_table
->
fts_doc_id_index
==
NULL
));
DBUG_
VOID_RETURN
;
DBUG_
RETURN
(
found
)
;
}
/** Adjust the persistent statistics after non-rebuilding ALTER TABLE.
...
...
@@ -9868,13 +9871,11 @@ ha_innobase::commit_inplace_alter_table(
bool
fk_fail
=
innobase_update_foreign_cache
(
ctx
,
m_user_thd
)
!=
DB_SUCCESS
;
commit_cache_norebuild
(
ha_alter_info
,
ctx
,
table
,
trx
);
innobase_rename_or_enlarge_columns_cache
(
ha_alter_info
,
table
,
ctx
->
new_table
);
#ifdef MYSQL_RENAME_INDEX
rename_indexes_in_cache
(
ctx
,
ha_alter_info
);
#endif
if
(
!
commit_cache_norebuild
(
ha_alter_info
,
ctx
,
table
,
trx
))
{
fk_fail
=
true
;
}
if
(
fk_fail
&&
m_prebuilt
->
trx
->
check_foreigns
)
{
goto
foreign_fail
;
}
...
...
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